Containernet is a fork of Mininet that supports Docker containers as hosts. It's great for testing network topologies with real software stacks running inside Docker.
In these particular examples we explore static vs dynamic routing.
-
OvS (Open vSwitch) installed https://docs.openvswitch.org/en/latest/intro/install/
-
Docker installed https://docker.com
-
Make sure you have
net.ipv4.ip_forwardenabled on your host:
sysctl -w net.ipv4.ip_forward=1
You can use the wrapper script:
# to cleanup old networks
./start.sh --clean
# to start static example
./start.sh --static
# to start dynamic example
./start.sh --dynamic
# to force start any example by cleaning old networks
./start.sh --dynamic --cleanYou can find the source of the scripts in the scripts folder.
Adding routes statically, we are able to ping h2 from h1.
Routing dynamically using Quagga and Rip works by using RIP on the interfaces defined by containernet.
You can also use vtysh in order to connect to quagga from containernet cli.
containernet> r1 vtysh




