Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23989
  • 博文数量: 15
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 175
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-22 10:49
文章分类

全部博文(15)

文章存档

2009年(11)

2008年(4)

我的朋友
最近访客

分类: 网络与安全

2009-04-29 14:16:02

 
ROOT/LOOP/BPDU guard/BPDU filter

 

BPDU GUARD
的功能是当这个端口收到任何的
BPDU就马上设为Error-Disabled状态。我们知道,当交换机STP功能启用的时候,默认所有端口都会参与STP,并发送和接受BPDU,当BPDU GUARD开启后,在正常情况下,一个下联的端口是不会收到任何BPDU的,因为PC和非网管换机都不支持STP,所以不会收发BPDU。当这个端口下如果有自回环的环路,那么它发出去的BPDU在非网管换机上回环后就会被自己接收到,这个时候BPDU GUARD就会把它立刻设为Error-Disabled状态,这个端口就相当于被关闭了,不会转发任何数据,也就切断了环路,保护了整个网络。
BPDU Guard
特性可以全局启用也可以基于基于接口的启用,两种方法稍有不同.


当在启用了
Port Fast特性的端口收到了BPDU后,BPDU Guard将关闭该端口,使该端口处于err-disable状态,这时必须手动才能把此端口回复为正常状态。

配置BPDU Guard:
Switch(config)# spanning-tree portfast bpduguard default          /---
在启用了PortFast特性的端口上启用BPDUguard---/
Switch(config-if)# spanning-tree bpduguard enable                      /---
在没启用PortFast特性的情况下启用BPDUguard---/


BPDU Filtering

特性和
BPDU Guard特性非常类似.通过使用BPDU Filtering,将能够防止交换机在启用了Port Fast特性的端口上发送BPDU给主机。

如果全局配置了BPDU Filtering,当某个Port Fast端口接收到了BPDU,那么交换机将禁用Port FastBPDU Filtering特性,把端口更改回正常的STP状态.

如果在单独的Port Fast端口启用BPDU Filtering,此端口将不发送任何的BPDU并忽略所有接收到的BPDU.

注意,如果在连接到其他交换机的端口(不是连的主机的端口)上配置了BPDUFiltering,那么就有可能导致层2环路(Prevent from sending and receiving BPDU.另外,如果在与启用了BPDU Filtering的相同端口上配置了BPDU Guard特性,所以BPDU Guard将不起作用,起作用的将是BPDU Filtering.

配置BPDU Filtering:
Switch(config)# spanning-tree portfast bpdufilter default              /---
在启用了Port Fast特性的端口上启用BPDU Filtering---/
Switch(config-if)# spanning-tree bpdufilter enable                          /---
在不启用Port Fast特性的情况下启用BPDU Filtering---/

ROOT Guard
Root Guard:防止新加入的交换机(有更低根网桥ID)影响一个已经稳定了(已经存在根网桥)的交换网络,阻止未经授权的交换机成为根网桥。

工作原理:当一个端口启动了此特性,当它收到了一个比根网桥优先值更优的BPDU包,则它会立即阻塞该端口,使之不能形成环路等情况。这个端口特性是动态的,当没有收到更优的包时,则此端口又会自己变成转发状态了。

ROOT GuardDP(designated port)指定端口上做,该端口就不会改变了,只会是DP了,这样可以防止新加入的交换机成为root,该端口就变成了永久的DP了,show spann inconsistentport),若新加入的交换机想成为root,则它的端口不能工作,直到这个新交换机委曲求全做RP为止。

Loop Guard
Loop Guard:防止一个阻断的端口由于链路不正常(不能双向通信等)接不到BPDU后变成转发,配了此项后,即使接不到BPDU也是阻断的loop-inconsistent blocking state(启用loop guard时自动关闭root guard);

Loop guard
RP接口或替代端口(alternative port or root port)启用,而且在point to point链路上使用:
Switch(config-if)# spanning-tree guard loop

全局启用:
Switch(config)#spantree global-default loopguard enable

如果在一个启用了root guard的端口上启用loop guardloop guard将禁用root guard功能。

-------------------------------------------------------------

root port: every swich should have one root port except the root swich wich has no root port. the root port is the port that the switch lead to the root swich.(foward traffic)

Alternative port: the same as the root port but the port is blocked. the port can provide alternative path to the root switch.

Designated port:

Backup port:

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