实验49:portfast、uplinkfast、backbonefast
1.
实验目的
通过本实验,读者可以掌握如下技能:
(1) 理解portfast 的工作场合和配置
(2) 理解uplinkfast 的工作场合和配置
(3) 理解backbonefast 的工作场合和配置
2.
实验拓扑
拓扑如图。
3.
实验步骤
注:
1.SW1 的f0/1 是用于接入计算机。当计算机接入时,f0/1 接口立即进入
Listening 状态,随后经过Learning,最后才成为Forwarding,这期间需要30 秒的时间。
这对于有些场合是不可忍受的,可以配置portfast 特性,使得计算机一接入,接口立即进
入Forwarding。
2.uplinkfast 命令只需要在S3 配置即可,而backbonefast 命令需要在S1、S2、S3
三台交换机上都配置。
sw1(config)#int f0/1
sw1(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single host.
Connecting hubs, concentrators, switches, bridges, etc.to this interface
when portfast is enabled, can cause temporary spanning tree loops.
Use with CAUTION
%Portfast has been configured on FastEthernet0/1 but will only
have effect when the interface is in a non-trunking mode. //交换机会警告该接口只能用于接入计算机或者路由器,不要接入其他的交换机
sw1(config-if)#exit
sw1(config)#int f0/2
sw1(config-if)#sh
sw1(config-if)#
*Mar 1 01:08:45.643: %DTP-5-NONTRUNKPORTON: Port Fa0/2 has become non-trunk
sw1(config-if)#
*Mar 1 01:08:47.059: %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down
*Mar 1 01:08:48.059: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
sw1(config-if)#
*Mar 1 01:08:48.223: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
sw1(config-if)#no sh
sw1(config-if)#
*Mar 1 01:12:58.755: %DTP-5-TRUNKPORTON: Port Fa0/2 has become dot1q trunk
sw1(config-if)#
*Mar 1 01:13:01.135: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
sw1(config-if)#sh
sw1(config-if)#
*Mar 1 01:13:51.791: %DTP-5-NONTRUNKPORTON: Port Fa0/2 has become non-trunk
sw1(config-if)#
*Mar 1 01:13:53.215: %LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down
*Mar 1 01:13:54.215: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
sw1(config-if)#exit
sw1(config)#spanni backbonefast
sw1(config)#no sh
% Incomplete command.
sw1(config)#int f0/0
sw1(config-if)#no sh
sw1(config-if)#sh
sw1(config-if)#
*Mar 1 01:16:20.823: %DTP-5-NONTRUNKPORTON: Port Fa0/0 has become non-trunk
sw1(config-if)#
*Mar 1 01:16:22.239: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar 1 01:16:23.239: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
sw1(config-if)#sh
sw1(config-if)#no sh
sw1(config-if)#
*Mar 1 01:16:53.415: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
sw1(config-if)#
*Mar 1 01:16:55.763: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
sw1(config-if)#
sw2(config)#spanning backbonefast
sw2(config)#
S3(config)#spanning-tree uplinkfast
S3(config)#spanning-tree uplinkfast
S1(config)#int f0/2
S1(config-if)#no shutdown
S1(config-if)#shutdown //等STP 重新稳定后,才执行该语句
在S3 上重复执行“show spanning-tree vlan 1 brief”,可以看到f0/1 很快就进入了
Forwarding 状态。(先确认实验1 的STP 树已经正确。在图中的SW1 上,关闭f0/2接口,在S3 上反复执行“show spanning-tree vlan 1 brief”观察f0/1 接口的状态变化:STP 重新收敛的时间通常需要30—50 秒如图)
S3(config)#spanning-tree backbonefast
S1(config)#int f0/13
S1(config-if)#no shutdown
S1(config-if)#shutdown //等STP 重新稳定后,才执行该语句
在S3 上重复执行“show spanning-tree vlan 1 brief”,可以看到f0/2 很快就进入了
Listening 状态,合计大约15+15=30 秒后,f0/1就变为转发状态,比之前的50 秒少了
20 秒。(打开S1 上f0/2 接口,确认STP 树已经正确。在图14-1 中的S1 上,关闭f0/0接口,
在S3 上反复执行“show spanning-tree vlan 1 brief”观察f0/1 接口的状态变化:
)
本文转自gauyanm 51CTO博客,原文链接:http://blog.51cto.com/gauyanm/243940,如需转载请自行联系原作者