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:

    抓包:

  • 相关阅读:
    【算法总结】多项式相关
    【算法总结】积性函数相关
    【算法总结】概率与期望相关
    【算法总结】博弈论相关
    【算法总结】线性代数相关
    【算法总结】根号算法相关
    【算法总结】计算几何相关
    【算法总结】组合数学相关
    【算法总结】字符串相关
    【算法总结】数论相关
  • 原文地址:https://www.cnblogs.com/bokers/p/8047630.html
Copyright © 2011-2022 走看看