簡介
本文說明如何對嵌入式封包擷取(EPC)中遺失的封包進行疑難排解。
必要條件
需求
熟悉Cisco IOS® XE中的嵌入式資料包捕獲。在Configure and Capture Embedded Packet on Software中對此進行了說明。
採用元件
本文中的示例基於Cisco IOS XE路由器。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
在一些情況下,捕獲通過路由器的所有資料包至關重要,但是Cisco IOS XE系統具有預設的punt管制器機制來保護控制平面。
如果達到原則限制,此機制可以捨棄某些擷取封包。
此外,您還可以配置一個選項,以增加每秒捕獲的資料包數(pps)。
這兩個元素在成功捕獲的資料包數量中起著至關重要的作用。
附註:這些引數的預設值可能與平台和版本有關。確保檢查平台和版本的相關說明,如果需要,請聯絡Cisco TAC以獲得進一步幫助。
疑難排解
龐特管制員
此監察器控制傳送到控制平面的資料包。
使用命令show platform hardware qfp active infrastructure punt statistics type punt-drop檢視由於此punt控制機制而丟棄的資料包的詳細統計資訊。
該命令將以不同的類別顯示。需要重點關注的類別是PUNT_PER_CAUSE_POLICER。
此類別包括引用嵌入式資料包捕獲功能的EPC原因。
---- show platform hardware qfp active infrastructure punt statistics type punt-drop ----
Punt Drop Statistics
Number of punt causes = 165
Drop Counter ID 11 Drop Counter Name PUNT_PER_CAUSE_POLICER Counter ID Punt Cause Name Packets ---------------------------------------------------------------------
075 EPC 994641
整體而言,統計資訊顯示使用show platform hardware qfp active infrastructure punt statistics type per-cause命令可以看到punt cause之間接收和傳輸的punt資料包的數量。
---- show platform hardware qfp active infrastructure punt statistics type per-cause ----
Global Per Cause Statistics
Number of punt causes = 165
Per Punt Cause Statistics
Packets Packets
Counter ID Punt Cause Name Received Transmitted
------------------------------------------------------------------------------------------------
075 EPC 1527458 532817
這可以瞭解哪種型別的點焊原因最會佔用點焊路徑。
show platform software punt-policer 命令會針對各種突發事件原因提供已配置pps、一致資料包、管制器丟棄的資料包以及已配置的資料包突發量的快照。在本例中,重點是EPC點選原因。
Router#show platform software punt-policer
Per Punt-Cause Policer Configuration and Packet Counters
Punt Config Rate(pps) Conform Packets Dropped Packets Config Burst(pkts) Config Alert
Cause Description Normal High Normal High Normal High Normal High Normal High
-------------------------------------------------------------------------------------------------------------------------------------------------------------
75 EPC 40000 1000 0 0 0 0 40000 1000 Off Off
附註:請記住,已配置速率和已配置突發資料包的預設值可能因平台和版本而異。
可以使用platform punt-policer epc <10-32000> [<1-100000000>]指令修改每秒的點點管制器封包數和點管制原因類別的突發封包數。
附註:請謹慎更改預設配置的點焊值,因為點焊策略器是控制平面保護機制。
Packets per Second(pps)Embed Packet Capture引數
Packets per second引數限制每秒捕獲的資料包數。
嵌入式資料包捕獲配置中的每秒資料包數引數可以用命令指示
monitorcapturecapture-namelimit[durationseconds][everynumber][packet-lengsize][packetsnumber][ppsnumber]
附註:確保將punt policer packet per second配置與EPC的pps引數配置對齊。建議保留預設值。
有關嵌入式資料包捕獲可用引數的詳細資訊,請參閱Cisco IOS Embedded Packet Capture Command Reference。
QFP利用率
使用punt policer show命令檢驗EPC原因類別是否已刪除。
如果您沒有看到EPC值增加,則不同的原因可能會導致資料包丟失,例如介面擁塞、平台限制等。
開始捕獲之前,請使用show platform hardware active qfp datapath utilization summary命令檢視每秒資料包數。在點式管制器和嵌入式資料包捕獲中配置每秒資料包引數值。
Router#show platform hardware qfp active datapath utilization summary
CPP 0: 5 secs 1 min 5 min 60 min
Input: Total (pps) 0 0 0 0
(bps) 200 400 392 200
Output: Total (pps) 2 1 1 0
(bps) 15016 9136 9144 4080
Processing: Load (pct) 1 1 1 1
Router#
最佳實踐
要獲得更好的捕獲結果,請使用命令monitor capture capture-name access-list access-list-name 。這樣,您只能捕獲增加成功捕獲的資料包數量的相關流量。
可以使用交換式連線埠分析器(SPAN)等替代工具,就擷取封包而言,取得更好的擷取結果。