- 利用mininet创建如下拓扑,要求拓扑支持OpenFlow 1.3协议,主机名、交换机名以及端口对应正确,请给出拓扑Mininet执行结果,展示端口连接情况
==========
端口连接情况
- 直接在Open vSwitch下发流表,用vlan得到下列虚拟网段,请逐条说明所下发的流表含义
==========
S1:
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=1,actions=push_vlan:0x8100,set_field:4097->vlan_vid,output:4
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=2,actions=push_vlan:0x8100,set_field:4098->vlan_vid,output:4
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=3,actions=push_vlan:0x8100,set_field:4099->vlan_vid,output:4
//将三台主机各设在一个vlan网络内(独立的vid),s1的数据包打上vlan tag从端口4向s2转发
sudo ovs-ofctl add-flow s1 in_port=4,dl_vlan=1,actions=strip_vlan,output:1
sudo ovs-ofctl add-flow s1 in_port=4,dl_vlan=2,actions=strip_vlan,output:2
sudo ovs-ofctl add-flow s1 in_port=4,dl_vlan=3,actions=strip_vlan,output:3
//接受从s2传来的数据包,去除vlan tag,分别根据dl_vlan(数据包原始的 VLAN ID)传送给同一vlan网络内的主机
S2:
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
- 直接在Open vSwitch查看流表,提交OVS命令执行结果
==========
S1:
S2:
-
提交主机连通性测试结果,验证流表的有效性
==========
-
利用Wireshark抓包,分析验证特定报文
==========