本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本文檔介紹有關SNMP計數器的常見問題解答,因為它們與Cisco裝置相關。
附註:只有完成註冊的思科使用者能存取思科內部工具與資訊。
答:基於SNMP的介面管理基於兩個表:ifTable 及其擴展,ifXTable,如RFC1213/RFC2233中所述。介面可以有多個層,這取決於介質,每個子層在表中用單獨的行表示。ifStackTable中描述了較高層與較低層之間的關係。ifTable為入站和出站八位組(ifInOctets /ifOutOctets)、資料包(ifInUcastPkts/ifOutUcastPkts) 、ifInNUcastPkts /ifOutNUcastPkts、錯誤和丟棄定義32位計數器。ifXTable提供類似的64位計數器,也稱為高容量(HC)計數器: ifHCInOctets/ ifHCOutOctets和ifHCInUcastPkts / ifHCOutUcastPkts。
答:RFC 2233 針對高容量介面採用了擴展的64位計數器,其中32位計數器不提供足夠容量且包裝太快。
隨著網路媒體的速度增加,32位元計數器包裝的最短時間會減少。例如,10 Mbps的背對背全大小資料包流導致ifInOctets在57分鐘內完成換行。在100 Mbps時,最短自動換行時間為5.7分鐘,而在1 Gbps時,最短自動換行時間為34秒。
注意:SNMP計數器包含,而命令列介面(CLI)計數器則不包含。
對於以每秒20,000,000 (20,000,000)位或更低速率運行的介面,必須使用32位位元組和資料包計數器。對於運行速度高於每秒2000萬位和低於每秒650,000,000位的介面,必須使用32位資料包計數器和64位二進位制八位數計數器。對於以650,000,000位/秒或更快的速率運行的介面,必須使用64位資料包和八位組計數器。
相應地,Cisco IOS®軟體不支援介面速度低於20 Mbps的64位計數器。這表示10 Mb乙太網路連線埠不支援64位元計數器,只有100 Mb快速乙太網路和其他高速連線埠支援64位元計數器。
A.查詢64位計數器需要SNMPv2C或SNMPv3。SNMPv1不支援64位計數器。請注意,ifInOctets = .1.3.6.1.2.1.2.2.1.10是32位元計數器,而64位元版本是ifHCInOctets = .1.3.6.1.2.1.31.1.1.1.6。
舉例來說:
Catalyst 5000使用HP OpenView snmpget,預設為SNMPv1
# snmpget -c public 10.32.5.18 ifName.1 ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.1 DISPLAY STRING- (ascii) sc0使用SNMPv1查詢,HP OpenView snmpget的預設設定
# snmpget -c public 10.32.5.18 ifHCInOctets.1 snmpget Agent reported error with variable #1. .iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry. ifHCInOctets.1 SNMP Variable does not exist or access is denied.與SNMPv2C相同的查詢
# snmpget -v 2c -c public 10.32.5.18 ifHCInOctets.1 ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.1 Counter64 622366215
答:這些思科裝置實施64位SNMP計數器:
注意:您必須是註冊使用者,並且必須登入才能訪問思科錯誤ID連結和檢視詳細的錯誤資訊。
Cisco 2500、2600路由器-這些路由器不支援64位計數器。
Catalyst 2950和3550 -從Cisco Bug ID CSCdx67611和Cisco Bug ID CSCdw52807(僅限註冊使用者)起,Cisco IOS軟體版本12.1(11)EA1開始支援該軟體。
Catalyst 2900XL和3500XL -從Cisco Bug ID CSCds45300起,對Cisco IOS軟體版本12.0(5)WC3的支援開始了。
Catalyst 5000系列-自Cisco IOS軟體版本3.x開始。在RSM/RSFC上,從Cisco Bug ID CSCds50549(僅限註冊使用者)起開始支援Cisco IOS軟體版本12.1(6)E1。
Catalyst 5000/6000 ATM模組-自思科IOS軟體版本12.0(14)W05(20)起,請參閱思科漏洞ID CSCds07238。
Catalyst 6000 Gigabit乙太網WAN OSM -自Cisco IOS軟體版本12.1.12E起,請參閱Cisco Bug ID CSCdw64849(僅限註冊使用者)。
Catalyst 6000系列-所有Cisco IOS軟體版本。WS-F6K-MSFC和MSM支援從Cisco IOS軟體版本12.1(8a)E4開始。
Catalyst 8500系列-從Cisco IOS軟體版本12.0(5)W5(13)開始支援該產品。
隧道介面-從Cisco IOS軟體版本12.0(16)S開始,請參閱思科漏洞ID CSCdt58029。
注意:Cisco IOS軟體不支援對低於20 Mbps的介面速度使用64位計數器。這表示10 Mb乙太網路連線埠不支援64位元計數器。只有100 Mb快速乙太網和其他高速埠支援64位計數器。
A.是,但僅當SNMP從啟動時間啟用時。如果打開Cisco裝置電源,然後啟用SNMP,則SNMP計數器從0開始。它們不會從CLI輸出中自動提取它們的值。
答:是的。
A.非同步傳輸模式(ATM)計數器不包括ATM開銷(信元報頭和AAL5填充)。
答:定義為計數器的SNMP對象必須遵守RFC1155 "3.2.3.3。計數器.
此應用程式範圍型別代表非負整數,當它換行並從零開始再次增加時,它會單調遞增直到達到最大值。此備註指定了計數器的最大值為2^32-1(4294967295十進位制)。」
在無需重新載入裝置的情況下,沒有方法可將SNMP計數器重置為零。
由於沒有SNMP限制,因此可在介面上重置CLIshow 命令的計數器輸出。
MIB-2中定義的原始介面計數器是32位計數器。對於10 Mbps介面,32位計數器理論上可在57分鐘內自動換行。很容易避免具有如此長週期不連續。但是,對於100 Mbps,理論的最短環繞時間為5.7分鐘。對於1 Gbps介面,該時間降至34秒。假定現在用於背對背全尺寸資料包的傳輸,這是理論上的理想。即便如此,介面速度越高,就越難避免出現反包現象。為了解決此問題,SNMPv2 SMI為64位計數器定義了新的對象型別counter64。因此,在RFC 1573(後來被RFC 2233取代)中定義的擴展介面表(ifxTable)中有幾個新的64位計數器。這些關鍵字來自IF-MIB-V1SMI.my。
ifHCInOctets(.1.3.6.1.2.1.31.1.1.1.6) | ifHCOutOctets(1.3.6.1.2.1.31.1.1.10) |
ifHCInUcastPkts(.1.3.6.1.2.1.31.1.1.7) | ifHCOutUcastPkts(.1.3.6.1.2.1.31.1.1.11) |
ifHCInMulticastPkts(.1.3.6.1.2.1.31.1.1.8) | ifHCOutMulticastPkts(.1.3.6.1.2.1.31.1.1.12) |
ifHCInBroadcastPkts(.1.3.6.1.2.1.31.1.1.9) | ifHCOutBroadcastPkts(.1.3.6.1.2.1.31.1.1.13) |
注意:只有思科註冊使用者才能訪問思科內部資訊和工具
雖然64位元計數器的基本支援已寫入Cisco IOS軟體版本11.3(從Cisco IOS軟體版本12.0開始),但只有在ATM LANE LEC子介面僅實作HCInOctets (.1.3.6.1.2.1.31.1.1.1.1.6)和ifHCOutOctets (1.3.6.1.2.1.1.1.1.10)時。對於Catalyst工作組交換機,已在版本3.1中實現64位計數器支援。
注意:必須使用SNMPv2c或SNMPv3協定才能檢索任何計數器64對象。
SNMP計數器和show命令等效問題
問:Cisco路由器會為這些SNMP MIB變數執行什麼操作:ifInOctets、ifInUcastPkts、ifInNUcastPkts、ifInDiscards、ifInErrors、ifInUnknownProtos、ifOutOctets、ifOutUcastPkts、ifOutDiscards、ifOutErrors和ifOutQLen?
注意:只有思科註冊使用者才能訪問思科內部資訊和工具
A.詳情請參閱此表。這些關鍵字來自RFC1213-MIB。
ifInNUcastPkts (.1.3.6.1.2.1.2.1.12)
這些是入站廣播和組播資料包的計數。
ifInDiscards (.1.3.6.1.2.1.2.1.13)
這些值視為沒有緩衝區,如show interfacescommand中所示。
ifInErrors (.1.3.6.1.2.1.2.1.14)
這些是show interfaces命令中顯示的所有輸入錯誤計數。
ifInUnknownProtos (.1.3.6.1.2.1.2.1.15)
這些錯誤會計為非分類錯誤。
ifOutOctets (.1.3.6.1.2.1.2.1.16)
這些是介面輸出的位元組數,如show interfaces命令所示。
ifOutUcastPkts (.1.3.6.1.2.1.2.1.17)
這些是出站廣播和組播資料包的計數。
ifOutDiscards (.1.3.6.1.2.1.2.1.19)
如show interfaces命令中所示,這些請求被計為輸出丟棄。
ifOutErrors (.1.3.6.1.2.1.2.2.1.20)
如show interfaces命令中所示,這些錯誤被計為輸出錯誤。
ifOutQLen (.1.3.6.1.2.1.2.1.21)
這是允許在輸出隊列的資料包的數量(如show interfaces命令中所示)。
前面列出的、但沒有出現在show 介面中的變數只存在於SNMP中。
範例
此範例使用搭配Cisco IOS軟體版本12.2(2)T1執行的3640。使用的唯讀(RO)社群字串是公用的,而使用的讀取/寫入(RW)社群字串是專用的。有關如何在裝置上配置SNMP社群字串的詳細資訊,請參閱配置SNMP社群字串。
以下輸出是在啟用模式下執行的show ip interface briefcommand的典型輸出:
3600#show ip interface brief
Interface IP-Address OK? Method Status Prol
BRI0/0 unassigned YES NVRAM administratively down dow
FastEthernet0/0 172.16.99.20 YES NVRAM up up
Serial0/0 unassigned YES NVRAM down dow
Serial0/0.1 unassigned YES unset down dow
BRI0/0:1 unassigned YES unset administratively down dow
BRI0/0:2 unassigned YES unset administratively down dow
Serial0/1 unassigned YES NVRAM administratively down dow
ATM1/0 unassigned YES NVRAM down dow
ATM1/0.109 10.164.0.46 YES NVRAM down dow
Virtual-Template1 192.168.99.99 YES NVRAM down dow
Loopback0 10.1.10.1 YES NVRAM up up
Loopback1 unassigned YES NVRAM up up
Loopback101 10.3.3.3 YES NVRAM administratively down dow
Loopback200 10.4.4.14 YES NVRAM administratively down dow
Loopback201 10.4.4.18 YES NVRAM administratively down dow
此輸出是MIB Object if Descr (.1.3.6.1.2.1.2.2.1.2),用於表示上一個路由器,它是一個文本字串,包含有關介面的資訊。如此將獲得使用先前CLI命令輸出的介面名稱和說明。還可以使用ifName (.1.3.6.1.2.1.31.1.1.1.1),但是ifDescr將獲得介面描述和名稱,其中ifName僅提供介面名稱。
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.2
interfaces.ifTable.ifEntry.ifDescr.1 = ATM1/0
interfaces.ifTable.ifEntry.ifDescr.2 = BRI0/0
interfaces.ifTable.ifEntry.ifDescr.3 = FastEthernet0/0
interfaces.ifTable.ifEntry.ifDescr.4 = Serial0/0
interfaces.ifTable.ifEntry.ifDescr.5 = BRI0/0:1
interfaces.ifTable.ifEntry.ifDescr.6 = BRI0/0:2
interfaces.ifTable.ifEntry.ifDescr.7 = Serial0/1
interfaces.ifTable.ifEntry.ifDescr.8 = Null0
interfaces.ifTable.ifEntry.ifDescr.10 = Foreign Exchange Office 2/0/0
interfaces.ifTable.ifEntry.ifDescr.11 = Foreign Exchange Office 2/0/1
interfaces.ifTable.ifEntry.ifDescr.12 = recEive And transMit 3/0/0
interfaces.ifTable.ifEntry.ifDescr.13 = recEive And transMit 3/0/1
interfaces.ifTable.ifEntry.ifDescr.14 = Loopback0
interfaces.ifTable.ifEntry.ifDescr.15 = Loopback1
interfaces.ifTable.ifEntry.ifDescr.16 = Loopback101
interfaces.ifTable.ifEntry.ifDescr.17 = Loopback200
interfaces.ifTable.ifEntry.ifDescr.18 = Loopback201
interfaces.ifTable.ifEntry.ifDescr.19 = Serial0/0.1
interfaces.ifTable.ifEntry.ifDescr.20 = ATM1/0.109-atm subif
interfaces.ifTable.ifEntry.ifDescr.21 = ATM1/0.109-aal5 layer
interfaces.ifTable.ifEntry.ifDescr.22 = Virtual-Template1
interfaces.ifTable.ifEntry.ifDescr.23 = Voice Encapsulation (POTS) Peer: 1
interfaces.ifTable.ifEntry.ifDescr.24 = Voice Over IP Peer: 2
interfaces.ifTable.ifEntry.ifDescr.25 = Voice Encapsulation (POTS) Peer: 111
interfaces.ifTable.ifEntry.ifDescr.26 = Voice Over IP Peer: 222
interfaces.ifTable.ifEntry.ifDescr.27 = Voice Over IP Peer: 1234
interfaces.ifTable.ifEntry.ifDescr.28 = Voice Over IP Peer: 300000
interfaces.ifTable.ifEntry.ifDescr.29 = Voice Over FR Peer: 3
interfaces.ifTable.ifEntry.ifDescr.30 = Voice Over IP Peer: 99
interfaces.ifTable.ifEntry.ifDescr.31 = Voice Encapsulation (POTS) Peer: 9
interfaces.ifTable.ifEntry.ifDescr.32 = BRI0/0-Physical
interfaces.ifTable.ifEntry.ifDescr.33 = BRI0/0-Signaling
interfaces.ifTable.ifEntry.ifDescr.34 = BRI0/0:1-Bearer Channel
interfaces.ifTable.ifEntry.ifDescr.35 = BRI0/0:2-Bearer Channel
-
ifInDiscards (.1.3.6.1.2.1.2.1.13):
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.13
interfaces.ifTable.ifEntry.ifInDiscards.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.2 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.3 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.4 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.5 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.6 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.7 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.8 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.10 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.11 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.12 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.13 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.14 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.15 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.16 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.17 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.18 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.19 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.20 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.21 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.22 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.23 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.24 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.25 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.26 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.27 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.28 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.29 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.30 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.31 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.32 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.33 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.34 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.35 = Counter32: 0
此路由器所有介面的ifInDiscardsis zero。如果將此結果與show interfaces fastEthernet 0/0命令的CLI結果進行比較,則會確認結果:
3600#show interfaces fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is 0001.42b4.fe81 (bia 0001.42b4.fe81)
Description: testme
Internet address is 172.16.99.20/24
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)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, 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, 323 drops
5 minute input rate 1000 bits/sec, 2 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1767411 packets input, 178272010 bytes
Received 1161500 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
7146925 packets output, 765049281 bytes, 0 underruns(0/0/0)
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 461 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
-
ifInErrors (.1.3.6.1.2.1.2.1.14):
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.14
interfaces.ifTable.ifEntry.ifInErrors.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.2 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.3 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.4 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.5 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.6 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.7 = Counter32: 1
interfaces.ifTable.ifEntry.ifInErrors.8 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.10 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.11 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.12 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.13 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.14 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.15 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.16 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.17 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.18 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.19 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.20 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.21 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.22 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.23 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.24 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.25 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.26 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.27 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.28 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.29 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.30 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.31 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.32 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.33 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.34 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.35 = Counter32: 0
此輸出顯示,介面interfaces.ifTable.ifEntry.ifInErrors.7 = Counter32: 1只有一個輸入錯誤。
要確定這是哪個介面,請將其與ifDescrabove的輸出進行比較,該輸出顯示這是來自interfaces.ifTable.ifEntry.ifDescr.7 = Serial0/1。現在請在啟用模式下執行show interfaces serial 0/1命令以驗證之前的結果:
3600#show interfaces serial 0/1
Serial0/1 is administratively down, line protocol is down
Hardware is DSCC4 Serial
Description: atm-dxi test
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ATM-DXI, loopback not set
Keepalive not set
Last input never, output never, output hang never
Last clearing of "show interface" counters 1w1d
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
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
1 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 1 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=down DSR=down DTR=down RTS=down CTS=down
-
ifOutOctets (.1.3.6.1.2.1.2.2.1.16):
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.16
interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: 98
interfaces.ifTable.ifEntry.ifOutOctets.2 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.3 = Counter32: 765470674
interfaces.ifTable.ifEntry.ifOutOctets.4 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.5 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.6 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.7 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.8 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.10 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.11 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.12 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.13 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.14 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.15 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.16 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.17 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.18 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.19 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.20 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.21 = Counter32: 98
interfaces.ifTable.ifEntry.ifOutOctets.22 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.23 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.24 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.25 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.26 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.27 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.28 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.29 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.30 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.31 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.32 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.33 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.34 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutOctets.35 = Counter32: 0
如果將之前的結果與ifDescr的輸出進行比較,則會指示以下情況:
-
interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: 98與interfaces.ifTable.ifEntry.ifDescr.1 = ATM1/0相對應
-
interfaces.ifTable.ifEntry.ifOutOctets.3 = Counter32: 765470674對應於interfaces.ifTable.ifEntry.ifDescr.3 = FastEthernet0/0
-
interfaces.ifTable.ifEntry.ifOutOctets.21 = Counter32: 98與interfaces.ifTable.ifEntry.ifDescr.21 = ATM1/0.109-aal5層對應
以下是在啟用模式下執行的每個先前介面的CLI show interfaces 命令的輸出:
3600#show interfaces atM 1/0
ATM1/0 is down, line protocol is down
Hardware is RS8234 ATMOC3
MTU 4470 bytes, sub MTU 4470, BW 155000 Kbit, DLY 80 usec,
reliability 5/255, txload 1/255, rxload 1/255
Encapsulation ATM, loopback not set
Encapsulation(s): AAL5
1024 maximum active VCs, 1 current VCCs
VC idle disconnect time: 300 seconds
Last input never, output 1w1d, 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: None
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
2 packets output, 98 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 output buffer failures, 0 output buffers swapped out
3600#show interfaces fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is 0001.42b4.fe81 (bia 0001.42b4.fe81)
Description: testme
Internet address is 172.16.99.20/24
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)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, 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, 323 drops
5 minute input rate 2000 bits/sec, 3 packets/sec
5 minute output rate 1000 bits/sec, 1 packets/sec
1772214 packets input, 178767841 bytes
Received 1164210 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
7149179 packets output, 765450524 bytes, 0 underruns(0/0/0)
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 461 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
ifOutOctetsts的輸出與show interfaces FastEthernet 0/0命令的CLI輸出不匹配,但是很類似。這是因為輪詢介面和執行CLI命令時可能發生延遲。
3600#show interfaces atM 1/0.109
ATM1/0.109 is down, line protocol is down
Hardware is RS8234 ATMOC3
Description: pvc
Internet address is 10.164.0.46/30
MTU 4470 bytes, BW 2250 Kbit, DLY 80 usec,
reliability 5/255, txload 1/255, rxload 1/255
Encapsulation ATM
0 packets input, 0 bytes
2 packets output,98 bytes
0 OAM cells input, 77093 OAM cells output
AAL5 CRC errors : 0
AAL5 SAR Timeouts : 0
AAL5 Oversized SDUs : 0
AAL5 length violation : 0
AAL5 CPI Error : 0
-
ifOutDiscards (.1.3.6.1.2.1.2.1.19):
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.19
interfaces.ifTable.ifEntry.ifOutDiscards.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.2 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.3 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.4 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.5 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.6 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.7 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.8 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.10 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.11 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.12 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.13 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.14 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.15 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.16 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.17 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.18 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.19 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.20 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.21 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.22 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.23 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.24 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.25 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.26 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.27 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.28 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.29 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.30 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.31 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.32 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.33 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.34 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.35 = Counter32: 0
所有介面的ifOutDiscards均為零。以show interfaces fastEthernet 0/0命令為例,此命令產生以下結果:
3600#show interfaces fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is 0001.42b4.fe81 (bia 0001.42b4.fe81)
Description: testme
Internet address is 172.16.99.20/24
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)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, 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, 323 drops
5 minute input rate 1000 bits/sec, 2 packets/sec
5 minute output rate 1000 bits/sec, 1 packets/sec
1774581 packets input, 179005552 bytes
Received 1165620 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
7150259 packets output, 765645035 bytes, 0 underruns(0/0/0)
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 461 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
-
ifOutErrors (.1.3.6.1.2.1.2.2.1.20):
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.20
interfaces.ifTable.ifEntry.ifOutErrors.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.2 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.3 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.4 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.5 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.6 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.7 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.8 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.10 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.11 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.12 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.13 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.14 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.15 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.16 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.17 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.18 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.19 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.20 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.21 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.22 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.23 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.24 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.25 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.26 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.27 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.28 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.29 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.30 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.31 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.32 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.33 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.34 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.35 = Counter32: 0
所有介面的ifOutErrorsis zero。以show interfaces fastEthernet 0/0命令為例,此命令產生以下結果:
3600#show interfaces fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is 0001.42b4.fe81 (bia 0001.42b4.fe81)
Description: testme
Internet address is 172.16.99.20/24
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)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, 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, 323 drops
5 minute input rate 0 bits/sec, 1 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1776187 packets input, 179154616 bytes
Received 1166778 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
7150781 packets output, 765744231 bytes, 0 underruns(0/0/0)
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 461 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
-
ifOutQLen (.1.3.6.1.2.1.2.2.1.21):
snmpwalk 172.16.99.20 public .1.3.6.1.2.1.2.2.1.21
interfaces.ifTable.ifEntry.ifOutQLen.1 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.2 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.3 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.4 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.5 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.6 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.7 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.8 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.10 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.11 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.12 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.13 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.14 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.15 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.16 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.17 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.18 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.19 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.20 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.21 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.22 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.23 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.24 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.25 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.26 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.27 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.28 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.29 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.30 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.31 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.32 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.33 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.34 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.35 = Gauge32: 0
所有介面的ifOutQLenis zero。以show interfaces fastEthernet 0/0命令為例:
3600#show interfaces fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is 0001.42b4.fe81 (bia 0001.42b4.fe81)
Description: testme
Internet address is 172.16.99.20/24
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)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, 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, 323 drops
5 minute input rate 0 bits/sec, 1 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1776912 packets input, 179225431 bytes
Received 1167240 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
7151102 packets output, 765796341 bytes, 0 underruns(0/0/0)
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 461 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
問題: show interfacesstatementno buffersandinput queue drops之間有什麼關係?為什麼SNMP giveno bufferscounts和notinput queue的inDiscards會丟棄,而SNMP的outDiscards of SNMP giveoutput queue會丟棄?
A.locIfInputQueueDrops/ifInDiscards與locIfOutputQueueDrops/ifOutDiscards的工作方式不同。ifInDiscards會計算因缺少系統資源(如緩衝區)而被丟棄的資料包數量。這通常是locIfInputQueueDrops的子集。您經常會看到locIfInputQueueDrops = ifInDiscards。但是,locIfInputQueueDrops也會計算由於達到輸入隊列限制而丟棄的資料包的數量。一般而言,您會看到locIfInputQueueDrops > ifInDiscards。
摘要
locIfInputQueueDrops = Queue Limit Drops + No Buffer Drops ifInDiscards = No Buffer Drops(是locIfInputQueueDrops的子集)
locIfOutputQueueDrops和ifOutDiscards在計數相同事件時始終相等。當資料包從一個介面快速交換到另一個介面時,這些事件達到輸出隊列限制,並且沒有硬體tx緩衝區。先前的MIB物件的OID如下:
FromOLD-CISCO-INTERFACES-MIB
FromRFC1213-MIB
locIfInputQueueDrops = .1.3.6.1.4.1.9.2.2.1.1.26
ifInDiscards = .1.3.6.1.2.1.2.2.1.13
locIfOutputQueueDrops = .1.3.6.1.4.1.9.2.2.1.1.27
ifOutDiscards = .1.3.6.1.2.1.2.2.1.19
問題: 能否在路由器上輪詢無緩衝區?
答:是的。您可以輪詢ifInDiscards以輪詢無緩衝區。
問題: 如何輪詢路由器上的隊列限制丟棄?
答:使用SNMP時,show interfaces 命令無法分隔進入輸出丟棄的單個元素。
請考慮以下有關進入輸出丟棄計數器的內容的新資訊:
輸入丟棄=隊列限制丟棄+限制丟棄+ SMT隊列完全丟棄+ RSRB丟棄+無緩衝區丟棄
此外,SNMP計數器永遠不會清除,即使介面已清除也是如此。
相關資訊
修訂 | 發佈日期 | 意見 |
---|---|---|
3.0 |
06-Aug-2024 |
已修復中斷的連結 |
2.0 |
13-Apr-2023 |
重新認證 |
1.0 |
01-Aug-2002 |
初始版本 |