此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍有关SNMP计数器的常见问题解答,因为它们与Cisco设备相关。
注意:只有思科注册用户才能访问思科内部工具和信息。
A.基于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分钟;而在1Gbps的时候,最短则为34秒。
注意:SNMP计数器换行,命令行界面(CLI)计数器不换行。
"对于以20,000,000(2000)位/秒(或更少)速率运行的接口,必须使用32位字节和数据包计数器。"对于运行速度高于每秒200万比特的接口、每秒低于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
A.这些思科设备实施64位SNMP计数器:
注意:您必须是注册用户,并且必须登录才能访问Cisco Bug ID链接和查看详细的Bug信息。
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模块-自Cisco IOS软件版本12.0(14)W05(20)以来,请参阅思科漏洞ID CSCds07238。
Catalyst 6000千兆以太网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.1.10) |
ifHCInUcastPkts(.1.3.6.1.2.1.31.1.1.1.7) | ifHCOutUcastPkts(.1.3.6.1.2.1.31.1.1.1.11) |
ifHCInMulticastPkts(.1.3.6.1.2.1.31.1.1.1.8) | ifHCOutMulticastPkts(.1.3.6.1.2.1.31.1.1.1.12) |
ifHCInBroadcastPkts(.1.3.6.1.2.1.31.1.1.1.9) | ifHCOutBroadcastPkts(.1.3.6.1.2.1.31.1.1.1.13) |
注意:只有思科注册用户才能访问思科内部信息和工具
虽然对64位计数器的基本支持已写入Cisco IOS软件版本11.3(从Cisco IOS软件版本12.0开始),但只有ifHCInOctets (.1.3.6.1.2.1.31.1.1.1.6)和ifHCOutOctets (1.3.6.1.2.1.31.1.1.10)才对ATM LANE LEC子接口实现。对于Catalyst工作组交换机,版本3.1中已实现64位计数器支持。
注意:必须使用SNMPv2c或SNMPv3协议来检索任何计数器64对象。
SNMP计数器和show命令等效问题
问:对于这些SNMP MIB变量,Cisco路由器会执行什么操作:ifInOctets、ifInUcastPkts、ifInNUcastPkts、ifInDiscards、ifInErrors、ifInUnknownProtos、ifOutOctets、ifOutUcastPkts、ifOutNUcastPkts、ifOutDiscards、ifOutErrors和OutQLEN?
注意:只有思科注册用户才能访问思科内部信息和工具
A.有关详细信息,请参阅此表。这些关键字来自RFC1213-MIB。
ifInNUcastPkts (.1.3.6.1.2.1.2.2.1.12)
以下是入站广播和组播数据包的计数。
ifInDiscards (.1.3.6.1.2.1.2.2.1.13)
它们被视为没有缓冲区,如show interfacescommand中所反映。
ifInErrors (.1.3.6.1.2.1.2.2.1.14)
这些是show interfacescommand所反映的所有输入错误的计数。
ifInUnknownProtos (.1.3.6.1.2.1.2.2.1.15)
这些错误计为非分类错误。
ifOutOctets (.1.3.6.1.2.1.2.2.1.16)
这些是由接口输出的字节数(如show interfacescommand所示)。
ifOutUcastPkts (.1.3.6.1.2.1.2.2.1.17)
这些是出站广播和组播数据包的计数。
ifOutDiscards (.1.3.6.1.2.1.2.2.1.19)
如show interfacescommand中所示,这些数据包被视为输出丢弃。
ifOutErrors (.1.3.6.1.2.1.2.2.1.20)
如show interfacescommand中所示,这些错误视为输出错误。
ifOutQLen (.1.3.6.1.2.1.2.2.1.21)
这是允许在输出队列的数据包的数量(如 show interfacescommand所示)。
前面列出的、但没有出现在show interface中的变量只存在于SNMP中。
Examples
本示例使用运行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对象(如果描述(.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.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
此路由器所有接口的ifInDiscardsis0值。将其与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.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.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为零。以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 interfacesstatesno buffersandinput queue drops之间有什么关系?为什么inDiscards of SNMP giveno bufferscounts和notinput queue丢弃,而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以不轮询缓冲区。
问: 如何在路由器上轮询队列限制丢弃?
A.使用SNMP时,show interfaces 命令无法分隔进入输出丢弃的单个元素。
请考虑有关进入输出丢弃计数器的内容的新信息:
输入丢弃=队列限制丢弃+限制丢弃+ SMT队列完全丢弃+ RSRB丢弃+无缓冲区丢弃
此外,SNMP计数器永远不会清除,即使接口已清除。
相关信息
版本 | 发布日期 | 备注 |
---|---|---|
3.0 |
06-Aug-2024 |
已修复断开的链接 |
2.0 |
13-Apr-2023 |
重新认证 |
1.0 |
01-Aug-2002 |
初始版本 |