Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2035109
  • 博文数量: 433
  • 博客积分: 4775
  • 博客等级: 上校
  • 技术积分: 8054
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-19 16:15
文章存档

2014年(9)

2013年(20)

2012年(77)

2011年(323)

2009年(4)

分类:

2012-02-07 20:36:29

环路保护可以阻止在点对点链路上由于单向链路失效而发生桥接环路。当在交换机上全局启用环路功能后,就会应用到系统中所有的点对点端口。环路保护检测根端口和阻塞端口,并确保它们可以从网段中的指定端口上接收到BPDU包。如果启用了环路保护的根端口或者阻塞端口停止了从网段中指定的端口上接收BPDU包,则它假定在端口上存在物理链路错误,并转变这些端口为阻塞状态,以便可以立即接收BPDU包。

可以在基于每端口或者基于全局基础上启用环路保护。当在某个端口上启用环路保护时,环路保护功能将自动应用到该端口所属的所有活动实例或VLAN上。当禁止了根保护功能时,则仅在指定端口上禁止。禁止环路保护功能后,所有存在冲突环路的端口将转变成侦听状态。

要在交换机上全局启用环路保护功能,可以按照表12-34所示的步骤进行。

12-34  在交换机上全局启用环路保护功能的步骤

步骤

命令

用途说明

Switch(config)# spanning-tree loopguard default

在交换机上全局启用环路保护功能

Switch(config)# end

退出配置模式

Switch# show spanning tree interface {{fastethernet | gigabitethernet | tengigabitethernet} slot/port}detail

校验交换机环路保护功能设置在指定接口的影响

以下示例是在交换机上全局启用环路保护功能。

Switch(config)# spanning-tree loopguard default

Switch(config)#

要在指定接口上启用环路保护,可以按照表12-35所示的步骤进行。

12-35  在指定端口上启用环路保护功能的步骤

步骤

命令

用途说明

Switch(config)# interface {type slot/port} | {port-channel port_channel_number}

指定要配置的接口,并进入接口配置模式

Switch(config-if)# spanning-tree guard loop

启用环路保护功能

Switch(config)# end

退出配置模式

Switch# show spanning tree interface {type slot/port} |{port-channel
port_channel_number}  detail

校验环路保护功能设置在以上指定接口上的影响

【示例1fastEthernet 4/4接口上启用环路保护。

Switch(config)# interface fastEthernet 4/4

Switch(config-if)# spanning-tree guard loop

Switch(config-if)# ^Z

【示例2查看fastethernet 4/4接口上的当前生成树配置(注意输出信息中的粗体字部分)。

Switch# show spanning-tree interface fastEthernet 4/4 detail

 Port 196 (FastEthernet4/4) of VLAN0010 is forwarding

   Port path cost 1000, Port priority 160, Port Identifier 160.196.

   Designated root has priority 32768, address 00d0.00b8.140a

   Designated bridge has priority 32768, address 00d0.00b8.140a

   Designated port id is 160.196, designated path cost 0

   Timers:message age 0, forward delay 0, hold 0

   Number of transitions to forwarding state:1

   The port is in the portfast mode by portfast trunk configuration

   Link type is point-to-point by default

   Bpdu filter is enabled

   Loop guard is enabled on the port

   BPDU:sent 0, received 0

Switch#

阅读(7704) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~