萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 網路安全 >  >> 網路應用技術 >> 應用程式教學

思科路由器日常維護與排錯:show interface 深度解讀與關鍵計數器實戰

show interface 是思科路由器故障排查的「核磁共振」。掌握每個計數器的物理含義,才能從海量輸出中秒級定位故障。本文以 7507 平台為例,通用於 ISR/ASR/Catalyst 全系。

核心命令變體

  • show interfaces fastethernet slot/port-adapter/port (如 sh int fa 1/0/0);
  • show interfaces pos slot/port-adapter/port (如 sh int pos 2/0/0);
  • 簡寫:sh int gi1/0/1、sh int te0/0/0。

實戰輸出逐字段解讀 (FastEthernet 示例)

FastEthernet1/0/0 is up, line protocol is up
  Hardware is TSWITCH, address is 00e0.f7a4.5130 (bia 00e0.f7a4.5130)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive set (10 sec)
  Half-duplex, 100BaseTX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:05:30, output 00:00:00, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  312 packets input, 18370 bytes, 0 no buffer
  Received 216 broadcasts, 0 runts, 0 giants, 0 throttles
  3 input errors, 0 CRC, 0 frame, 0 overrun, 3 ignored, 0 abort
  0 input packets with dribble condition detected
  15490 packets output, 1555780 bytes, 0 underruns
  2 output errors, 0 collisions, 2 interface resets
  0 babbles, 0 late collision, 0 deferred
  0 lost carrier, 0 no carrier
  2 output buffer failures, 0 output buffers swapped out

關鍵字段物理含義與告警閾值

字段含義告警閾值/經驗值
is up / line protocol is up物理層/數據鏈路層狀態up/up 正常;down/down=物理斷鏈;up/down=封裝不匹配/Keepalive 失敗/無 VLAN
MTU最大傳輸單元以太網 1500;巨型幀 9000+;雙端必須一致
BW帶寬參考值 (kbps),供路由協議計算開銷手動 bandwidth 命令修正,影響 OSPF/EIGRP 路由選擇
rely 255/255接口可靠性 (5分鐘滑動窗口)<255 表示有丟包/錯誤,持續 <200 需介入
load 1/255接口負載 (5分鐘平均)>200 (80%) 觸發擴容/QoS 調優
Encapsulation封裝類型 (ARPA/HDLC/PPP/FR/PPPoE)雙端必須一致,否則 up/down
Half-duplex, 100BaseTX雙工/速率模式全雙工為標準;半雙工產生碰撞、晚期碰撞
input errors所有輸入錯誤總和 (runts+giants+CRC+frame+overrun+ignored)>0 需深挖具體子項
CRC循環冗余校驗失敗高 CRC = 線纜/水晶頭/端口/模塊硬件故障,優先換線/換口
frameCRC 錯誤 + 非整數字節通常伴隨碰撞/雙工不匹配
overrun接收速率超過硬件處理能力CPU/總線瓶頸,升級硬件/優化轉發
ignored接口內部緩存不足丟包調大 hold-queue in / 檢查 CPU
runts / giants小於 64B / 大於 1518B 的幀線纜故障/雙工不匹配/惡意攻擊
output errors / collisions / interface resets輸出錯誤/碰撞/接口重置次數resets >0 表示接口曾凍結/重啟,檢查錯誤幀源頭
late collision發送序言後發生碰撞線纜超長 (>100m) 或雙工不匹配鐵證
lost carrier / no carrier傳輸中載波丟失光模塊/雙絞線/對端端口故障
output buffer failures輸出緩存分配失敗內存不足/突發流量衝擊,調 buffers / 擴內存

POS 接口特有字段

  • parity:SONET/SDH 偶校驗錯誤,光纖品質/模塊問題;
  • applique:子卡/模塊級錯誤;
  • carrier transitions:載波狀態翻轉次數,>0 表示光鏈路抖動。

排查黃金法則

  1. 先看物理層:CRC、runts、giants、late collision、carrier → 換線/換模塊/檢查長度;
  2. 再看緩存/CPU:ignored、overrun、buffer failures → 擴資源/優化轉發;
  3. 最後看協議/邏輯:encapsulation mismatch、keepalive failure、ARP/路由問題。

建立 基線快照 (定期 sh int | i errors|CRC|overrun|ignored|resets 存檔),對比異常即可秒級發現退化趨勢。

copyright © 萬盛學電腦網 all rights reserved