Run it and add flow rules
Run the topology:
sudo python3 simple_topo.py
pingall will fail — no rules. Add them from a second terminal:
sudo ovs-ofctl -O OpenFlow13 add-flow s1 \
ip,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=output:2
sudo ovs-ofctl -O OpenFlow13 add-flow s1 \
ip,nw_src=10.0.0.2,nw_dst=10.0.0.1,actions=output:1
mininet> h1 ping -c 3 h2 # now works
net.staticArp() preloads ARP entries, so the IP rules above are enough for this example.
Before adding rules, run ovs-ofctl -O OpenFlow13 show s1 once so the port numbers match your setup.
Use this structure Every topology follows the same pattern: add nodes -> add links -> start() -> interact -> stop().