3. 配置步骤
(1) Switch A的配置
# 全局启动RSTP。
[Quidway] stp enable
#RSTP全局启动后,各个端口的RSTP默认为启动状态,在不参与RSTP计算的端口上关闭RSTP,注意不要将参与RSTP计算的端口RSTP关闭。(此处仅列举出GigabitEthernet 2/0/4)
[Quidway] interface gigabitethernet 2/0/4
[Quidway-GigabitEthernet2/0/4] stp disable
# 配置Switch A为树根,有两种方法:将Switch A的Bridge优先级配置为0;直接使用命令将Switch A指定为树根。
l 将Switch A的Bridge优先级配置为0
[Quidway] stp priority 0
l 直接使用命令将Switch A指定为树根
[Quidway] stp root primary
# 在各个指定端口上启动根保护功能
[Quidway] interface Gigabitethernet 2/0/1
[Quidway-GigabitEthernet2/0/1] stp root-protection
[Quidway] interface Gigabitethernet 2/0/2
[Quidway-GigabitEthernet2/0/2] stp root-protection
(2) Switch B的配置
# 全局启动RSTP。
[Quidway] stp enable
#RSTP全局启动后,各个端口的RSTP默认为启动状态,在不参与RSTP计算的端口上关闭RSTP,注意不要将参与RSTP计算的端口RSTP关闭。(此处仅列举出Ethernet 0/4)
[Quidway] interface ethernet 0/4
[Quidway-Ethernet0/4] stp disable
# 配置Switch C和Switch B互为备份,将Switch B的Bridge优先级配置为4096。
[Quidway] stp priority 4096
# 在各个指定端口上启动根保护功能
[Quidway] interface ethernet 0/1
[Quidway-Ethernet0/1] stp root-protection
[Quidway] interface ethernet 0/2
[Quidway-Ethernet0/2] stp root-protection
# RSTP的工作模式、时间参数、端口上的参数都采用缺省值。
(3) Switch C的配置
# 全局启动RSTP。
[Quidway] stp enable
# RSTP全局启动后,各个端口的RSTP默认为启动状态,在不参与RSTP计算的端口上关闭RSTP,注意不要将参与RSTP计算的端口RSTP关闭。(此处仅列举出Ethernet 0/4)
[Quidway] interface ethernet 0/4
[Quidway-Ethernet0/4] stp disable
# 配置Switch C和Switch B互为备份,将Switch C的Bridge优先级配置为8192。
[Quidway] stp priority 8192
# 在各个指定端口上启动根保护功能
[Quidway] interface ethernet 0/1
[Quidway-Ethernet0/1] stp root-protection
[Quidway] interface ethernet 0/2
[Quidway-Ethernet0/2] stp root-protection
# RSTP的工作模式、时间参数、端口上的参数都采用缺省值。
(4) Switch D的配置
# 全局启动RSTP。
[Quidway] stp enable
# RSTP全局启动后,各个端口的RSTP默认为启动状态,在不参与RSTP计算的端口上关闭RSTP,注意不要将参与RSTP计算的端口RSTP关闭。(此处仅列举出Ethernet 0/4)
[Quidway] interface ethernet 0/4
[Quidway-Ethernet0/4] stp disable
# 将直接与用户相连的端口(Ethernet 0/1~Ethernet 0/24)配置为边缘端口,并使能BPDU保护功能。(此处仅以Ethernet 0/1为例)
[Quidway] interface ethernet 0/1
[Quidway-Ethernet0/4] stp edged-port enable
[Quidway] stp bpdu-protection
# RSTP的工作模式、时间参数、端口的其他参数都采用缺省值。
另外,HUB不支持生成树算法,应该不能透传 。
本文来自: http://www.ixpub.net/thread-284255-1-5.html