交換機端口err-disable、配置速率和雙工模式

實例:
後端

     和客戶IDC機房拉了一條MSTP線路,接入到Cisco 3750x後端口燈不亮,更換了端口也是不亮,查看端口信息發現由於客戶端有環路致使咱們接口出現err-disable錯誤。bash

故障現象:app

        線路不通,物理指示燈不亮,有的會顯示爲橙色(不一樣平臺指示燈狀態不一樣)ide

解決思路:oop

         取消環路,將端口重啓spa

排錯過程:3d

一、查看接口狀態orm

GigabitEthernet1/0/8 is down, line protocol is down (err-disabled) 接口

C3750X-5F-I02-2-252#SHOw INTERfaces GIgabitEthernet 1/0/8
GigabitEthernet1/0/8 is down, line protocol is down (err-disabled) 
  Hardware is Gigabit Ethernet, address is 00af.1fe0.63d0 (bia 00af.1fe0.63d0)
  Description: "HTZQ Network"
  Internet address is 165.16.241.174/30
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
  input flow-control is off, output flow-control is unsupported 
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 16:07:19, output 16:07:19, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     42 packets input, 10117 bytes, 0 no buffer
     Received 33 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 19 multicast, 0 pause input
     0 input packets with dribble condition detected
     77 packets output, 21350 bytes, 0 underruns
     0 output errors, 0 collisions, 9 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out
C3750X-5F-I02-2-252#SHOw INTERfaces GIgabitEthernet 1/0/8 STATUS

Port      Name               Status       Vlan       Duplex  Speed Type
Gi1/0/8   "HTZQ Network"     err-disabled routed       auto   auto 10/100/1000BaseTX
C3750X-5F-I02-2-252#


二、查看致使接口err-disable的緣由ip

C3750X-5F-I02-2-252#show interfaces status err-disabled 

Port      Name               Status       Reason               Err-disabled Vlans
Gi1/0/8   "HTZQ Network"     err-disabled loopback
Gi1/0/9                      err-disabled loopback
Gi1/0/10                     err-disabled loopback
Gi1/0/20                     err-disabled loopback
C3750X-5F-I02-2-252#

從圖中能夠看出致使接口err-disable的緣由是loopback,由於期間我更換過接口,由於環路致使了全部更換過的接口都是err-disable

看到哪些緣由會致使接口處於err-disable

C3750X-5F-I02-2-252#show errdisable detect 
ErrDisable Reason            Detection    Mode
-----------------            ---------    ----
arp-inspection               Enabled      port
bpduguard                    Enabled      port
channel-misconfig (STP)      Enabled      port
community-limit              Enabled      port
dhcp-rate-limit              Enabled      port
dtp-flap                     Enabled      port
gbic-invalid                 Enabled      port
inline-power                 Enabled      port
invalid-policy               Enabled      port
l2ptguard                    Enabled      port
link-flap                    Enabled      port
loopback                     Enabled      port
lsgroup                      Enabled      port
mac-limit                    Enabled      port
pagp-flap                    Enabled      port
port-mode-failure            Enabled      port
pppoe-ia-rate-limit          Enabled      port
psecure-violation            Enabled      port/vlan
security-violation           Enabled      port
sfp-config-mismatch          Enabled      port
small-frame                  Enabled      port
storm-control                Enabled      port
udld                         Enabled      port
vmps                         Enabled      port
C3750X-5F-I02-2-252#

從列表中,咱們能夠看出常見的緣由有udld,bpduguard,link-flap以及loopback等。 具體由什麼緣由致使當前接口err-disable能夠由show interface status err-disable來查看。


三、恢復

在接口模式下采用shutdown,no shutdown進行手動的激活便可恢復,前提是環路要接觸,否則接口會再次被置於err-disable。


在缺省配置下,一旦接口被置爲err-disable,IOS將不會試圖恢復接口。 這個能夠由show errdisable recovery來查看,timer status下面全部的值都是disable。

C3750X-5F-I02-2-252#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
l2ptguard                    Disabled
link-flap                    Disabled
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

Timer interval: 300 seconds

Interfaces that will be enabled at the next timeout:

C3750X-5F-I02-2-252#


配置IOS自動從新激活errdisable的接口

C3750X-5F-I02-2-252(config)#errdisable recovery cause ?
  all                      Enable timer to recover from all error causes
  arp-inspection           Enable timer to recover from arp inspection error disable state
  bpduguard                Enable timer to recover from BPDU Guard error
  channel-misconfig (STP)  Enable timer to recover from channel misconfig error
  dhcp-rate-limit          Enable timer to recover from dhcp-rate-limit error
  dtp-flap                 Enable timer to recover from dtp-flap error
  gbic-invalid             Enable timer to recover from invalid GBIC error
  inline-power             Enable timer to recover from inline-power error
  l2ptguard                Enable timer to recover from l2protocol-tunnel error
  link-flap                Enable timer to recover from link-flap error
  loopback                 Enable timer to recover from loopback error
  mac-limit                Enable timer to recover from mac limit disable state
  pagp-flap                Enable timer to recover from pagp-flap error
  port-mode-failure        Enable timer to recover from port mode change failure
  pppoe-ia-rate-limit      Enable timer to recover from PPPoE IA rate-limit error
  psecure-violation        Enable timer to recover from psecure violation error
  security-violation       Enable timer to recover from 802.1x violation error
  sfp-config-mismatch      Enable timer to recover from SFP config mismatch error
  small-frame              Enable timer to recover from small frame error
  storm-control            Enable timer to recover from storm-control error
  udld                     Enable timer to recover from udld error
  vmps                     Enable timer to recover from vmps shutdown error

C3750X-5F-I02-2-252(config)#errdisable recovery cause loopback

能夠指定什麼狀況下致使接口err-disable後自動激活,也能夠選擇全部致使接口err-disable後自動接口。

配置完上述命令後,IOS在一段時間後試圖恢復被置爲err-disable的接口,這段時間缺省爲300秒,這個時間經過show errdisable recovery的Timer interval: 300 seconds值。

調整err-disable的超時時間,可使用如下命令:

C3750X-5F-I02-2-252(config)#errdisable recovery interval ?
  <30-86400>  timer-interval(sec)

C3750X-5F-I02-2-252(config)#errdisable recovery interval 600

能夠調整在30-86400秒,缺省是300秒


查看全部接口的狀態

C3750X-5F-I02-2-252#show interfaces status 

Port      Name               Status       Vlan       Duplex  Speed Type
Gi1/0/1   "AA Network"  connected    routed     a-half  a-100 10/100/1000BaseTX
Gi1/0/2   "BB Network   connected    routed     a-full  a-100 10/100/1000BaseTX
Gi1/0/3   "CC Network"  connected    routed     a-half  a-100 10/100/1000BaseTX
Gi1/0/4   "DD Network"  connected    routed     a-half  a-100 10/100/1000BaseTX
Gi1/0/5   "EE Network"  connected    routed     a-half  a-100 10/100/1000BaseTX
Gi1/0/6   "FF Network"  connected    routed     a-half  a-100 10/100/1000BaseTX
Gi1/0/7   "GG Network   connected    routed     a-half  a-100 10/100/1000BaseTX
Gi1/0/8   "HH Network"  connected    routed     a-full  a-100 10/100/1000BaseTX
Gi1/0/9                      err-disabled 1            auto   auto 10/100/1000BaseTX
Gi1/0/10                     err-disabled 1            auto   auto 10/100/1000BaseTX
Gi1/0/11                     notconnect   515          auto   auto 10/100/1000BaseTX
Gi1/0/12                     connected    515        a-full a-1000 10/100/1000BaseTX
Gi1/0/13                     connected    514        a-full  a-100 10/100/1000BaseTX
Gi1/0/14                     connected    514        a-full  a-100 10/100/1000BaseTX
Gi1/0/15                     notconnect   513          auto   auto 10/100/1000BaseTX
Gi1/0/16                     notconnect   513          auto   auto 10/100/1000BaseTX
Gi1/0/17                     connected    502        a-full a-1000 10/100/1000BaseTX
Gi1/0/18                     connected    502        a-full a-1000 10/100/1000BaseTX
Gi1/0/19                     connected    502        a-full a-1000 10/100/1000BaseTX
Gi1/0/20                     err-disabled 502          auto   auto 10/100/1000BaseTX
Gi1/0/21                     connected    515        a-full a-1000 10/100/1000BaseTX
Gi1/0/22                     connected    515        a-full a-1000 10/100/1000BaseTX
Gi1/0/23                     notconnect   1            auto   auto 10/100/1000BaseTX
Gi1/0/24                     connected    trunk      a-full a-1000 10/100/1000BaseTX
Fa0                          notconnect   routed       auto   auto 10/100BaseTX
C3750X-5F-I02-2-252#


配置接口速率和雙工模式

接口雙工模式分爲全雙工和半雙工,指的是數據的傳輸方式:

1.半雙工(Half Duplex)是指接口任意時刻只能接收數據或者發送數據,並存在最大傳輸距離的限制。

2.全雙工(Full Duplex)是指在發送數據的同時也可以接收數據,二者同步進行,最大吞吐量可達到雙倍速率,且消除了半雙工的物理距離限制。目前的網卡通常都支持全雙工。 


配置接口雙工模式

接口雙工模式能夠是自協商模式(auto)、半雙工模式(half)、全雙工模式(full)

自協商的內容包括兩端接口的雙工模式和接口速率。一旦協商經過,鏈路兩端的設備就鎖定在一樣的雙工模式和接口速率。自協商功能只有在鏈路兩端設備均支持才能夠生效。若是對端設備不支持自協商功能,或者對端設備自協商機制和本端設備不一致,則接口可能會處於Down狀態

若是數據流量較大,則鏈路兩端的自協商結果只能爲全雙工模式,不能爲半雙工模式,不然會出現丟包現象。若是數據流量較小,鏈路兩端的自協商結果爲半雙工模式便可以知足數據傳輸需求。 

鏈路兩端的雙工模式必須保持一致。電接口對接時有可能由於兩端接口自協商模式不一致等緣由,形成接口被協商成半雙工模式,此時可能會出現報文交互異常現象

C3750X-5F-I02-2-252#SHOw INTERfaces GigabitEthernet1/0/8
GigabitEthernet1/0/8 is down, line protocol is down (err-disabled) 
  Hardware is Gigabit Ethernet, address is 00af.1fe0.63d0 (bia 00af.1fe0.63d0)
  Description: "HTZQ Network"
  Internet address is 165.16.241.174/30
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX  # auto | full | half設置端口爲-自動/全雙工/半雙工
  input flow-control is off, output flow-control is unsupported 
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 01:41:48, output 01:41:48, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
C3750X-5F-I02-2-252(config)#INTErface GigabitEthernet1/0/8
C3750X-5F-I02-2-252(config-if)# DUplex full 
C3750X-5F-I02-2-252(config-if)# Speed 100
C3750X-5F-I02-2-252(config-if)#speed ?
  10    Force 10 Mbps operation
  100   Force 100 Mbps operation
  1000  Force 1000 Mbps operation
  auto  Enable AUTO speed configuration
C3750X-5F-I02-2-252(config-if)#
相關文章
相關標籤/搜索