• 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:

    抓包:

  • 相关阅读:
    JSP的组成
    什么是JSP
    JSP和Servlet分工图
    Linux逻辑卷管理LVM2详解
    ESXi主机和NTP server快速进行时间同步
    VMwareCLI命令参考
    使用Logminer工具分析DML和DDL操作
    TKPROF使用
    iSCSI存储设备的udev绑定 以及iscsi重启卡住解决方法
    Oracle 10g EM证书问题
  • 原文地址:https://www.cnblogs.com/bokers/p/8047630.html
Copyright © 2020-2023  润新知