|
实验内容: 投稿人: 银河学院:曾浩 1掌握生成树的选举 2掌握交换网络的快速收敛
实验步骤: portfast
portfast说明:
portfast
节约时间是30秒
把接口从listening到forwaring
despaevenets查看事件信息
默认可以看到成为forwarding状态要等待三十秒
不应用接交换机的位置就可以了
快速端口称为边缘端口
Portfast应用在接入层设备一旦接入设备就出于转发行状态,束腰应用在连接pc的
的端口和不是运行stp的接口上。
SW2(config)#inf0/6
SW2(config-if)#noshu
*Mar 100:04:49.231:STP:VLAN1Fa0/6->listening
SW2(config-if)#^Z
SW2#^Z
*Mar 100:05:04.231:STP:VLAN1Fa0/6->learning
*Mar 100:05:19.251:STP:VLAN1sentTopologyChangeNoticeonFa0/0发送tcn
*Mar 100:05:19.255:STP:VLAN1Fa0/6->forwarding SW2(config)#inf0/6
SW2(config-if)#spa
SW2(config-if)#spanning-treepo
SW2(config-if)#spanning-treeportf
SW2(config-if)#spanning-treeportfast
%Warning:portfastshouldonlybeenabledonportsconnectedtoasinglehost.
Connectinghubs,concentrators,switches, bridges,etc.tothisinterface
whenportfastis enabled,cancausetemporaryspanningtreeloops. UsewithCAUTION
%PortfasthasbeenconfiguredonFastEthernet0/6butwillonly
haveeffectwhentheinterface isin anon-trunkingmode.
*Mar 100:07:26.843:STP:VLAN1Fa0/6->blocking
SW2(config-if)#nshu
*Mar 100:07:39.471:STP:VLAN1Fa0/6->jumptoforwardingfromblocking
从上述可以看到当一个接口关闭到完全激活需要30秒,如果在这接口启用了portfast那么端口会直接
从listening到forwarding。
这时候你会疑惑,上面不是写着是blocking到forwording吗?可是你要知道当借口一旦激活就直接跳
过老花时间也就是从blocking直接到了listening,这里portfast直接节约的时间是从listen 直接过度
到了forwarding。
uplinkfast
我这里的uplinkfast是sw1-sw3
uplinkfast说明:
uplinkfast上行线路的快速
就是选举出了ndp后上行线路断了ndp快速的收敛成为
一样是从listening到forwarding 因为当上行挂了就直接把端口至于listening状态了
spavlan1pro4096设置bid小的成为根桥
spauplinkfastde
Showspabrief
cost+3000uplinkfast启用优先级变了49152默认32768
启用了uplingkfast的优先级默认便很高
用于接入层的交换机,当他连接到主干交换机上的链路挂掉了,就能马上切换到备份的链路上也就是
开启ndp这样就会直接从blocking到forwarding。
当连接主干的链路一旦挂了ndp端口马上从blocking到listening,而uplinkfast就是
从listening到forwarding的快速转变。节约三十秒。
SW3#showspanning-treebri VLAN1
Spanningtreeenabledprotocolieee
RootID Priority 32768
Address cc00.0da0.0000
Cost 19
Port 2(FastEthernet0/1)
HelloTime 2sec MaxAge20sec ForwardDelay15sec
BridgeID Priority 32768
Address cc02.0da0.0000
HelloTime 2sec MaxAge20sec ForwardDelay15sec
AgingTime300
Interface Designated
Name PortIDPrioCost StsCost BridgeID PortID
-----------------------------------------------------------------------
FastEthernet0/1 128.2 128 19FWD 032768cc00.0da0.0000128.2
FastEthernet0/2 128.3 128 19BLK 1932768cc01.0da0.0000128.3
可以看到是sw3的f0/2 被blocking了, SW3(config)#inf0/1
SW3(config-if)#shu 当我关闭了这个接口的时候
SW3(config-if)#
*Mar 100:16:38.271:STP:VLAN1Fa0/1->blocking
直接把接口至于blocking
*Mar 100:16:38.271:STP:VLAN1newrootportFa0/2,cost38
这里接受bpdu *Mar 100:16:38.295:STP:VLAN1Fa0/2->listening
那么以前的blocking直接listen
SW3(config-if)#
*Mar 1 00:16:40.195: %LINK-5-CHANGED:Interface FastEthernet0/1, changed state to
administrativelydown
SW3(config-if)# *Mar 100:16:40.199:STP:VLAN1sentTopologyChangeNoticeonFa0/2
同时会发送一个tcn拓扑变更消息
SW3(config-if)#
*Mar 100:16:41.195:%LINEPROTO-5-UPDOWN:LineprotocolonInterface FastEthernet0/1,
changedstatetodown
SW3(config-if)#
*Mar 100:16:53.315:STP:VLAN1Fa0/2->learning
然后经过十五秒到了learning
SW3(config-if)#
*Mar 100:17:08.335:STP:VLAN1Fa0/2->forwarding
在经过十五秒成为forwarding 现在我在上行线路开启uplinkfast
SW3(config)#spanning-treeuplinkfast 在全局下开启了uplinkfast
SW3(config)# 下面是开启了uplinkfast会出现的日志信息
*Mar 100:26:44.519:STP:VLAN1newrootportFa0/2,cost38
*Mar 100:26:44.519:STP:VLAN1sentTopologyChangeNoticeonFa0/2也会发送tcn*Mar 100:26:44.579:STP:VLAN1Fa0/1->blocking 显示ndp端口 *Mar 1 00:26:44.579: %SPANTREE_FAST-7-PORT_FWD_UPLINK:VLAN1 FastEthernet0/2
movedtoForwarding(UplinkFast).
*Mar 100:26:44.579:STP:VLAN1newrootportFa0/1,cost3019 SW3(config)#inf0/1
SW3(config-if)#shu
SW3(config-if)#end
SW3#
*Mar 100:27:17.875:STP:VLAN1Fa0/1->blocking
*Mar 100:27:17.875:STP:VLAN1newrootportFa0/2,cost3038
可以看到cost直接加上了3000我这里全部使用的100m网线cost是19 *Mar 1 00:27:17.875: %SPANTREE_FAST-7-PORT_FWD_UPLINK:VLAN1 FastEthernet0/2
movedtoForwarding(UplinkFast).表示启用了uplinkfast SW3#showspanning-treebrief
VLAN1
Spanningtreeenabledprotocolieee uplinkfastenabled开启了uplinkfast RootID Priority 32768
Address cc00.0da0.0000
Cost 3038 cost变了
Port 3(FastEthernet0/2)
HelloTime 2sec MaxAge20sec ForwardDelay15sec BridgeID Priority 49152 优先级也变了~
Address cc02.0da0.0000
HelloTime 2sec MaxAge20sec ForwardDelay15sec
AgingTime300 Interface Designated
Name PortIDPrioCost StsCost BridgeID PortID
-----------------------------------------------------------------------
FastEthernet0/2 128.3 128 3019FWD 1932768cc01.0da0.0000128.3 这里可以快速的从listening过度到forwarding。
当ndp的上行uplink挂掉了就会直接把接口至于listening。而开启了uplinkfast,会直接把接口过度
到forwarding,直接跳过learning。节约的时间和portfast一样是三十秒。 backbonefact骨干的快速
我这里的骨干是SW1-SW2的那条链路
backbonefast说明:
主要用于主干坏换季之间,当主干交换机的链路出现问题了,就会马上发送tcn拓扑变更消息
节约的就是当接口挂掉了就过二十秒发送tc的报文,节约的就是老化时间,
建议在骨干交换机上全部开启backbonefast。 SW1(config)#inf0/0
SW1(config-if)#shu
SW1(config-if)#
*Mar 100:48:50.823:STP:VLAN1Fa0/0->blocking
SW1(config-if)#
*Mar 1 00:48:52.747: %LINK-5-CHANGED:Interface FastEthernet0/0, changed state to
administrativelydown
*Mar 100:48:53.747:%LINEPROTO-5-UPDOWN:LineprotocolonInterface FastEthernet0/0,
changedstatetodown
SW1(config-if)#
*Mar 100:49:10.807:STP:VLAN1TopologyChangercvdonFa0/1
SW1(config-if)#
*Mar 100:49:38.787:STP:VLAN1TopologyChangercvdonFa0/1 SW3#
*Mar 100:49:06.183:STP:VLAN1Fa0/2->listening
SW3#
*Mar 100:49:08.155:STP:VLAN1heardroot32768-cc01.0da0.0000onFa0/2
*Mar 100:49:08.155:currentRoothas32768-cc00.0da0.0000 *Mar 100:49:08.203:STP:VLAN1TopologyChangercvdonFa0/2
*Mar 100:49:08.203:STP:VLAN1sentTopologyChangeNoticeonFa0/1
SW3#
*Mar 100:49:21.203:STP:VLAN1Fa0/2->learning
SW3#
*Mar 100:49:36.215:STP:VLAN1sentTopologyChangeNoticeonFa0/1
*Mar 100:49:36.219:STP:VLAN1Fa0/2->forwarding
看到了吧~哈哈~当骨干链路挂了之后,在骨干交换机上会经过20秒发送tc拓扑变更消息,给其他的
交换机, 发了之后ndp收到消息就会改变端口的角色变化,这里经过的是30老花时间经过的是20秒一一起是
五十秒,
但是你这里看到的是少用了几秒钟大约用了46秒,但是不影响大局,因为模拟器难免会出现一些问题,
当发送tc的时候,给其他的邻居通知拓扑变更,从而重新计算,发送tc是20秒还有ndp端口从ndp
到forwarding是三十秒。 SW1(config)#spanning-treebackbonefast
SW1(config)#inf0/0
SW1(config-if)#shu
SW1(config-if)#
*Mar 100:58:42.275:STP:VLAN1Fa0/0->blocking
SW1(config-if)#
*Mar 1 00:58:44.199: %LINK-5-CHANGED:Interface FastEthernet0/0, changed state to
administrativelydown
*Mar 100:58:45.199:%LINEPROTO-5-UPDOWN:LineprotocolonInterface FastEthernet0/0,
changedstatetodown
SW1(config-if)#
*Mar 100:59:02.167:STP:VLAN1TopologyChangercvdonFa0/1
可以看到如果开启了backbonefast的话,只要骨干链路一挂掉就会发送tc给其他的交换机。 *Mar 100:58:58.311:STP:VLAN1Fa0/2->listening
SW3#
*Mar 100:58:59.415:STP:VLAN1heardroot32768-cc01.0da0.0000onFa0/2
*Mar 100:58:59.415:currentRoothas32768-cc00.0da0.0000
*Mar 100:58:59.511:STP:VLAN1TopologyChangercvdonFa0/2
*Mar 100:58:59.511:STP:VLAN1sentTopologyChangeNoticeonFa0/1
SW3#
*Mar 100:59:13.335:STP:VLAN1Fa0/2->learning
SW3#
*Mar 100:59:28.355:STP:VLAN1sentTopologyChangeNoticeonFa0/1
*Mar 100:59:28.359:STP:VLAN1Fa0/2->forwarding 现在可以看到ndp直接从blocking直接到了listening,没有进过老花时间,所以节约的时间为20秒。、
现在如果我在ndp上在开启uplinkfast那必需的瞬间成为forwarding。
所以一些知识结合起来那就无敌了,可以瞬间恢复网络的收敛,加快网络的收敛速度,更加保证了网络
的不间断性。 工作原理:当收到了两条的bpdu时候!
直接向rp发送rlq 给根桥!查看是否正常!
如果正常!根桥会回复一个response。直接跳到lis!
rlq 根桥链路查询
|