常見原因
- 接口未加入VLAN。
- 接口STP阻塞。
- 奇偶校驗錯誤。
- 實體鍊路不穩定。
- 流量超出帶寬。
- 路由下發失敗。
- ARP學習不到。
故障診斷流程
圖1 流量丢包故障診斷流程圖
故障處理步驟
- 檢查接口是否加入VLAN。通過執行指令行display vlan vlan-id,檢視接口是否加入VLAN。如果入接口或出接口沒有加入VLAN,請配置接口加入VLAN。如果接口都已經加入VLAN,請執行步驟2。
- 檢查接口STP是否阻塞。通過執行指令行display stp brief,檢視接口是否阻塞。如果轉發接口STP狀态是discarding或learning,請檢查網絡中是否存在環路。如果轉發接口STP狀态是forwarding,請執行步驟3。
- 檢查實體鍊路狀态。檢查實體連線是否存在松動、接觸不良、線纜故障等現象。執行指令display interface [ interface-type [ interface-number [ .subnumber ] ] ],檢視字段Last physical up time、Last physical down time,通過端口up/down的時間,來判斷端口是否存在閃斷現象。<HUAWEI> display interface 10ge 1/0/1 10GE1/0/1 current state : UP (ifindex: 12) Line protocol current state : UP Description: Route Port,The Maximum Transmit Unit is 1500,The Maximum Frame Length is 9216 Internet protocol processing : disabled IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0019-7459-3301 Port Mode: AUTO, Port Split/Aggregate: DISABLE Speed: AUTO, Loopback: NONE Duplex: FULL, Negotiation: - Input Flow-control: DISABLE, Output Flow-control: DISABLE Mdi: -, Fec: - Last physical up time : 2013-10-29 10:01:46 Last physical down time : 2013-10-29 10:00:53 Current system time: 2013-10-29 10:03:38 如果實體鍊路狀态異常,請更換實體鍊路線纜。如果實體鍊路狀态正常,請執行步驟4。
- 檢查流量是否超出帶寬。
- 執行指令display interface brief | include up,檢視端口進來的流量和出去的流量是否達到100%來判斷是否超帶寬。
- <HUAWEI> display interface brief | include up PHY: Physical *down: administratively down ^down: standby (l): loopback (s): spoofing (E): E-Trunk down (b): BFD down (e): ETHOAM down (d): Dampening Suppressed (p): port alarm down (dl): DLDP down InUti/OutUti: input utility rate/output utility rate Interface PHY Protocol InUti OutUti inErrors outErrors 10GE1/1/0/4 up up 0.01% 0.01% 0 0 10GE1/1/0/6 up up 0.01% 0.01% 0 0
- 如果流量超寬,請增加負載分擔鍊路或者增大接口速率轉發流量。
- 如果流量沒有超寬,請執行步驟5。
- 檢查是否存在環路廣播風暴。
- 檢查MAC漂移記錄,注意move-ports通常是環路上端口或者指向環的端口。
- V200R003C00之前版本顯示如下:<HUAWEI> display mac-address flapping Mac-address Flapping Configurations : ------------------------------------------------------------------------------- Flapping detection : Enable Aging time(s) : 300 Quit-vlan Recover time(m) : -- Exclude vlan-list : -- ------------------------------------------------------------------------------- S : start time E : end time (D) : error down ------------------------------------------------------------------------------- Time VLAN MAC-Address Original-Port Move-Ports MoveNum ------------------------------------------------------------------------------- S:2014-05-26 15:06:13 1 0000-c10b-0102 10GE4/0/20 10GE4/0/1 47598 E:2014-05-26 15:15:45 10GE4/0/0 ------------------------------------------------------------------------------- Total items on slot 3: 1 ------------------------------------------------------------------------------- Time VLAN MAC-Address Original-Port Move-Ports MoveNum ------------------------------------------------------------------------------- S:2014-05-26 15:06:13 1 0000-c10b-0102 10GE4/0/20 10GE4/0/1 65535 E:2014-05-26 15:15:46 10GE4/0/0 ------------------------------------------------------------------------------- Total items on slot 4: 1
- V200R003C00及之後版本顯示如下:<HUAWEI> display mac-address flapping Mac-address Flapping Configurations : ------------------------------------------------------------------------------- Flapping detection : Enable Aging time(s) : 300 Quit-vlan Recover time(m) : -- Exclude vlan-list : -- ------------------------------------------------------------------------------- S : start time E : end time (D) : error down ------------------------------------------------------------------------------- Time : S:2017-08-24 14:40:11 E:2017-08-24 14:40:23 VLAN/BD : 1/- MAC Address : 0000-c10b-0102 Original-Port: 10GE4/0/20 Move-Ports : 10GE4/0/1 10GE4/0/0 MoveNum : 47598 ------------------------------------------------------------------------------- Total items on slot 4: 1
- 當有如上回顯時,表示存在MAC漂移。
- 如果存在MAC漂移,請查找MAC漂移的根源并解決。
- 如果沒有MAC漂移,或者解決MAC漂移後問題仍存在,請執行步驟6。
- 檢查路由資訊是否正确。執行指令display ip routing-table statistics和display ip routing-table all-vpn-instance statistics,檢視字段Summary Prefixes,計算兩者統計之和是否超規格。<HUAWEI> display ip routing-table statistics Summary Prefixes : 49 Protocol total active added deleted routes routes routes routes DIRECT 41 41 47 6 STATIC 5 5 6 1 RIP 0 0 0 0 OSPF 5 2 8 3 IS-IS 2 1 2 0 BGP 0 0 0 0 Total 53 49 63 10 <HUAWEI> display ip routing-table all-vpn-instance statistics Summary Prefixes : 1 Protocol total active added deleted routes routes routes routes DIRECT 1 1 1 0 STATIC 0 0 0 0 RIP 0 0 0 0 OSPF 0 0 0 0 IS-IS 0 0 0 0 BGP 0 0 0 0 Total 1 1 1 0 如果超出規格,請更換高規格單闆。如果沒有超出規格,請執行步驟b。執行指令display ip routing-table [ vpn-instance vpn-instance-name ] ip-address [ mask | mask-length ],檢視路由表中的下一跳和出端口資訊是否正确。診斷視圖下執行指令display fei ipv4 route-entry slot slot-id dst-ip ip-address檢視下發的路由字首資訊是否正确,如果不正确,請檢查配置是否存在問題。<HUAWEI> display ip routing-table 20.1.1.0 24 Proto: Protocol Pre: Preference Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route ------------------------------------------------------------------------------ Routing Table : _public_ Summary Count : 1 Destination/Mask Proto Pre Cost Flags NextHop Interface 20.1.1.0/24 OSPF 10 2 D 100.1.1.2 Vlanif100 [~HUAWEI-diagnose] display fei ipv4 route-entry slot 1/1 dst-ip 20.1.1.0 RE Table: Total number: 1 -------------------------------------------------------------------------------- DestAddr : 20.1.1.0 MaskLen : 24 FVrfIndex: 0x0 IIDGFlag : 1 Location : 8 VrIndex : 0 VrfIndex : 0x0 AttributeID: 0 PathFlag : 145 IIDGIndex: 0x85 ARPNhpIndex: 0xFFFFFFFF 如果路由配置錯誤,請修正配置。如果路由配置正确,請執行步驟c。如果是通過OSPF協定引入的路由,請根據OSPF協定對接問題的定位指導檢視是否存在鄰居無法建立、路由震蕩等現象。如果OSPF協定引入的路由異常,請排查路由配置是否存在問題。如果OSPF協定引入的路由正常,請執行步驟7。
- 檢查ARP資訊是否正确。
- 執行指令display arp | include ip-address,檢視ARP是否學到。
- <HUAWEI> display arp | include 10.0.4.216 ARP Entry Types: D - Dynamic, S - Static, I - Interface, O - OpenFlow EXP: Expire-time IP ADDRESS MAC ADDRESS EXP(M) TYPE/VLAN INTERFACE VPN-INSTANCE ------------------------------------------------------------------------------ 10.0.4.216 006b-880e-340c S/10 10GE1/1/0/6 ------------------------------------------------------------------------------ Total:238 Dynamic:207 Static:1 Interface:30 OpenFlow:0 如果ARP沒有學習到,一般有以下可能性:
- 執行指令display arp statistics,檢視ARP數量是否超規格。<HUAWEI> display arp statistics Dynamic: 207 (Resolved : 207 Incomplete: 0) Static: 1 OpenFlow: 0
- 如果ARP數量超出規格,請更換高規格單闆(在CE12800&12800E系列交換機中可以切換ARP模式)。
- 執行指令display cpu-defend statistics packet-type arp slot slot-id,檢視是否有大量ARP封包被丢棄,來判斷是否存在ARP攻擊。<HUAWEI> display cpu-defend statistics packet-type arp slot 1/1 Statistics(packets) on slot 1/1 : -------------------------------------------------------------------------------- PacketType Total Passed Total Dropped Last Dropping Time Last 5 Min Passed Last 5 Min Dropped -------------------------------------------------------------------------------- arp 132775 6117 2015-12-09 21:05 169 0 --------------------------------------------------------------------------------
- 如果存在ARP攻擊,可以攻擊溯源查找,采取懲罰措施。
- 如果ARP已學習到,診斷視圖下執行指令display fei ipv4 arp slot slot-id,檢視下發的ARP資訊是否正确;執行指令display fei l3 statistics slot slot-id,檢視失敗的統計計數。[~HUAWEI-diagnose] display fei ipv4 arp slot 1/1 next-ip 10.0.4.216 ARP Table: Total number: 1 -------------------------------------------------------------------------------- IPAddr: 10.0.4.216 IfIndex: 2035 VrIndex: 0 VrfIndex: 0 NhpIndex: 1072 EepIndex: 16388 MACAddr: 006b-880e-340c FVrf: 0 PeVid: 10 CeVID: 0 IfType: 3 TargetBlade: 0 TargetPort: 6 TrunkId: 0 [~HUAWEI-diagnose] display fei l3 statistics slot 1/1 Item Counter Last timestamp -------------------------------------------------------------------------------- RE_del_host realese scan fail 4 2015-07-29 03:26:16.128 IIDG path process 92 2015-07-29 03:39:59.997 Update NHP path 310 2015-07-29 04:00:01.266 Delete NHP path 20 2015-07-29 03:26:16.178 Add FEC FE success 40 2015-07-29 03:39:59.997 VPNacross delete reference fail 27 2015-07-29 04:00:00.136 NHP delete no need 4 2015-07-29 03:26:16.178 NHP sort fail 330 2015-07-29 04:00:01.266 NHP add no need 61 2015-07-29 04:00:01.266
- 如果ARP配置錯誤,請修正ARP配置。
- 請檢查ARP資訊錯誤是否因為上述原因引起。如果問題沒有解決,請執行步驟8。
- 檢查是否存在奇偶校驗錯誤。
- 在診斷視圖下執行指令行save logfile diagnose-log,收集裝置的診斷日志資訊(儲存在flash:/logfile/diag.log檔案中),檢查是否存在parity error字段。如果存在parity error字段,請執行步驟9。
- 請收集如下資訊,并聯系技術支援人員。上述步驟的執行結果。裝置的配置檔案、日志資訊和告警資訊。