zoukankan      html  css  js  c++  java
  • SDN第三次上机作业

    1.建立拓扑结构如下:

    pingall:

    2.下发如下流表

    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
    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
    
    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.查看流表:

    sudo ovs-ofctl -O OpenFlow13 dump-flows s1
    
    sudo ovs-ofctl -O OpenFlow13 dump-flows s2
    

      

    4.验证性测试

    pingall:

    抓包:

  • 相关阅读:
    leetcode刷题 557~
    Unity正交相机智能包围物体(组)方案
    Embedded Browser(ZFBrowser)使用相关问题
    Unity性能优化
    sipp的使用
    Elment清除表单验证,防止报错小技巧
    git常用命令(干货)
    文本单词one-hot编码
    86. 分隔链表 链表
    5638. 吃苹果的最大数目 优先队列
  • 原文地址:https://www.cnblogs.com/bokers/p/8047630.html
Copyright © 2011-2022 走看看