Giter Site home page Giter Site logo

bgp-playground's Introduction

BGP Routing Playground

This repo provide an easy way to experiment with BIRD Internet Routing Daemon, and GoBGP.

Containers

  • r01 = GoBGP
  • r02 = GPBGP
  • routesvr = BIRD

Diagrams

flowchart LR
    subnet["subnet `192.50.50.0/24`"]
    r01["`r01`"]
    r02["`r02`"]
    routesvr["`routesvr`"]
    r01 --> subnet 
    r02 --> subnet
    routesvr --> subnet 
Loading

How to

  1. Make sure you have a recent version of docker installed
  2. run docker compose up -d
  3. commands can be executed within the containers using
    • routesvr: use docker exec -it routesvr birdc to access the BIRD CLI. From there you can execute commands normally.
    • r02: use docker exec r02 gobgpc <command>
    • r03: use docker exec r01 gobgp <command>

Manually Adding routes into GoBGP

You can add routes into the GoBGP Routing Information base like this example: docker exec r01 gobgp global rib add -a ipv4 10.10.20.0/21 nexthop 10.10.20.20 identifier 20

Keep in mind that these route will no longer be advertised after restarting the container!

Adding routes with script

  • Dependencies: Have Python3.10 (or higher) installed on your local machine
  1. Add prefixes that you want to add to r01 and r02 into the file scripts/prefixes.py. There are a few prefixes already added to the list.
  2. Run python3 scripts/inject_routes.py
  3. The script will randomly add the routes to r01 and r02 and print out the results.

Like the manually added routes, these routes will not remain after the container is restarted.

bgp-playground's People

Contributors

keithcroxford avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.