• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

用Ensp来模拟MSTP,交换机指定生成树,主备交换机配置

武飞扬头像
404谜
帮助1

构建实验拓扑

学新通

实验思路:在4台交换机上分别创建一个相同的MST域,然后指定不同vlan的根网桥。这里分别用SW1和SW3作为vl10与vl20的根网桥,实现负载均衡。

LWS1配置

[Huawei]stp region-configuration    //进入MST视图

[Huawei-mst-region]region-name q1        //创建一个名为q1的区域

[Huawei-mst-region]instance 1 vl 10    //将vlan10生成一个生成树

[Huawei-mst-region]instance 2 vlan 20     //将vlan20生成一个生成树

[Huawei-mst-region]active region-configuration  //活MST域配置

[Huawei-mst-region]q

设置主备交换机

[Huawei]stp instance 1 root primary

[Huawei]stp instance 2 root secondary

[Huawei]stp pathcost-standard legacy

[Huawei]stp enable

[Huawei-Ethernet0/0/2]stp root-protection

[Huawei-Ethernet0/0/2]q

创建多个vlan,并且对应接口绑定不同的链路

[Huawei]vl batch 10 20

[Huawei]int e0/0/2

[Huawei-Ethernet0/0/2]port link tr

[Huawei-Ethernet0/0/2]port tr al vl al

[Huawei-Ethernet0/0/2]int e0/0/3

[Huawei-Ethernet0/0/3]port link tr

[Huawei-Ethernet0/0/3]port tr al vl al

[Huawei-Ethernet0/0/3]q

查询stp状态

[Huawei]display stp brief

 MSTID  Port                        Role  STP State     Protection

   0    Ethernet0/0/1               DESI  FORWARDING      NONE

   0    Ethernet0/0/2               DESI  FORWARDING      ROOT

   0    Ethernet0/0/3               ROOT  FORWARDING      NONE

   1    Ethernet0/0/2               DESI  FORWARDING      ROOT

   1    Ethernet0/0/3               DESI  FORWARDING      NONE

   2    Ethernet0/0/2               DESI  FORWARDING      ROOT

   2    Ethernet0/0/3               ROOT  FORWARDING      NONE

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]port link tr

[Huawei-Ethernet0/0/1]port tr al vl al

[Huawei-Ethernet0/0/1]q

[Huawei]q

LSW3配置

[Huawei]stp region-configuration

[Huawei-mst-region]region-name q1

[Huawei-mst-region]instance 1 vl 10

[Huawei-mst-region]instance 2 vl 20

[Huawei-mst-region]active region-configuration

[Huawei-mst-region]q  

[Huawei]stp instance 2 root primary

[Huawei]stp instance 1 root secondary

[Huawei]stp pathcost-standard legacy

[Huawei]stp enable

[Huawei]int e0/0/2

[Huawei-Ethernet0/0/2]stp root-protection

[Huawei-Ethernet0/0/2]q

[Huawei]vlan batch 10 20

[Huawei]int e0/0/3

[Huawei-Ethernet0/0/3]port link tr

[Huawei-Ethernet0/0/3]port tr al vl al

[Huawei-Ethernet0/0/3]int e0/0/2

[Huawei-Ethernet0/0/2]port link tr

[Huawei-Ethernet0/0/2]port tr al vl al

[Huawei-Ethernet0/0/2]int e0/0/1

[Huawei-Ethernet0/0/1]port link tr

[Huawei-Ethernet0/0/1]port tr al vl al

[Huawei-Ethernet0/0/1]q

Lsw2配置

[Huawei]stp region-configuration

[Huawei-mst-region]region-name q1

[Huawei-mst-region]instance 1 vl 10

[Huawei-mst-region]instance 2 vl 20

[Huawei-mst-region]active region-configuration

[Huawei-mst-region]q

[Huawei]stp pathcost-standard legacy

[Huawei]int e0/0/2

[Huawei-Ethernet0/0/2]stp instance 1 cost 20000

[Huawei-Ethernet0/0/2]q

[Huawei]stp en   

[Huawei]stp enable

[Huawei]int e0/0/3

[Huawei-Ethernet0/0/3]stp disable

[Huawei-Ethernet0/0/3]q

[Huawei]vl batch 10 20

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]port link tr

[Huawei-Ethernet0/0/1]port tr al vl al

[Huawei-Ethernet0/0/1]int e0/0/2

[Huawei-Ethernet0/0/2]port link tr

[Huawei-Ethernet0/0/2]port tr al vl al

[Huawei-Ethernet0/0/2]int e0/0/3

[Huawei-Ethernet0/0/3]port link ac

[Huawei-Ethernet0/0/3]port de vl 10

[Huawei-Ethernet0/0/3]q

[Huawei]display stp brief

LSW4配置

[Huawei]stp region-configuration

[Huawei-mst-region]region-name q1

[Huawei-mst-region]instance 1 vl 10

[Huawei-mst-region]instance 2 vl 20

[Huawei-mst-region]active region-configuration

[Huawei-mst-region]q

[Huawei]stp pathcost-standard legacy

[Huawei]int e0/0/2

[Huawei-Ethernet0/0/2]stp instance 2 cost 20000

[Huawei-Ethernet0/0/2]q

[Huawei]stp enable

[Huawei]int e0/0/3

[Huawei-Ethernet0/0/3]stp disable

[Huawei-Ethernet0/0/3]q

[Huawei]vlan batch 10 20

[Huawei]int e0/0/1

[Huawei-Ethernet0/0/1]port link tr

[Huawei-Ethernet0/0/1]port tr al vl al

[Huawei-Ethernet0/0/1]int e0/0/2

[Huawei-Ethernet0/0/2]port link tr

[Huawei-Ethernet0/0/2]port tr al vl al

[Huawei-Ethernet0/0/2]int e0/0/3

[Huawei-Ethernet0/0/3]port link ac

[Huawei-Ethernet0/0/3]port de vl 20

[Huawei-Ethernet0/0/3]q

[Huawei]display stp brief

 MSTID  Port                        Role  STP State     Protection

   0    Ethernet0/0/1               ROOT  FORWARDING      NONE

   0    Ethernet0/0/2               DESI  FORWARDING      NONE

   1    Ethernet0/0/1               ROOT  FORWARDING      NONE

   1    Ethernet0/0/2               ALTE  DISCARDING      NONE

   2    Ethernet0/0/1               ROOT  FORWARDING      NONE

   2    Ethernet0/0/2               DESI  FORWARDING      NONE

R1配置

[Huawei]int g0/0/0.1

[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 10

[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable

[Huawei-GigabitEthernet0/0/0.1]ip add 1.1.1.1 24

[Huawei-GigabitEthernet0/0/0.1]q

[Huawei]int g0/0/1.1

[Huawei-GigabitEthernet0/0/1.1]dot1q termination vid 20

[Huawei-GigabitEthernet0/0/1.1]arp broadcast enable

[Huawei-GigabitEthernet0/0/1.1]ip add 2.1.1.1 24

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhggbgah
系列文章
更多 icon
同类精品
更多 icon
继续加载