I am doing some thesis about comparison of routing protocols, most notably how (how good, how fast) they react to changes in the underlying network. Not sure if this makes any sense, but too late to change the subject if it doesn't, anyway:

My question is how to perform testing on linux? I can introduce the test conditions for example link between some networks failing, but I am not sure what is the best way to test that and document. Manual testing is probably hard to document. I currently have problems specifying this further because my problem is also lack of knowledge in that field beyond basic static routing.

  • Your assumptions about your thesis are, IMO, fatally flawed. All modern protocols can adjust their reaction (detection) times. It is also dependent on the router's processing power/memory. Convergence times ( the other important feature) is highly dependent on topology. Finally, there are commercial products that model networks and their behavior so one can play with all these parameters. – Ron Trunk Jan 12 at 17:27
  • As a student, you could be forgiven for not knowing this. However, your thesis advisor is --- how can I put this and not violate the Stack Exchange code of conduct? -- doing you a disservice and not contributing much to your education. – Ron Trunk Jan 12 at 17:28
  • Well, one of possible tests is also what path is chosen when the link is severed and doesn't go back. The actual kind of tests is not really specified yet. The actual thesis is about comparing the protocols in terms of how they work, but actually what I will compare is not specified yet. And no matter what I will compare I seem to have the same problem, so my question still applies. – Michał Zegan Jan 12 at 19:59
  • What path is chosen is completely deterministic and defined by the protocol. No need to "test" it. Ultimately though, your question is too broad for this forum and linux configuration is off-topic here. You could try asking on Super User, but you'll have to narrow down your question. – Ron Trunk Jan 12 at 22:00
  • this question is not really linux specific, that is why I didn't ask on linux related network. As in, I would most likely know what to do with tools I have if I had a general (non linux specific) direction. Also, about choosing paths, will the protocol implementation of most used routing protocols always choose the hmm best path available? whatever is the definition of best. for larger networks, at least. – Michał Zegan Jan 12 at 23:03
  1. You build a network with multiple paths to a destination
  2. You continuously ping the destination
  3. You trigger a network update or outage on one of the paths
  4. You count the number of lost pings
  5. You restore the outage
  6. You count the number of lost pings

Repeat forever with different topologies, routing protocols, and protocol features.

Note that scalability to number of routes is an important feature. BGP is designed to handle hundreds of thousands of routes, and sacrifices some convergence time to do that. Put that many routes in OSPF and it will fail.

Linux boxes can act as routers if they have multiple interfaces, you enable ip routing, and activate or install a routing protocol. But you would need multiple boxes with multiple network interfaces to build a topology.

There is a network simulator called Gns3 which might be usable for this purpose, but I haven’t personally used it.

| improve this answer | |
  • Would virtual machines or even containers be enough for this in your opinion? I don't have enough physical hardware and for some reasons I am not able to use things like GNS3. – Michał Zegan Jan 12 at 20:01
  • VMs are possible if you can control how they network with each other. Your first goal is to build a “router triangle”. @rontrunk warning above is warranted: there is a lot of prior work in this area. Routing protocols are all about redundancy. I’m curious whether this is an undergrad or grad thesis, and whether your topic has to be original. – Darrell Root Jan 12 at 20:11
  • most likely it doesn't, it isn't my invention and I use it more as an excuse to learn about routing protocols in general as I have no opportunity to do that sort of things. I never viewed it as something innovative. – Michał Zegan Jan 12 at 20:13
  • Well I wanted a network of containers because I can run 100 containers on my laptop and not feel that so much. at least in terms of memory consumption. more in cpu and I don't necessarily intent to run so much, but I can definitely run more of them than vms – Michał Zegan Jan 12 at 20:14
  • Ok, moving off topic here but if your project is to learn about routing protocols and it doesn’t need to be original, I’d suggest implementing a “routing protocol listener”. Listen for the protocol (I’d suggest starting with RIPng for IPv6,but move to OSPFv3 if you can). Decode the route advertisements and display what they mean. Ideally this would be in a programming language other than existing implementations (I nominate Swift, which is available for Linux, but you could do java). Excellent books are Routing TCP/IP volume 1 by Jeff Doyle and TCP/IP illustrated volume 1 by Richard Stevens. – Darrell Root Jan 12 at 20:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.