关于接口处于err-disable的故障排查
故障症状:
线路不通,物理指示灯灭或者显示为橙色(不同平台指示灯状态不同)
show interface 输出显示接口状态:
FastEthernet0/47 is down, line protocol is down (err-disabled)
接口状态是err-disable。

sw1#show interfaces status

Port Name Status Vlan Duplex Speed Type
Fa0/47 err-disabled 1 auto auto 10/100BaseTX

如果出现了接口状态为err-disable,show interfaces status err-disabled命令能查看触发err-disable的原因。
下面示例原因为bpduguard,在连接了交换机的端口配置了spanning-tree bpduguard enable。

sw1# show interfaces status err-disabled
Port Name Status Reason
Fa0/47 err-disabled bpduguard
接口产生err-disable的原因可以由以下的命令来查看,系统缺省的配置是所有列出的原因都能导致接口被置为err-disable。

sw1# show errdisable detect
ErrDisable Reason Detection status
----------------- ----------------
udld Enabled
bpduguard Enabled
security-violatio Enabled
channel-misconfig Enabled
psecure-violation Enabled
dhcp-rate-limit Enabled
unicast-flood Enabled
vmps Enabled
pagp-flap Enabled
dtp-flap Enabled
link-flap Enabled
l2ptguard Enabled
gbic-invalid Enabled
loopback Enabled
dhcp-rate-limit Enabled
unicast-flood Enabled
从列表中,我们可以看出常见的原因有udld,bpduguard,link-flap以及loopback等。
具体由什么原因导致当前接口err-disable可以由show interface status err-disable来查看。

在接口模式下采用 shutdown,no shutdown进行手动的激活。
在缺省配置下,一旦接口被置为err-disable,IOS将不会试图恢复接口。
这个可以由 show errdisable recovery来查看,timer status下面所有的值都是disable。
下面的示例中,由于手工配置了bpduguard恢复,所以timer status的值变为Enable。

sw1# show errdisable recovery
ErrDisable Reason Timer Status
----------------- --------------
udld Disabled
bpduguard Enabled
security-violatio Disabled
channel-misconfig Disabled
vmps Disabled
pagp-flap Disabled
dtp-flap Disabled
link-flap Disabled
l2ptguard Disabled
psecure-violation Disabled
gbic-invalid Disabled
dhcp-rate-limit Disabled
unicast-flood Disabled
loopback Disabled
Timer interval: 300 seconds
Interfaces that will be enabled at the next timeout:
Interface Errdisable reason Time left(sec)
--------- ----------------- --------------
Fa0/47 bpduguard 217
配置IOS重新激活errdisable的接口,使用以下命令:

sw1(config)# errdisable recovery cause bpduguard
sw1(config)#errdisable recovery cause ?
all Enable timer to recover from all causes
bpduguard Enable timer to recover from BPDU Guard error disable state
channel-misconfig Enable timer to recover from channel misconfig disable state
dhcp-rate-limit Enable timer to recover from dhcp-rate-limit error disable state
dtp-flap Enable timer to recover from dtp-flap error disable state
gbic-invalid Enable timer to recover from invalid GBIC error disable state
l2ptguard Enable timer to recover from l2protocol-tunnel error disable state
link-flap Enable timer to recover from link-flap error disable state
loopback Enable timer to recover from loopback detected disable state
pagp-flap Enable timer to recover from pagp-flap error disable state
psecure-violation Enable timer to recover from psecure violation disable state
security-violation Enable timer to recover from 802.1x violation disable state
udld Enable timer to recover from udld error disable state
unicast-flood Enable timer to recover from unicast flood disable state
vmps Enable timer to recover from vmps shutdown error disable

配置完上述命令后,IOS在一段时间后试图恢复被置为err-disable的接口,这段时间缺省为300秒。
但是,如果引起err-disable的源没有根治,在恢复工作后,接口会再次被置为err-disable。
调整err-disable的超时时间,可以使用以下命令:

sw1(config)# errdisable recovery interval ?
<30-86400> timer-interval(sec)
可以调整在30-86400秒,缺省是300秒。
如果产生err-disable的原因是udld,下面有一条命令非常管用:

sw1# udld reset

No ports are disabled by UDLD.
同时,接口在被置为err-disable的时候,通常有一系列的日志产生,如下:
*Mar 15 15:47:19.984: %SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port FastEthernet0/47 with BPDU Guard enabled. Disabling port.
sw1#
*Mar 15 15:47:19.984: %PM-4-ERR_DISABLE: bpduguard error detected on Fa0/47, putting Fa0/47 in err-disable state
sw1#
*Mar 15 15:47:21.996: %LINK-3-UPDOWN: Interface FastEthernet0/47, changed state to down
收集这些日志也非常管用。
所以建议配置一个syslog server,收集log信息。
 
 
RPR RPR+ SSO 等切换方式的比较
当前主要有HSA,RPR,RPR+,SSO四种冗余模式,HSA模式太老现在已经少用了和RPR模式差不多。RPR和RPR+的区别是:RPR模式的Standby 引擎板是半初始化的。当主控板失效后, Standby 引擎板接管主控GRP板再读取并加载配置文件,同时还会重启所有板卡;而RPR+模式是完全初始化的,所有配置文件会随Standby 引擎板的启动而同步,当Standby 引擎接管主控板的任务后并不需要重启所有板卡。所以RPR+比RPR模式具有更高的冗余性能。而SSO冗余模式比是在RPR+的基础上增加了对线卡,各种协议,以及一些其他应用的同步支持,真正实现了“热备份”功能。
配置时的注意点:
1、native ios支持
Release 12.1(13)E and later releases support supervisor engine redundancy with Route Processor Redundancy (RPR) and Route Processor Redundancy Plus (RPR+). This chapter describes how to configure supervisor engine redundancy with RPR and RPR+. 
2、配置时候需要两个引擎需要有一样的IOS,一样的硬件
下面一段话摘自烦尘子的BLOG:
Native with RPR and RPR+
Route processor redundancy 提供2~4分钟的快速Failover,Failover后安装的模块需要reset。
Route processor redundancy+ 提供30~60秒的快速Failover,Failover后安装的模块不需要reset。
要求版本12.1(13)E或更高。
Native SRM with SSO
可以实现1秒或多一些的快速Failover,但仅能支持SUP720和Unicast流量。可以支持二层协议如:link negotiation,VLANs, VTP,DTP,STP,PAgP/LACP,CDP,UDLD,SPAN,voice VLAN,inline power,IGMP snooping 。但不支持三层路由协议的冗余。要求版本12.2(17b)SXA或更高。
Native NSF with SSO
可以实现1秒或多一些的快速Failover,可以支持SUP2和SUP720,Unicast和Multicast(仅SUP720)都可以支持。可以支持二层协议如:link negotiation,VLANs,VTP,DTP,STP,PAgP/LACP,CDP,UDLD,SPAN,voice VLAN,inline power,IGMP snooping 。可以支持三层路由协议的冗余如BGP,OSPF,IS-IS,EIGRP。要求版本12.2(18)SXD或更高。
--------------------------------------------------------------------参考配置
show bootvar 
EHSA standby 模式提供以下特性:
+自动启动,且在active和冗余超级引擎之间bootvar同步。
+在超级引擎的active和冗余状态检测和决定硬件信号。
+每60秒从active往冗余超级引擎进行时钟同步。
+一个冗余超级引擎是启动的,但是不是所有子系统都up,如果
active的超级引擎挂了,冗余超级引擎变成全可操作。
+一个可操作的超级引擎表现为取代失效单元变为冗余超级引擎。
配置和现实RPR+ :
Router> enable
Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# redundancy
Router(config-red)# mode rpr-plus
Router(config-red)# ^Z
Router# show redundancy states 
重新启动默认的自动同步:
Router(config)# redundancy
Router(config-red)# main-cpu
Router(config-r-mc)# auto-sync standard
Router(config-r-mc)# auto-sync bootvar
Router(config-r-mc)# end
Router# copy running-config startup-config
关闭自动同步,只打开配置active超级引擎寄存器的自动同步
Router(config)# redundancy
Router(config-red)# main-cpu
Router(config-r-mc)# no auto-sync standard
Router(config-r-mc)# auto-sync config-register
Router(config-r-mc)# end
Router# copy running-config startup-config
显示冗余状态:
Router# show redundancy states 
This example 如何perform FSU: 
Router# config terminal
Router(config)# config-register 0x2
Router(config)# boot system flash slot0: c6sup22-sv-mz.121-11.E
Router# copy running-config start-config
Router# hw-module reset
Router# redundancy force-switchover ----------------强行切换
摘自: [url]http://hi.baidu.com/gotoccie/blog/item/4342b73815a7c9c2d4622500.html[/url]