1.利用mininet创建如下拓扑,要求拓扑支持OpenFlow 1.3协议,主机名、交换机名以及端口对应正确,请给出拓扑Mininet执行结果,展示端口连接情况
1.1创建拓扑
1.2执行结果
1.3展示网络信息(包括端口)
1.4展示端口连接情况
2.直接在Open vSwitch下发流表,实现如下连通性要求,请逐条说明所下发的流表含义
2.1s1流表
#s1将从端口号为1,2,3的主机发来的数据贴上相同的vlan tag,然后从4端口发往s2(vlan_id从0开始) sudo ovs-ofctl -O OpenFlow13 add-flow s1 priority=1,in_port=1,actions=push_vlan:0x8100,set_field:4096-\>vlan_vid,output:4 sudo ovs-ofctl -O OpenFlow13 add-flow s1 priority=1,in_port=2,actions=push_vlan:0x8100,set_field:4097-\>vlan_vid,output:4 sudo ovs-ofctl -O OpenFlow13 add-flow s1 priority=1,in_port=3,actions=push_vlan:0x8100,set_field:4098-\>vlan_vid,output:4 #s1将接收到的数据包去除vlan tag,然后根据dl_vlan(数据包原始的vlan_id),向指定端口转发 sudo ovs-ofctl -O OpenFlow13 add-flow s1 priority=1,dl_vlan=0,actions=pop_vlan,output:1 sudo ovs-ofctl -O OpenFlow13 add-flow s1 priority=1,dl_vlan=1,actions=pop_vlan,output:2 sudo ovs-ofctl -O OpenFlow13 add-flow s1 priority=1,dl_vlan=2,actions=pop_vlan,output:3
2.2s2流表
#同上所述 sudo ovs-ofctl -O OpenFlow13 add-flow s2 priority=1,in_port=1,actions=push_vlan:0x8100,set_field:4096-\>vlan_vid,output:4 sudo ovs-ofctl -O OpenFlow13 add-flow s2 priority=1,in_port=2,actions=push_vlan:0x8100,set_field:4097-\>vlan_vid,output:4 sudo ovs-ofctl -O OpenFlow13 add-flow s2 priority=1,in_port=3,actions=push_vlan:0x8100,set_field:4098-\>vlan_vid,output:4 sudo ovs-ofctl -O OpenFlow13 add-flow s2 priority=1,dl_vlan=0,actions=pop_vlan,output:1 sudo ovs-ofctl -O OpenFlow13 add-flow s2 priority=1,dl_vlan=1,actions=pop_vlan,output:2 sudo ovs-ofctl -O OpenFlow13 add-flow s2 priority=1,dl_vlan=2,actions=pop_vlan,output:3
3.直接在Open vSwitch查看流表,提交OVS命令执行结果
3.1查询s1流表
sudo ovs-ofctl -O OpenFlow13 dump-flows s1
3.2查询s2流表
sudo ovs-ofctl -O OpenFlow13 dump-flows s2
4.提交主机连通性测试结果,验证流表的有效性
4.1测试其连通性
pingall
5.利用Wireshark抓包,分析验证特定报文
最好使用终端管理员模式打开,不然可能会报错(我百度到的办法都没能解决)