spanning-treee 中uplinkfast的作用是在上行链路失效后,stp 中被bloking 的端口到转发过程节约的时间,实现快速收敛。
当上行链路down 掉后 A上的blocking 端口要多少时间变为forwarding ? 30s 为什么直接到listening ,没有经历20s 老化时间(因为blocking口每2s还是能收到DBDU的帧) A直连检测到A的rp口 down 后。NDP(被阻端口) 端口直接变成listening 状态
任务1 : 未应用uplinkfast 的时候上行链路down后blocking经历30s 到达forwarding 态
任务2: 应用uplinkfast后直接jump到forwarding态
实验很简单 : 三台交换机 分接入层和分布层 (接入层与分布层之间的链路相对接入交换机来说是上层链路)
确保 sw3 为root sw2 为backroot Sw3 :修改优先级 spanning-tree vlan 1 priority 0 (spanning-tree vlan 1 root ) Sw2 :修改优先级 spanning-tree vlan 1 priority 4096 (spanning-tree vlan 1 root secondary) 结果将 sw1 的2口断开 导致上行链路失效 结果一: sw1(config)#int e0/2
sw1(config-if)#shu
sw1(config-if)#end
sw1#
*Aug 31 07:35:15.139: STP: VLAN0001 new root port Et0/0, cost 200
*Aug 31 07:35:15.139: STP: VLAN0001 Et0/0 -> listening ..... sw1#
*Aug 31 07:35:30.147: STP: VLAN0001 Et0/0 -> learning ...... *Aug 31 07:35:45.155: STP: VLAN0001 Et0/0 -> forwarding //经历了30s的时间 结果二: 回复原状态 sw1接入层交换机全局启用 spanning-tree uplinkfast //启用 sw1#sho spanning-tree uplinkfast
UplinkFast is enabled Station update rate set to 150 packets/sec. UplinkFast statistics
-----------------------
Number of transitions via uplinkFast (all VLANs) : 1
Number of proxy multicast addresses transmitted (all VLANs) : 0 Name Interface List
-------------------- ------------------------------------
VLAN0001 Et0/0(fwd), Et0/1 *Aug 31 08:09:20.251: STP: VLAN0001 new root port Et0/0, cost 3200
*Aug 31 08:09:20.251: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 Ethernet0/0 moved to Forwarding (UplinkFast). 结果三:
sw1#sho spanning-tree vlan 1 VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 1
Address aabb.cc00.0300
Cost 3200
Port 1 (Ethernet0/0)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49153 (priority 49152 sys-id-ext 1)
Address aabb.cc00.0100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Uplinkfast enabled 可以看到使用uplinkfast 后的变化 1 uplinkfas 启用标志 2 cost值增加3000 3 priority 值强制置为49152 ,作用让其不成为根桥。
该贴已经同步到 cuizhiliang的微博 |