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

    实验步骤

    1.创建以下拓扑(可采用任意方式)

    提交要求:截图证明拓扑的正确性

    2.利用OVS命令下发流表,实现VLAN功能

    参考链接:http://blog.csdn.net/rocson001/article/details/73163041
    提交要求:贴出OVS下发流表的命令

    # 将主机1,2,3进入sw1的包打上vlan tag,转发端口4
    sudo ovs-ofctl -O OpenFlow13 add-flow sw1 priority=1,in_port=1,actions=push_vlan:0x8100,set_field:4096->vlan_vid,output:4
    sudo ovs-ofctl -O OpenFlow13 add-flow sw1 priority=1,in_port=2,actions=push_vlan:0x8100,set_field:4097->vlan_vid,output:4
    sudo ovs-ofctl -O OpenFlow13 add-flow sw1 priority=1,in_port=3,actions=push_vlan:0x8100,set_field:4098->vlan_vid,output:4
    # 将从端口4的包去除vlan tag, 并根据tag进行转发
    sudo ovs-ofctl -O OpenFlow13 add-flow sw1 priority=1,dl_vlan=0,actions=pop_vlan,output:1
    sudo ovs-ofctl -O OpenFlow13 add-flow sw1 priority=1,dl_vlan=1,actions=pop_vlan,output:2
    sudo ovs-ofctl -O OpenFlow13 add-flow sw1 priority=1,dl_vlan=2,actions=pop_vlan,output:3
    # 将主机4,5,6进入sw2的包打上vlan tag,转发端口4
    sudo ovs-ofctl -O OpenFlow13 add-flow sw2 priority=1,in_port=1,actions=push_vlan:0x8100,set_field:4096->vlan_vid,output:4
    sudo ovs-ofctl -O OpenFlow13 add-flow sw2 priority=1,in_port=2,actions=push_vlan:0x8100,set_field:4097->vlan_vid,output:4
    sudo ovs-ofctl -O OpenFlow13 add-flow sw2 priority=1,in_port=3,actions=push_vlan:0x8100,set_field:4098->vlan_vid,output:4
    # 将从端口4的包去除vlan tag, 并根据tag进行转发
    sudo ovs-ofctl -O OpenFlow13 add-flow sw2 priority=1,dl_vlan=0,actions=pop_vlan,output:1
    sudo ovs-ofctl -O OpenFlow13 add-flow sw2 priority=1,dl_vlan=1,actions=pop_vlan,output:2
    sudo ovs-ofctl -O OpenFlow13 add-flow sw2 priority=1,dl_vlan=2,actions=pop_vlan,output:3
    

    3.利用OVS命令查看流表

    参考链接:http://blog.csdn.net/rocson001/article/details/73163041
    提交要求:截图查看步骤2所下发的流表

    4.验证性测试

    截图验证:

    h1--h4互通
    h2--h5互通
    h3--h6互通
    其余主机间无法通信
    如图所示:

    5.Wireshark抓包验证

    提交要求:使用wireshark抓取,包含有VLAN tag的数据包,并截图验证

    如图所示:

  • 相关阅读:
    textspan 转连接
    showDialog 必须Stateful
    SliverList , SliverFixedExtentList
    sliver
    [UWP]UIElement.Clip虽然残废,但它还可以这样玩
    [UWP]用Win2D和CompositionAPI实现文字的发光效果,并制作动画
    [UWP]用Win2D实现镂空文字
    [UWP]通过自定义XamlCompositionBrushBase实现图片平铺
    [UWP]使用Win2D的BorderEffect实现图片的平铺功能
    [UWP]使用CompositionAPI的翻转动画
  • 原文地址:https://www.cnblogs.com/losttrain/p/8057001.html
Copyright © 2011-2022 走看看