• vlan+链路聚合实验


     

     12台pc机在192.168.168.1.0/24  ,在同一网段不用配置网关,每台pc机以他的序列号作为它的IP地址最后一位

    lsw1配置

    1. vlan batch 10
    2. interface GigabitEthernet0/0/1
    3. port link-type trunk
    4. port trunk allow-pass vlan 10
    5. #
    6. interface GigabitEthernet0/0/2
    7. port link-type access
    8. port default vlan 10
    9. #
    10. interface GigabitEthernet0/0/3
    11. port link-type access
    12. port default vlan 10

     lsw2配置

    1. vlan batch 20
    2. interface GigabitEthernet0/0/1
    3. port link-type trunk
    4. port trunk allow-pass vlan 20
    5. #
    6. interface GigabitEthernet0/0/2
    7. port link-type access
    8. port default vlan 20
    9. #
    10. interface GigabitEthernet0/0/3
    11. port link-type access
    12. port default vlan 20

    lsw3配置

    1. vlan batch 30
    2. interface GigabitEthernet0/0/1
    3. port link-type trunk
    4. port trunk allow-pass vlan 30
    5. #
    6. interface GigabitEthernet0/0/2
    7. port link-type access
    8. port default vlan 30
    9. #
    10. interface GigabitEthernet0/0/3
    11. port link-type access
    12. port default vlan 30

    lsw4配置

    1. vlan batch 10
    2. interface GigabitEthernet0/0/1
    3. port link-type trunk
    4. port trunk allow-pass vlan 10
    5. #
    6. interface GigabitEthernet0/0/2
    7. port link-type access
    8. port default vlan 10
    9. #
    10. interface GigabitEthernet0/0/3
    11. port link-type access
    12. port default vlan 10

    lsw5配置

    1. vlan batch 20
    2. interface GigabitEthernet0/0/1
    3. port link-type trunk
    4. port trunk allow-pass vlan 20
    5. #
    6. interface GigabitEthernet0/0/2
    7. port link-type access
    8. port default vlan 20
    9. #
    10. interface GigabitEthernet0/0/3
    11. port link-type access
    12. port default vlan 20

    lsw6配置

     

    1. vlan batch 30
    2. interface GigabitEthernet0/0/1
    3. port link-type trunk
    4. port trunk allow-pass vlan 30
    5. #
    6. interface GigabitEthernet0/0/2
    7. port link-type access
    8. port default vlan 30
    9. #
    10. interface GigabitEthernet0/0/3
    11. port link-type access
    12. port default vlan 30

     lsw7配置

    1. <Huawei>
    2. <Huawei>sys
    3. [Huawei]sysn
    4. [Huawei]sysname lsw7
    5. [lsw7]vlan batch 10 20 30
    6. [lsw7]int g0/0/1
    7. [lsw7-GigabitEthernet0/0/1]port link-type trunk
    8. [lsw7-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
    9. [lsw7-GigabitEthernet0/0/1]int g0/0/2
    10. [lsw7-GigabitEthernet0/0/2]port link-type trunk
    11. [lsw7-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
    12. [lsw7-GigabitEthernet0/0/2]int g0/0/3
    13. [lsw7-GigabitEthernet0/0/3]port link-type trunk
    14. [lsw7-GigabitEthernet0/0/3]port trunk allow-pass vlan 30
    15. [lsw7-GigabitEthernet0/0/3]q
    16. [lsw7]int Eth-Trunk 1
    17. [lsw7-Eth-Trunk1]t
    18. [lsw7-Eth-Trunk1]trunkport g 0/0/4 to 0/0/9
    19. [lsw7-Eth-Trunk1]port link-type trunk
    20. [lsw7-Eth-Trunk1]port trunk allow-pass vlan all

     lsw8配置

    1. <Huawei>
    2. <Huawei>sys
    3. [Huawei]sysn
    4. [Huawei]sysname lsw8
    5. [lsw8]vlan batch 10 20 30
    6. [lsw8]int g0/0/1
    7. [lsw8-GigabitEthernet0/0/1]port link-type trunk
    8. [lsw8-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
    9. [lsw8-GigabitEthernet0/0/1]int g0/0/2
    10. [lsw8-GigabitEthernet0/0/2]port link-type trunk
    11. [lsw8-GigabitEthernet0/0/2]port trunk allow-pass vlan 20
    12. [lsw8-GigabitEthernet0/0/2]int g0/0/3
    13. [lsw8-GigabitEthernet0/0/3]port link-type trunk
    14. [lsw8-GigabitEthernet0/0/3]port trunk allow-pass vlan 30
    15. [lsw8-GigabitEthernet0/0/3]q
    16. [lsw8]int Eth-Trunk 1
    17. [lsw8-Eth-Trunk1]t
    18. [lsw8-Eth-Trunk1]trunkport g 0/0/4 to 0/0/9
    19. [lsw8-Eth-Trunk1]port link-type trunk
    20. [lsw8-Eth-Trunk1]port trunk allow-pass vlan all

     验证实验效果

     发现相同vlan能通信,不同vlan不能通信

  • 相关阅读:
    Day714. switch表达式 -Java8后最重要新特性
    Qt Socket 通讯示例2
    systrace/perfetto如何看surfaceflinger的vsync信号方法-android framework实战车载手机系统开发
    元宇宙大投资 & 元宇宙通证
    搜狗百科词条创建报价为何跨度这么大?
    JS(第二十四课)JS高级Es6语法
    jar添加jre运行环境,即是电脑没有安装jdk也可以运行
    1.8、习题1-体系结构相关真题
    软件测试---产品需求文档测试
    主成分分析PCA原理以及特征
  • 原文地址:https://blog.csdn.net/qq_61759561/article/details/132988043