mn --version
Note: sometime we mistakenly closed the mininet shell, or mininet crashed. But the topology components will continue to exists. To clean such stuff, cleanup command is used.
mn -c
Topology with Single Switch and 4 Nodes.
RYU SDN Controller
ryu-manager ryu.app.simple_switch_13
Mininet Topology
sudo mn --controller=remote,ip=127.0.0.1 --mac -i 10.1.1.0/24 --switch=ovsk,protocols=OpenFlow13 --topo=single,4
options | Description |
---|---|
--controller | type of controller local/remote and remote controller ip. |
--mac | mac address starts with 00:00:00:00:00:01 |
-i | IP Subnets for the Topology |
--switch | Switch type (ovsk - openvswitch kernel module), and openflow version. |
--topo | topology type(linear,minimal,reversed,single,torus,tree) and params. |
Informative commands
help
dump
net
links
Action commands
pingall
<node-name> <command> {args}
h1 ifconfig
h1 ping h2
h1 ip route
linear topology (where each switch has one host, and all switches connect in a line)
sudo mn --controller=remote,ip=127.0.0.1 --mac -i 10.1.1.0/24 --switch=ovsk,protocols=OpenFlow13 --topo=linear,4
sudo mn --controller=remote,ip=127.0.0.1 --mac -i 10.1.1.0/24 --topo=tree,depth=2,fanout=3
fanout : each switch is connected to these many childs depth : depth of the tree