Static router
Let us start by building a multi-device network statically. By static, I mean we will program static flows in the routers to make our topology work, which is similar to a statically routed device. Obviously, building something by hand is not very scalable, just like we do not use static routes in a production environment, but it is a great way to learn how to program a Ryu-based OpenFlow router. Note that I will use the terms switch and router interchangeably. In Mininet, the devices are by default switches with s1
, s2
, and so on; however, since we are performing routing functions via software and flow, they are also routers in my opinion.
Here is the simple topology that we will build:
Static router topology
Let's see how we can build this topology with Mininet.
Mininet topology
Mininet provides a convenient way for building multi-device linear topologies with the--topo linear
option:
$ sudo mn --topo linear,2 --mac --controller remote --switch ovsk ... mininet> links h1...