20210329 Bridge ( 二 )
課堂資料
課堂練習
Bridge
cd test-mininet/bridgegedit 5.py 6.py

python 5.pyxterm s1 s2ifconfig
brctl show
ifconfig
brctl show
h1 ping h3 -c 5h2 ping h4 -c 5h1 ping h2
h1 ping h3 -c 5h2 ping h4 -c 5exit
python 6.pyh1 ping h2 -c 5h1 ping h3 -c 5h1 ping h4 -c 5pingall
h1 ping h4 -c 5
exitgedit hub.py
python hub.pyxterm h2h1 ping h3 -c 5exit
Openvswitch-Switch

mkdir mytestcd mytestmn --topo single,2h1 ping h2 -c 5net
ps -aux | grep controllerkill -9 22181ovs-ofctl show s1ovs-ofctl dump-flows s1ovs-ofctl add-flow s1 in_port=1,actions=output:2ovs-ofctl add-flow s1 in_port=2,actions=output:1ovs-ofctl dump-flows s1ovs-ofctl del-flows s1ovs-ofctl dump-flows s1ovs-ofctl add-flow s1 in_port=1,actions=output:2ovs-ofctl add-flow s1 in_port=2,actions=output:1ovs-ofctl del-flows s1 in_port=1
exit
mn --topo single,3h1 ping h2 -c 5h1 ping h2 -c 5
ps -aux | grep controllerkill -9 23876ps -aux | grep controllerovs-ofctl dump-flows s1ovs-ofctl add-flow s1 in_port=1,arp,actions=output:floodovs-ofctl add-flow s1 in_port=2,arp,actions=output:floodovs-ofctl add-flow s1 in_port=3,arp,actions=output:floodovs-ofctl add-flow s1 ip,nw_dst=10.0.0.1,actions=output:1ovs-ofctl add-flow s1 ip,nw_dst=10.0.0.2,actions=output:2ovs-ofctl add-flow s1 ip,nw_dst=10.0.0.3,actions=output:3ovs-ofctl dump-flows s1
Last updated
Was this helpful?



