sdn第二次作业
1. 利用mininet创建如下拓扑,要求拓扑支持OpenFlow 1.3协议,主机名、交换机名以及端口对应正确,请给出拓扑Mininet执行结果,展示端口连接情况
2. 直接在Open vSwitch下发流表,用vlan得到下列虚拟网段,请逐条说明所下发的流表含义
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=1,actions=push_vlan:0x8100,set_field:4097-\>vlan_vid,output:4//将交换机s1从端口1收到的报文打上vid = 1 的vlantag并从端口4发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=2,actions=push_vlan:0x8100,set_field:4098-\>vlan_vid,output:4//将交换机s1从端口2收到的报文打上vid = 2 的vlantag并从端口4发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=3,actions=push_vlan:0x8100,set_field:4099-\>vlan_vid,output:4//将交换机s1从端口3收到的报文打上vid = 3 的vlantag并从端口4发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=4,dl_vlan=1,actions=strip_vlan,output:1//将s1从端口4收到的vlan_id=1的报文拆除vlan_tag并从端口1发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=4,dl_vlan=2,actions=strip_vlan,output:2//将s1从端口4收到的vlan_id=2的报文拆除vlan_tag并从端口2发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s1 in_port=4,dl_vlan=3,actions=strip_vlan,output:3//将s1从端口4收到的vlan_id=3的报文拆除vlan_tag并从端口3发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s2 in_port=1,actions=push_vlan:0x8100,set_field:4097-\>vlan_vid,output:4//将交换机s2从端口1收到的报文打上vid = 1 的vlantag并从端口4发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s2 in_port=2,actions=push_vlan:0x8100,set_field:4098-\>vlan_vid,output:4//将交换机s2从端口2收到的报文打上vid = 2 的vlantag并从端口4发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s2 in_port=3,actions=push_vlan:0x8100,set_field:4099-\>vlan_vid,output:4//将交换机s2从端口3收到的报文打上vid = 3 的vlantag并从端口4发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s2 in_port=4,dl_vlan=1,actions=strip_vlan,output:1//将s2从端口4收到的vlan_id=1的报文拆除vlan_tag并从端口1发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s2 in_port=4,dl_vlan=2,actions=strip_vlan,output:2//将s2从端口4收到的vlan_id=2的报文拆除vlan_tag并从端口2发送出去
sudo ovs-ofctl add-flow -O OpenFlow13 s2 in_port=4,dl_vlan=3,actions=strip_vlan,output:3//将s2从端口4收到的vlan_id=3的报文拆除vlan_tag并从端口3发送出去
3.直接在Open vSwitch查看流表,提交OVS命令执行结果
4. 提交主机连通性测试结果,验证流表的有效性
5. 利用Wireshark抓包,分析验证特定报文
抓取eth4端口报文,将icmp报文筛选出来
只有id相同的才可以相互通信