》打开或关闭STP
Catalyst 3548(Csico IOS系统)
命令格式:spanning-treevlan
nospanning-tree vlan
Switch-PHY-3548(config)#spanning-tree vlan 3
Switch-PHY-3548(config)#no spanning-tree vlan 3
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:set spantree enable //启用STP
set spantree disable //关闭STP
Switch-PHY-6500>(enable)set spantree enable 3
VLAN 3 bridgespanning tree enabled
Switch-PHY-6500>(enable)
Switch-PHY-6500>(enable)set spantree disable 3
VLAN 3 bridgespanning tree disable
Switch-PHY-6500>(enable)
》配置根网桥和备份根网桥
Catalyst 3548(Csico IOS系统)
命令格式:spanning-treevlan
Switch-PHY-3548(config)#spanning-tree vlan 3 root primary
Switch-PHY-3548(config)#
命令格式:spanning-treevlan
Switch-PHY-3548(config)#spanning-tree vlan 3 root secondary
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:setspantree root
Switch-PHY-6500>(enable)set spantree root 1,200-204
VLANS1,200-204 bridge priority set to 8189.
VLANS1,200-204 bridge max aging time set to 20.
VLANS1,200-204 bridge hello time set to 2.
VLANS1,200-204 bridge forward delay set to 15.
Switch isnow the root switch for active VLANS 1,200-204.
Switch-PHY-6500>(enable)
命令格式:setspantree root secondary
Switch-PHY-6500>(enable)set spantree root secondary 1,200-204
VLANS1,200-204 bridge priority set to 8189.
VLANS1,200-204 bridge max aging time set to 20.
VLANS1,200-204 bridge hello time set to 2.
VLANS 1,200-204 bridge forward delay set to15.
Switch isnow the root switch for active VLANS 1,200-204.
Switch-PHY-6500>(enable)
》配置生成树优先级(取值范围是0-61440,增量是4096)
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:spanning-treevlan
Switch-PHY-3548(config)#spanning-treevlan 3 priority 8192
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:setspantree priority
Switch-PHY-6500>(enable)set spantree priority 8192
spantree bridgepriority set to 8192.
Switch-PHY-6500>(enable)
》配置BackboneFast生成树可选功能
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:spanning-treebackbonefast //允许backbonefast功能
Switch-PHY-3548(config)#spanning-tree backbonefast
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:setspantree backbonefast enable //允许backbonefast功能
命令格式:setspantree backbonefast disable //不允许backbonefast功能
Switch-PHY-6500>(enable)set spantree backbonefast enable
Switch-PHY-6500>(enable)
》配置UplinkFast生成树可选功能
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:spanning-treeuplinkfast
spanning-tree uplinkfast max-update-rate <0-32000>
//注:max-update-rate的值是0-32000,单位是packet/s(每秒更新的包数)
Switch-PHY-3548(config)#spanning-tree uplinkfast 32000
Switch-PHY-3548(config)#spanning-tree uplinkfast
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:setspantree uplinkfast enable
setspantree uplinkfast enable rate
//注:
Switch-PHY-6500>(enable)set spantree uplinkfastenable
VLANs 1-1005bridge priorityset to 49152.
The port costand portvlancost of all ports set to above 3000.
Station update rate set to 15 packets/100ms,
Uplinkfast all-portocols field set to off.
Uplinkfastenable for bridge.
Switch-PHY-6500>(enable)
Switch-PHY-6500>(enable)set spantreeuplinkfast enable rate 40
VLANs 1-4096bridge priorityset to 49152.
The port costand portvlancost of all ports set to above 3000.
Station update rate set to 40 packets/100ms,
Uplinkfast all-portocols field set to off.
Uplinkfastenable for bridge.
Switch-PHY-6500>(enable)
》配置PortFast生成树可选功能
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:spanning-treeportfast default
Switch-PHY-3548(config)#spanning-tree portfast default
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:setspantree portfast
setspantree portfast
setspantree portfast
Switch-PHY-6500>(enable)set spantree portfast3/2 enable
Warning:Connecting Layer 2 devices to a fast start port can cause
temporaryspanning tree loops.Use with caution.
Spantree ports3/2fast start enabled
Switch-PHY-6500>(enable)set spantree portfast 4/1-24 enable
Warning:Connecting Layer 2 devices to a fast start port can cause
temporaryspanning tree loops.Use with caution.
Spantree ports3/2fast start enabled
Switch-PHY-6500>(enable)
》配置BPDUFilter生成树可选功能
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:spanning-treeportfast bpdufilter default
Switch-PHY-3548(config)#spanning-tree portfast bpdufilter default
Switch-PHY-3548(config)#
Catalyst 6500(Catalyst OS(CatOS)系统)
命令格式:setspantree portfast bpdu-filter enable
setspantree portfast bpdu-filter disable
setspantree portfast bpdu-filter
setspantree portfast bpdu-filter
setspantree portfast bpdu-filter
Switch-PHY-6500>(enable)set spantree portfastbpdu-filter enable
Switch-PHY-6500>(enable)set spantree portfast bpdu-filter 3/1-24 enable
Warning:Portsenabled with bpdu filter will not send BPDUs and drop all received
BPDUs.You may cause loops in the bridge network if youmisuse this feature.
Switch-PHY-6500>(enable)