华为设备配置MSTP(华为设备配置ssh)

网友投稿 340 2022-09-19


华为设备配置MSTP(华为设备配置ssh)

1. 配置MSTP基本功能

(1)配置MST域和创建实例

[LSW1]vlan batch 2 to 20

[LSW1]stp region-configuration

[LSW1-mst-region]region-name a1

[LSW1-mst-region]instance 1 vlan 2 to 10

[LSW1-mst-region]instance 2 vlan 11 to 20

[LSW1-mst-region]active region-configuration

[LSW2]vlan batch 2 to 20

[LSW2]stp region-configuration

[LSW2-mst-region]region-name a1

[LSW2-mst-region]instance 1 vlan 2 to 10

[LSW2-mst-region]instance 2 vlan 11 to 20

[LSW2-mst-region]active region-configuration

[LSW3]stp region-configuration

[LSW3-mst-region]region-name a1

[LSW3-mst-region]instance 1 vlan 2 to 10

[LSW3-mst-region]instance 2 vlan 11 to 20

[LSW3-mst-region]active region-configuration

[LSW4]stp region-configuration

[LSW4-mst-region]region-name a1

[LSW4-mst-region]instance 1 vlan 2 to 10

[LSW4-mst-region]instance 2 vlan 11 to 20

[LSW4-mst-region]active region-configuration

(2)在域内配置实例的根桥与备份根桥

[LSW1]stp instance 1 root primary

[LSW1]stp instance 2 root secondary

[LSW2]stp instance 1 root secondary

[LSW2]stp instance 2 root primary

(3)配置实例中将要被阻塞端口的路径开销值大于缺省值(华为计算方法)

[LSW3]stp pathcost-standard legacy

[LSW3-GigabitEthernet0/0/4]stp instance 2 cost 20000

[LSW4]stp pathcost-standard legacy

[LSW4-GigabitEthernet0/0/3]stp instance 1 cost 20000

(4)使能MSTP,实现破除环路

[LSW1]stp enable

[LSW2]stp enable

[LSW3]stp enable

[LSW4]stp enable

(5)将与PC相连的端口设置为边缘端口

[LSW3-GigabitEthernet0/0/2]stp edged-port enable

[LSW3]stp bpdu-protection  //配置BPDU保护功能

[LSW4-GigabitEthernet0/0/1]stp edged-port enable

[LSW4]stp bpdu-protection

2. 配置根保护功能

[LSW1-GigabitEthernet0/0/3]stp root-protection

[LSW2-GigabitEthernet0/0/4]stp root-protection

3. 配置处于环网中的设备的二层转发功能

[LSW1-GigabitEthernet0/0/3]port link-type trunk

[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 20

[LSW1]int Eth-Trunk 1  //配置Eth-Trunk接口

[LSW1-Eth-Trunk1]trunkport g0/0/2

[LSW1-Eth-Trunk1]trunkport g0/0/4

[LSW1-Eth-Trunk1]port link-type trunk

[LSW1-Eth-Trunk1]port trunk allow-pass vlan 2 to 20

[LSW2-GigabitEthernet0/0/4]port link-type trunk

[LSW2-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 to 20

[LSW2]int Eth-Trunk 1

[LSW2-Eth-Trunk1]trunkport g0/0/1

[LSW2-Eth-Trunk1]trunkport g0/0/3

[LSW2-Eth-Trunk1]port link-type trunk

[LSW2-Eth-Trunk1]port trunk allow-pass vlan 2 to 20

[LSW3]vlan batch 2 to 20

[LSW3-GigabitEthernet0/0/2]port link-type access

[LSW3-GigabitEthernet0/0/2]port default vlan 2

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

[LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 20

[LSW3-GigabitEthernet0/0/4]port link-type trunk

[LSW3-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 to 20

[LSW4]vlan batch 2 to 20

[LSW4-GigabitEthernet0/0/1]port link-type access

[LSW4-GigabitEthernet0/0/1]port default vlan 11

[LSW4-GigabitEthernet0/0/3]port link-type trunk

[LSW4-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 20

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

[LSW4-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 to 20

4. 验证配置


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:使用spring的restTemplate注意点
下一篇:华为设备MSTP配置命令(华为pat配置命令)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~