experimenting with BGP using Quagga and a set of openWrt routers

1.5k views Asked by At

I want to learn and experiment with BGP protocol by some non-trivial scenarios: setup anycasting, see how quickly and what way routing changes after I disconnect some link, etc. As I understand I cannot easily and should not do it on "the real internet" as I would need to register/obtain an Autonomous System(s), obtain a pool of some IP addresses etc, not to mention a chaos I could cause by my experiments.

Therefore I'm considering buying few (5-6) cheap, openWRT compatible routers (I was thinking about MikroTik RB750Gr3), setting up my own small isolated "clone of the internet" and play with BGP using Quagga that I would install on these routers. So now I need help with verifying whether my idea makes sense:

  1. is my understanding (described at the beginning) that I cannot/should not do it on "the real internet" correct? or maybe there are some publicly available "sandboxes" that would allow me to experiment?

  2. is it even possible to create such a small isolated clone of the internet as I described or maybe it will not work because of some reasons that I'm missing? (for example some central registry like IANA would need to be also present on my clone or something else that I'm not aware of?)

  3. is there maybe an easier/simpler way to conduct such experiments than by purchasing several routers? Maybe I could somehow create several interconnected virtual networks on Qemu-KVM/libvirt instead and play there? (I couldn't google anything related)

  4. is Quagga BGP software capable of doing what I intend or maybe it has some limitations which will not allow me to try some/many of the typical "real internet" scenarios?

  5. assuming that I'm more or less on the right track up to this moment, is the MikroTik RB750Gr3 a good model to conduct such experiments? or maybe I could use something significantly cheaper? or maybe the opposite: I need something "more capable"?

  6. are there any resources on the web that describe more or less the thing that I intend to do? so far I found mostly either very high-level overviews of BGP or documents that describe situation from the point of view of a single AS.

I've asked this question originally on network engineering stackexchange, but it turned that openWRT and Quagga are forbidden topics there, so it was closed immediately: hope here is a good place ;)

1

There are 1 answers

2
Chris Hall On

I admire the ambition, but I don't see how a network of 5-6 routers is really going to be an effective "clone of the Internet".

You talk of "how quickly and in what way routing changes after I disconnect some link" -- but in the real Internet, the response to a failed link depends first on the network in which that happens, and then on how the resulting change(s) propagate across the "BGP Mesh", which in turn depends on the networks involved. A small network of closely connected routers is going to struggle to simulate that -- even if you could find out how to configure your simulation to emulate real networks.

You say that the resources you have found describe BGP in terms of a single AS. I guess that mostly because all the BGP does is to exchange routeing information between an AS and the neighbour ASes it is connected to. In a way, global routeing is a "emergent property" of all the individual AS-to-AS BGP connections across the Internet -- what I call the "BGP Mesh". If you look for "Route Flap Damping" or "BGP Route Convergence" or "BGP Route Stability" using your chosen search engine, you should start to find stuff related to the behavior the BGP Mesh. Also caida.org, RIPE and renesys.

With a 5-6 routers and data extracted from the RIPE or Caida route-collectors, you could probably set up a Quagga instance to be some AS connected to a couple of transit providers and three or four peers... but it sounds like a lot of work for not mush return.

Sorry to be negative.

It's been a while since I last did anything with Quagga, but it's a capable BGP implementation. There's also BIRD.