zoukankan      html  css  js  c++  java
  • MSTP生成树实验

    1、 客户机和路由器配置ip地址

    R1:

    [Huawei]sysname R1

    [R1]int e0/0/0

    [R1-Ethernet0/0/0]ip add 10.1.10.254 24

    [R1-Ethernet0/0/0]undo shutdown

    [R1-Ethernet0/0/0]int e0/0/1

    [R1-Ethernet0/0/1]ip add 10.1.20.254 24

    [R1-Ethernet0/0/1]undo shutdown

    [R1-Ethernet0/0/1]quit

    2、 配置vlan和trunk

    S1:

    [Huawei]sysname S1

    [S1]vlan batch 10 20

    [S1]int g0/0/2

    [S1-GigabitEthernet0/0/2]port link-type trunk

    [S1-GigabitEthernet0/0/2]port trunk allow-pass vlan all

    [S1-GigabitEthernet0/0/2]int g0/0/1

    [S1-GigabitEthernet0/0/1]port link-type trunk

    [S1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

    [S1-GigabitEthernet0/0/1]int g0/0/3

    [S1-GigabitEthernet0/0/3]port link-type hybrid

    [S1-GigabitEthernet0/0/3]port hybrid untagged vlan 10

    [S1-GigabitEthernet0/0/3]port hybrid pvid vlan 10

    [S1-GigabitEthernet0/0/3]quit

    S2:

    [Huawei]sysname S2

    [S2]vlan batch 10 20

    [S2]int g0/0/2

    [S2-GigabitEthernet0/0/2]port link-type trunk

    [S2-GigabitEthernet0/0/2]port trunk allow-pass vlan all

    [S2-GigabitEthernet0/0/2]int g0/0/1

    [S2-GigabitEthernet0/0/1]port link-type trunk

    [S2-GigabitEthernet0/0/1]port trunk allow-pass vlan all

    [S2-GigabitEthernet0/0/1]int g0/0/3

    [S2-GigabitEthernet0/0/3]port link-type hybrid

    [S2-GigabitEthernet0/0/3]port hybrid untagged vlan 20

    [S2-GigabitEthernet0/0/3]port hybrid pvid vlan 20

    [S2-GigabitEthernet0/0/3]quit

    S3:

    [Huawei]sysname S3

    [S3]vlan batch 10 20

    [S3]int g0/0/3

    [S3-GigabitEthernet0/0/3]port link-type access

    [S3-GigabitEthernet0/0/3]port default vlan 10

    [S3-GigabitEthernet0/0/3]int g0/0/4

    [S3-GigabitEthernet0/0/4]port link-type access

    [S3-GigabitEthernet0/0/4]port default vlan 20

    [S3-GigabitEthernet0/0/4]int g0/0/1

    [S3-GigabitEthernet0/0/1]port link-type trunk

    [S3-GigabitEthernet0/0/1]port trunk allow-pass vlan all

    [S3-GigabitEthernet0/0/1]int g0/0/2

    [S3-GigabitEthernet0/0/2]port link-type trunk

    [S3-GigabitEthernet0/0/2]port trunk allow-pass vlan all

    [S3-GigabitEthernet0/0/2]quit

    配置MSTP

    S1

    [S1]stp mode mstp

    [S1]stp region-configuration

    [S1-mst-region]region-name huawei

    [S1-mst-region]revision-level 1

    [S1-mst-region]instance 1 vlan 10

    [S1-mst-region]instance 2 vlan 20

    [S1-mst-region]active region-configuration

    [S1-mst-region]quit

    [S1]stp instance 1 root primary

    [S1]stp instance 2 root secondary

    S2

    [S2]stp mode mstp

    [S2]stp region-configuration

    [S2-mst-region]region-name huawei

    [S2-mst-region]revision-level 1

    [S2-mst-region]instance 1 vlan 10

    [S2-mst-region]instance 2 vlan 20

    [S2-mst-region]active region-configuration

    [S2-mst-region]quit

    [S2]stp instance 1 root secondary

    [S2]stp instance 2 root primary

    S3

    [S3]stp mode mstp

    [S3]stp region-configuration

    [S3-mst-region]reg

    [S3-mst-region]region-name huawei

    [S3-mst-region]revision-level 1

    [S3-mst-region]instance 1 vlan 10

    [S3-mst-region]instance 2 vlan 20

    [S3-mst-region]active region-configuration

    [S3-mst-region]quit

    验证:

    [S3]display stp brief

  • 相关阅读:
    [状压DP][二分]JZOJ 3521 道路覆盖
    字符串操作
    练习: 判断一个数是否为小数
    Python 深浅拷贝
    编码
    python中的 == 和 is 的区别
    Python3 字典的增删改查
    Python3 列表的基本操作
    初识 Python
    方法的入门
  • 原文地址:https://www.cnblogs.com/ccshi/p/13140234.html
Copyright © 2011-2022 走看看