Cisco交換機(jī)端口err-disable解決方法

我的一臺2960GG透過多模 10G SFP-10GBase-LRM光纖接核心3850交換機(jī),今天早上之間網(wǎng)絡(luò)不通,3850G和2960上的SFP模塊指示燈都不亮,查看CISCO 2960G端口有如下提示:

如東ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書合作)期待與您的合作!

#show int status err-disabled

Port      Name                               Status            Reason               Err-disabled Vlans
Te6/0/1   [TRUNK] swi-core01    err-disabled    link-flap


解決如下:
conf t
int Te6/0/1
shut
no shut
end
OK!!!
查閱關(guān)于link-flap及err-disable的資料如下:http://www.net130.com/cms/Pub/Tech/tech_zh/2010_11_07_20606.htmhttp://shanliren.blog.51cto.com/159454/165595
Cisco網(wǎng)站上關(guān)于link-flap的說明:
Link-flap error
Link flap means that the interface continually goes up and down. The interface is put into the errdisabled state if it flaps more than five times in 10 seconds. The common cause of link flap is a Layer 1 issue such as a bad cable, duplex mismatch, or bad Gigabit Interface Converter (GBIC) card. Look at the console messages or the messages that were sent to the syslog server that state the reason for the port shutdown.
我的翻譯:
Link flap的意思是接口持續(xù)性的up和down。如果一個接口在10秒內(nèi)發(fā)生超過5次up/down,將被置為errdisable狀態(tài)。link-flap的原因?yàn)閘ayer-1層的諸如網(wǎng)線問題、雙工不匹配或者故障的千兆GBIC卡??梢圆榭碿onsole或者syslog服務(wù)器下的log日志,獲取端口shutdwn的原因。出現(xiàn)了這個問題,我們不得不重視起交換機(jī)端口“假死”的現(xiàn)象,尋求在交換機(jī)不重啟的狀態(tài)下將該端口“拯救”回來的方法。
拯救步驟1:查看日志/端口的狀態(tài)


 登錄進(jìn)入交換機(jī)后,執(zhí)行show log,會看到如下的提示:
21w6d: %ETHCNTR-3-LOOP_BACK_DETECTED: Keepalive packet loop-back detected on FastEthernet0/20.
21w6d: %PM-4-ERR_DISABLE: loopback error detected on Fa0/20, putting Fa0/20 in err-disable state
以上信息就明確表示由于檢測到第20端口出現(xiàn)了環(huán)路,所以將該端口置于了err-disable狀態(tài)。


 查看端口的狀態(tài)


 Switch

#show int te6/0/1 status

Port      Name               Status       Vlan       Duplex  Speed Type
Te6/0/1   [TRUNK] swi-core01 err-disabled 1            full    10G SFP-10GBase-LRM

這條信息更加明確的表示了該端口處于err-disabled狀態(tài)。
既然看到了該端口是被置于了錯誤的狀態(tài)了,我們就應(yīng)該有辦法將其再恢復(fù)成正常的狀態(tài)。
拯救步驟2:將端口從錯誤狀態(tài)中恢復(fù)回來


 進(jìn)入交換機(jī)全局配置模式,執(zhí)行errdisable recovery cause ?,會看到如下信息:
Switch(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       鏈路報(bào)錯修復(fù)
loopback            Enable timer to recover from loopback detected disable state   環(huán)路報(bào)錯修復(fù)
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 state


 從列出的選項(xiàng)中,我們可以看出,有非常多的原因會引起端口被置于錯誤狀態(tài),由于我們明確的知道這臺交換機(jī)上的端口是由于環(huán)路問題而被置于錯誤狀態(tài)的,所以就可以直接鍵入命令:


 Switch(config)#errdisable recovery cause link-flap
是啊,就這么簡單的一條命令,就把困撓我們很長時(shí)間的問題解決了,真的就這么神奇。那么如何驗(yàn)證這條命令是生效了呢?
拯救步驟3:顯示被置于錯誤狀態(tài)端口的恢復(fù)情況

switch#show errdisable recovery
ErrDisable Reason            Timer Status
-----------------            --------------
arp-inspection               Disabled
bpduguard                    Disabled
channel-misconfig (STP)      Disabled
dhcp-rate-limit              Disabled
dtp-flap                     Disabled
gbic-invalid                 Disabled
inline-power                 Disabled
link-flap                    Enabled
mac-limit                    Disabled
loopback                     Disabled
pagp-flap                    Disabled
port-mode-failure            Disabled
pppoe-ia-rate-limit          Disabled
psecure-violation            Disabled
security-violation           Disabled
sfp-config-mismatch          Disabled
small-frame                  Disabled
storm-control                Disabled
udld                         Disabled
vmps                         Disabled
psp                          Disabled
dual-active-recovery         Disabled
evc-lite input mapping fa    Disabled
Recovery command: "clear     Disabled

Timer interval: 300 seconds


Interface       Errdisable reason       Time left(sec)
---------       -----------------       --------------
Interfaces that will be enabled at the next timeout:

Interface       Errdisable reason       Time left(sec)
---------       -----------------       --------------
Te6/0/1                link-flap          222

 從以上顯示的信息可以看出,這臺交換機(jī)有一個端口(Te6/0/1)會222秒之后恢復(fù)為正常的狀態(tài),實(shí)際情況也是這樣,等了幾分鐘以后。這下總算在不重交換機(jī)的情況下,將幾個處于“假死”狀態(tài)的端口“拯救”了回來。


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·


 以上是一網(wǎng)友提供的解決cisco交換機(jī)端口假死的辦法,雖然辦法可行,但是每次假死后都要手動去恢復(fù)有些麻煩


 為了讓交換機(jī)出現(xiàn)此假死故障后能自動恢復(fù),我們也有相應(yīng)幫忙來解決


 在這里我就上面網(wǎng)友的內(nèi)容進(jìn)行補(bǔ)充,用于cisco交換機(jī)自動恢復(fù)端口假死的故障


 在特權(quán)模式下配置如下:


 errdisable recovery cause udld
errdisable recovery cause bpduguard
errdisable recovery cause security-violation
errdisable recovery cause channel-misconfig
errdisable recovery cause pagp-flap
errdisable recovery cause dtp-flap
errdisable recovery cause link-flap
errdisable recovery cause sfp-config-mismatch
errdisable recovery cause gbic-invalid
errdisable recovery cause l2ptguard
errdisable recovery cause psecure-violation
errdisable recovery cause dhcp-rate-limit
errdisable recovery cause unicast-flood
errdisable recovery cause vmps
errdisable recovery cause storm-control
errdisable recovery cause inline-power
errdisable recovery cause arp-inspection
errdisable recovery cause loopback


 以上這些都是導(dǎo)致端口假死的條件,配置上述可以


 
%PM-4-ERR_DISABLE: link-flap error detected on Gi4/1, putting Gi4/


 1 in err-disable state
Issue this command in order to view the flap values:


 cat6knative#show errdisable flap-values


 !--- Refer to show errdisable flap-values for more information on the command.


 ErrDisable Reason    Flaps    Time (sec)
-----------------    ------   ----------
pagp-flap              3       30
dtp-flap               3       30
link-flap              5       10
讓端口在出現(xiàn)假死后自動恢復(fù);關(guān)于接口處于err-disable的故障排查
故障癥狀:
線路不通,物理指示燈滅或者顯示為橙色(不同平臺指示燈狀態(tài)不同)
show interface 輸出顯示接口狀態(tài):
FastEthernet0/47 is down, line protocol is down (err-disabled)
接口狀態(tài)是err-disable。
sw1#show interfaces statusPort Name Status Vlan Duplex Speed Type
Fa0/47 err-disabled 1 auto auto 10/100BaseTX
如果出現(xiàn)了接口狀態(tài)為err-disable,show interfaces status err-disabled命令能查看觸發(fā)err-disable的原因。
下面示例原因?yàn)閎pduguard,在連接了交換機(jī)的端口配置了spanning-tree bpduguard enable。
sw1#show interfaces status err-disabled
Port Name Status Reason
Fa0/47 err-disabled bpduguard
接口產(chǎn)生err-disable的原因可以由以下的命令來查看,系統(tǒng)缺省的配置是所有列出的原因都能導(dǎo)致接口被置為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以及l(fā)oopback等。 具體由什么原因?qū)е庐?dāng)前接口err-disable可以由show interface status err-disable來查看。
在接口模式下采用shutdown,no shutdown進(jìn)行手動的激活。
在缺省配置下,一旦接口被置為err-disable,IOS將不會試圖恢復(fù)接口。
這個可以由show errdisable recovery來查看,timer status下面所有的值都是disable。
下面的示例中,由于手工配置了bpduguard恢復(fù),所以timer status的值變?yōu)镋nable。
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在一段時(shí)間后試圖恢復(fù)被置為err-disable的接口,這段時(shí)間缺省為300秒。
但是,如果引起err-disable的源沒有根治,在恢復(fù)工作后,接口會再次被置為err-disable。
調(diào)整err-disable的超時(shí)時(shí)間,可以使用以下命令:
sw1(config)#errdisable recovery interval ?
<30-86400> timer-interval(sec) 可以調(diào)整在30-86400秒,缺省是300秒。
如果產(chǎn)生err-disable的原因是udld,下面有一條命令非常管用:sw1#udld resetNo ports are disabled by UDLD.
同時(shí),接口在被置為err-disable的時(shí)候,通常有一系列的日志產(chǎn)生,如下:
*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信息。
 sw1#show interfaces status
Port Name Status Vlan Du...
開啟errdisable功能,這樣可以使用show errdisable來查看引發(fā)errdisable的原因是什么,再更加信息內(nèi)容進(jìn)行解決。
你要是想不影響使用的話,先用 no errdisable detect cause loopback 執(zhí)行一下,將已經(jīng)死掉的端口,no sh 一下 如果沒問題,肯定是環(huán)路了,你可再找時(shí)間,對懷疑有問題的switch用拔插法,一個一個拔掉網(wǎng)線去查,當(dāng)然,有更有效的方法,你可查看有問題的switch的所有rj45和gi口的狀態(tài),哪個有errdisable信息哪個就有問題。
switch#show interfaces status err-disabled
Port Name Status Reason
Fa0/22 err-disabled link-flap
Fa0/37 For office in 100K err-disabled link-flap
Fa0/41 unknow err-disabled link-flap
Fa0/42 Training Dc066 err-disabled link-flap
Fa0/45 Production line VM err-disabled link-flap
switch#show errdisable detect
ErrDisable Reason Detection status
----------------- ---------------- pagp-flap 3 30
dtp-flap 3 30
link-flap 5 10
( link-flap 這就是因?yàn)殒溌焚|(zhì)量不好導(dǎo)致的)
關(guān)閉errdisable detectswitch
#no errdisable detect cause all
導(dǎo)致交換機(jī)接口出現(xiàn)err-disable的幾個常見原因: 
    1. EtherChannel misconfiguration
    2. Duplex mismatch
    style="TEXT-INDENT: 2em">3. BPDU port guard
    4. UDLD
    5. Link-flap error
    6. Loopback error
    7. Port security violation
    第一個當(dāng)F EC兩端配置不匹配的時(shí)候就會出現(xiàn)err-disable.假設(shè)Switch A把FEC模式配置為on,這時(shí)Switch A是不會發(fā)送PAgP包和相連的Switch B去協(xié)商FEC的,它假設(shè)Switch B已經(jīng)配置好FEC了。但實(shí)事上Swtich B并沒有配置FEC,當(dāng)Switch B的這個狀態(tài)超過1分鐘后,Switch A的STP就認(rèn)為有環(huán)路出現(xiàn),因此也就出現(xiàn)了err-disable.解決辦法就是把FEC的模式配置為channel-group 1 mode desirable non-silent這個意思是只有當(dāng)雙方的FEC協(xié)商成功后才建立channel,否則接口還處于正常狀態(tài)。
    第二個原因就是雙工不匹配。一端配置為half-duplex后,他會檢測對端是否在傳輸數(shù)據(jù),只有對端停止傳輸數(shù)據(jù),他才會發(fā)送類似于ack的包來讓鏈路up,但對端卻配置成了full-duplex,他才不管鏈路是否是空閑的,他只會不停的發(fā)送讓鏈路up的請求,這樣下去,鏈路狀態(tài)就變成err-disable了。
    三、第三個原因BPDU,也就是和portfast和BPDU guard有關(guān)。如果一個接口配置了portfast,那也就是說這個接口應(yīng)該和一個pc連接,pc是不會發(fā)送spanning-tree的BPDU幀的,因此這個口也接收BPDU來生成spanning-tree,管理員也是出于好心在同一接口上配置了BPDU guard來防止未知的BPDU幀以增強(qiáng)安全性,但他恰恰不小心把一個交換機(jī)接到這個同時(shí)配置了portfast和BPDU guard接口上,于是這個接口接到了BPDU幀,因?yàn)榕渲昧薆PDU guard,這個接口自然要進(jìn)入到err-disable狀態(tài)。解決辦法:no spanning-tree portfast bpduguard default,或者直接把portfast關(guān)了。
    第四個原因是UDLD.UDLD是cisco的私有2層協(xié)議,用于檢測鏈路的單向問題。有的時(shí)候物理層是up的,但鏈路層就是down,這時(shí)候就需要UDLD去檢測鏈路是否是真的up的。當(dāng)AB兩端都配置好UDLD后,A給B發(fā)送一個包含自己port id的UDLD幀,B收到后會返回一個UDLD幀,并在其中包含了收到的A的port id,當(dāng)A接收到這個幀并發(fā)現(xiàn)自己的port id也在其中后,認(rèn)為這鏈路是好的。反之就變成err-disable狀態(tài)了。假設(shè)A配置了UDLD,而B沒有配置UDLD:A給B發(fā)送一個包含自己port id的幀,B收到后并不知道這個幀是什么,也就不會返回一個包含A的port id的UDLD幀,那么這時(shí)候A就認(rèn)為這條鏈路是一個單向鏈路,自然也就變成err-disable狀態(tài)了。
    第五個原因就是鏈路的抖動,當(dāng)鏈路在10秒內(nèi)反復(fù)up、down五次,那么就進(jìn)入err-disable狀態(tài)。
    第六個原因就是keepalive loopback.在12.1EA之前,默認(rèn)情況下交換機(jī)會在所有接口都發(fā)送keepalive信息,由于一些不通交換機(jī)協(xié)商spanning-tree可能會有問題,一個接口又收到了自己發(fā)出的keepalive,那么這個接口就會變成err-disable了。解決辦法就是把keepalive關(guān)了。或者把ios升到12.2SE.
    最后一個原因,相對簡單,就是由于配置了port-security violation shutdown

分享文章:Cisco交換機(jī)端口err-disable解決方法
網(wǎng)頁路徑:http://muchs.cn/article0/jpeoio.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、Google網(wǎng)站設(shè)計(jì)、關(guān)鍵詞優(yōu)化搜索引擎優(yōu)化、做網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運(yùn)營