簡介
本檔案將說明如何排解Cisco IOS® XR路由器內介面上的循環備援檢查(CRC)錯誤問題。
必要條件
需求
思科建議您瞭解Cisco IOS XR平台。
附註:Cisco建議您必須具有Cisco IOS XR和管理CLI訪問許可權。
採用元件
本檔案中的資訊是根據Cisco IOS XR平台,包括但不限於:
- Cisco ASR 9000系列路由器(例如ASR 9006和ASR 9010)
- Cisco NCS 540系列路由器
- Cisco NCS 560系列路由器
- Cisco NCS 5500系列路由器
- Cisco NCS 5700系列路由器
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
CRC是一種基本的錯誤檢測碼,用於數位網路和儲存裝置,以檢測傳輸期間對原始資料的意外更改。它通過識別由於通訊通道上的雜訊或干擾而可能發生的損壞,來確保資料的完整性。
CRC的工作原理
CRC通過將資料塊處理為二元多項式來運行。在傳送端,一個數學演算法將該資料多項式除以一個預定的固定除數多項式,稱為生成多項式。該多項式除法的剩餘部分是一個短的、固定長度的二進位制序列,稱為CRC校驗和(或校驗值)。 然後,此校驗和會附加到原始資料上,並與之一起傳輸。
當接收資料時,接收機對接收的資料(包括附加的校驗和)執行相同的CRC計算。 如果資料傳輸沒有錯誤,則此除法的剩餘部分必須為零。如果餘數不為零,則表示在傳輸過程中檢測到錯誤,資料將被視為已損壞。CRC在檢測常見錯誤方面特別有效,例如在許多通訊通道中普遍存在的突發錯誤(多個連續的損壞位元)。
問題
Cisco IOS XR平台利用物理介面(例如乙太網、光纖等)上的CRC檢查來保持鏈路可靠性。它們提供包括CRC錯誤計數器的介面統計資訊。高CRC錯誤計數通常表示物理層問題,例如電纜故障、聯結器故障或收發器故障。Cisco IOS XR診斷命令允許工程師即時監控CRC錯誤並將其與其他介面錯誤關聯起來,以進行全面的故障排除。CRC錯誤資料整合到Cisco IOS XR遙測和日誌記錄系統中,實現主動網路運行狀況監控。
在NCS 5500/5700系列和ASR 9000系列等平台上,CRC錯誤趨勢可以觸發警報或自動工作流程,從而最大限度地減少停機時間。
識別介面CRC錯誤
故障排除的第一步是確認CRC錯誤確實正在特定介面上發生並遞增。
步驟1.在Cisco IOS XR CLI中登入到路由器並運行此命令,以確定介面的CRC錯誤計數是否正在遞增。
命令輸出示例:
RP/0/RP0/CPU0:N540X-12Z16G-SYS-D#show interfaces Te0/0/0/26
Mon Jul 21 19:50:25.842 WIB
TenGigE0/0/0/26 is up, line protocol is up
Interface state transitions: 39
Dampening enabled: penalty 0, not suppressed
half-life: 1 reuse: 750
suppress: 2000 max-suppress-time: 4
restart-penalty: 0
Hardware is TenGigE, address is xxx.xxx.xxx (bia xxx.xxx.xxx)
Description: 10G:
Internet address is Unknown
MTU 9212 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
reliability 255/255, txload 0/255, rxload 6/255
Encapsulation ARPA,
Full-duplex, 10000Mb/s, 10GBASE-LR, link type is force-up
output flow control is off, input flow control is off
Carrier delay (up) is 2000 msec, Carrier delay (down) is 100 msec
loopback not set,
Last link flapped 1w4d
Last input 00:00:00, output 00:00:00
Last clearing of "show interface" counters 01:35:40
30 second input rate 249013000 bits/sec, 27739 packets/sec
30 second output rate 34886000 bits/sec, 11563 packets/sec
152403495 packets input, 172646518724 bytes, 0 total input drops
0 drops for unrecognized upper-level protocol
Received 0 broadcast packets, 84723 multicast packets
13 runts, 0 giants, 0 throttles, 0 parity
3731 input errors, 3718 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
66477366 packets output, 24050248792 bytes, 0 total output drops
Output 0 broadcast packets, 77461 multicast packets
0 output errors, 0 underruns, 0 applique, 0 resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
在input errors下查詢CRC計數器。如果該值遞增,則確認存在CRC錯誤。
步驟2.在Cisco IOS XR CLI中登入路由器並運行此命令,以驗證和確認介面的CRC錯誤計數是否正在遞增,並提供更詳細的統計資訊。
命令輸出示例:
RP/0/RP0/CPU0:N540X-12Z16G-SYS-D# show controllers Te0/0/0/26 stats
Mon Jul 21 19:50:56.139 WIB
Statistics for interface TenGigE0/0/0/26 (cached values):
Ingress:
Input total bytes = 173638989945
Input good bytes = 173638989945
Input total packets = 153271045
Input 802.1Q frames = 0
Input pause frames = 0
Input pkts 64 bytes = 1332238
Input pkts 65-127 bytes = 14101870
Input pkts 128-255 bytes = 9711091
Input pkts 256-511 bytes = 4850242
Input pkts 512-1023 bytes = 4395212
Input pkts 1024-1518 bytes = 117306517
Input pkts 1519-Max bytes = 1577617
Input good pkts = 153271045
Input unicast pkts = 153185898
Input multicast pkts = 85158
Input broadcast pkts = 0
Input drop overrun = 0
Input drop abort = 0
Input drop invalid VLAN = 0
Input drop invalid DMAC = 0
Input drop invalid encap = 0
Input drop other = 0
Input error giant = 0
Input error runt = 13
Input error jabbers = 0
Input error fragments = 9
Input error CRC = 3729
Input error collisions = 0
Input error symbol = 370
Input error other = 0
Input MIB giant = 0
Input MIB jabber = 0
Input MIB CRC = 3729
Egress:
Output total bytes = 24170362757
Output good bytes = 24170362757
Output total packets = 66833308
Output 802.1Q frames = 0
Output pause frames = 0
Output pkts 64 bytes = 10113
Output pkts 65-127 bytes = 35246624
Output pkts 128-255 bytes = 14254990
Output pkts 256-511 bytes = 2888642
Output pkts 512-1023 bytes = 3779102
Output pkts 1024-1518 bytes = 10642390
Output pkts 1519-Max bytes = 11455
Output good pkts = 66833308
Output unicast pkts = 66755447
Output multicast pkts = 77865
Output broadcast pkts = 0
Output drop underrun = 0
Output drop abort = 0
Output drop other = 0
Output error other = 0
Input error CRC和Input MIB CRC計數器提供CRC錯誤的清楚指示。
介面CRC錯誤的常見原因
Cisco IOS XR和其他網路設備上CRC錯誤的常見原因通常源於物理層問題或配置錯誤。最常見的根本原因包括:
- 物理介質損壞或故障:包括銅纜或光纜或直接連線電纜(DAC)。
- 收發器/光纖發生故障或損壞:SFP、SFP+、QSFP等可能會降低故障或發生故障。
- 跳接面板埠故障:跳接面板上的聯結器可能會損壞或變髒。
- 網路裝置硬體故障:這可能包括線卡上的特定埠、線卡ASIC、媒體訪問控制(MAC)或交換矩陣模組。
- 連線主機/裝置中的網路介面卡(NIC)故障:遠端端的硬體可能有故障。
- 配置不匹配:如裝置之間的最大傳輸單元(MTU)大小不匹配,這會導致大資料包被錯誤截斷,導致CRC錯誤。
解決Cisco IOS XR路由器上的介面CRC錯誤的程式
識別CRC錯誤後,請執行以下步驟以系統地排除故障和解決問題。
步驟1.清除介面計數器
繼續進行故障排除之前,請清除介面計數器以獲得新的基線,並觀察CRC錯誤是否繼續增加。在Cisco IOS XR CLI中登入路由器並運行此命令以清除介面計數器。
# clear counter interface
舉例來說:
# clear counter interface Te0/0/0/26
清除後,使用show interfaces <interface>和show controllers <interface>統計資訊再次監視介面,以檢視CRC錯誤是否仍在遞增。
步驟2.檢查組態不相符(MTU)
雖然CRC錯誤比物理問題更少見,但MTU不匹配有時會導致幀截斷和隨後的CRC錯誤。
驗證MTU設定:
檢查在本地路由器和所連線對等裝置的介面上配置的MTU。
在輸出中尋找MTU <value>位元組。
命令輸出示例:
RP/0/RP0/CPU0:N540X-12Z16G-SYS-D#show interfaces Te0/0/0/26
Mon Jul 21 19:50:25.842 WIB
TenGigE0/0/0/26 is up, line protocol is up
Interface state transitions: 39
Dampening enabled: penalty 0, not suppressed
half-life: 1 reuse: 750
suppress: 2000 max-suppress-time: 4
restart-penalty: 0
Hardware is TenGigE, address is xxx.xxx.xxx (bia xxx.xxx.xxx)
Description: 10G:
Internet address is Unknown
MTU 9212 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
reliability 255/255, txload 0/255, rxload 6/255
Encapsulation ARPA,
Full-duplex, 10000Mb/s, 10GBASE-LR, link type is force-up
output flow control is off, input flow control is off
Carrier delay (up) is 2000 msec, Carrier delay (down) is 100 msec
loopback not set,
Last link flapped 1w4d
Last input 00:00:00, output 00:00:00
Last clearing of "show interface" counters 01:35:40
30 second input rate 249013000 bits/sec, 27739 packets/sec
30 second output rate 34886000 bits/sec, 11563 packets/sec
152403495 packets input, 172646518724 bytes, 0 total input drops
0 drops for unrecognized upper-level protocol
Received 0 broadcast packets, 84723 multicast packets
13 runts, 0 giants, 0 throttles, 0 parity
3731 input errors, 3718 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
66477366 packets output, 24050248792 bytes, 0 total output drops
Output 0 broadcast packets, 77461 multicast packets
0 output errors, 0 underruns, 0 applique, 0 resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
操作:確保鏈路兩端的MTU設定一致。根據需要進行調整以匹配。
步驟3.排除物理層故障(佈線和收發器)
物理層問題是導致CRC錯誤的最常見原因。
- 檢查並更換物理介質:
- 目視檢查電纜(光纖、銅纜、DAC)是否損壞、摺痕或折彎。
- 確保電纜穩固地安放在路由器介面和所連線的裝置中。
- 操作:用已知良好的電纜更換電纜。如果錯誤停止,則原電纜出現故障。
- 檢查光纖功率級別(適用於光纖介面):
- 光功率過低或過高會導致訊號惡化和CRC錯誤。
- 使用show controllers <interface> all命令檢查收發器的光功率值(Tx功率和Rx功率)。
命令輸出示例:
RP/0/RP0/CPU0:N540X-12Z16G-SYS-D# show controller Te0/0/0/26 all
Mon Jul 21 19:50:32.643 WIB
Operational data for interface TenGigE0/0/0/26:
State:
Administrative state: enabled
Operational state: Up
LED state: Green On
Phy:
Media type: R fiber over 1310nm optics
Optics:
Vendor: CISCO-ACCELINK
Part number: RTXM228-401-C88
Serial number: ACW26040HE6
Wavelength: 1310 nm
Digital Optical Monitoring:
Transceiver Temp: 39.000 C
Transceiver Voltage: 3.265 V
Alarms key: (H) Alarm high, (h) Warning high
(L) Alarm low, (l) Warning low
Wavelength Tx Power Rx Power Laser Bias
Lane (nm) (dBm) (mW) (dBm) (mW) (mA)
-- ----- ------ ------ ------ ------ ------
0 n/a -2.5 0.5603 -17.2 0.0192l 35.250
DOM alarms:
Receive Power: Warning low
Alarm Alarm Warning Warning Alarm
Thresholds High High Low Low
------- ------- ------- -------
Transceiver Temp (C): 75.000 70.000 0.000 -5.000
Transceiver Voltage (V): 3.630 3.465 3.135 2.970
Laser Bias (mA): 75.000 70.000 18.000 15.000
Transmit Power (mW): 2.239 1.122 0.151 0.060
Transmit Power (dBm): 3.500 0.500 -8.202 -12.204
Receive Power (mW): 2.239 1.122 0.036 0.015
Receive Power (dBm): 3.500 0.500 -14.413 -18.386
Alarms:
Current:
No alarms
Statistics:
FEC:
Corrected Codeword Count: 0
Uncorrected Codeword Count: 0
- 將Tx Power和Rx Power值與Warning low/high和Alarm low/high閾值進行比較。如果值超出正常操作範圍(如輸出中的「警告低」或「警報低/高」所示),請解決光路問題(例如,清潔聯結器、更換光纖跳線、檢查衰減是否過快)。
如果光纖功率級別可接受,或者您懷疑收發器本身有故障,請嘗試將收發器(SFP、SFP+、QSFP等)更換為已知良好的收發器。
步驟4.排除硬體問題(埠或線卡)
如果排除物理介質和收發器,問題必然出在路由器的硬體上。
此測試會繞過外部電纜和收發器,在埠內部循環回流量,從而檢查介面的內部電路。
步驟4.1.實施內部環回:
# clear counter interface
# conf t
# interface
# loopback internal
# commit
步驟4.2.驗證CRC錯誤:
- 使用show interfaces Te0/0/0/26監控介面的CRC錯誤。
- 如果CRC錯誤停止增加,則表明問題出在外部光學模組或外部光路(例如,光纖、配線面板、遠端裝置)。 繼續執行步驟4。(外部環回)或重點關注外部網路元件。
- 如果CRC錯誤繼續增加,則強烈表明該埠或線卡的路由器內部電路存在問題。在這種情況下,您必須繼續更換線卡或路由器本身。
步驟4.3.完成測試後刪除內部環回
# conf t
# interface <interface-id>
# no loopback internal
# commit
外部環回測試(硬環路):
此測試使用物理環回聯結器在埠(包括收發器)的物理聯結器處將訊號環回。這有助於確定問題出在收發器上還是埠的內部處理上。
步驟4.4.使用環回聯結器
這有助於將傳輸(Tx)實際連線至介面實體連線埠上的接收(Rx)路徑。
步驟4.5.使用外部環回工具包
您也可以使用此功能在介面的實體連線埠上實際連線傳輸(Tx)和接收(Rx)路徑,並在指令行介面中應用外部回送:
# clear counter interface
# conf t
# interface Te0/0/0/26
# loopback external
# commit
使用外部環回敏感識別導致CRC的硬體。如果CRC錯誤停止,則問題可能進一步向上游(例如,遠端裝置、電纜)。 如果繼續,則收發器或埠硬體可疑。
步驟4.6.完成測試後刪除外部環回
同時卸下環回介面/工具包。
# conf t
# interface Te0/0/0/26
# no loopback external
# commit
- 將介面移動到不同的連線埠/線路卡:
- 如果可能,請嘗試將電纜和收發器移至同一線卡上的不同埠。如果錯誤仍然存在,則線卡本身可能存在故障。
- 如果錯誤停止,則原始埠可能存在故障。
- 如果錯誤持續存在於同一線卡上的多個埠上,請嘗試移動到其他線卡(如果可用)。 這有助於確定問題是否與特定埠、線卡有關,還是與機箱有關。
步驟5.檢查已知問題和錯誤
在繼續進行硬體更換之前,建議檢查是否有任何已知的軟體或硬體錯誤。
- 思科Bug Search Tool:在思科Bug Search Tool(BST)中搜索您的平台、介面型別和軟體版本。
- 思科支援檔案:檢視思科現場通知、版本說明和已知警告。
如果找到相符的錯誤,請執行建議的解決方法或升級路徑。
步驟6.硬體更換
如果先前的所有故障排除步驟(包括排除任何已知的軟體錯誤)都已耗盡,並且問題依然存在,則硬體(光纖、收發器、線卡或機箱)可能有故障。
向思科技術協助中心(TAC)提出申請,以酌情獲得光纖或線卡的退貨商品授權(RMA)。
通過系統地執行這些故障排除步驟,您可以有效地診斷和解決Cisco IOS XR平台上的介面CRC錯誤。