IP : 简单网络管理协议 (SNMP)

SNMP计数器:常见问题

2016 年 10 月 27 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 8 月 22 日) | 反馈


目录


简介

本文提供常见问题解答,并且指导用户查找与Cisco设备有关的SNMP和SNMP问题的有用资源。

SNMP计数器问题

Q. 应该使用哪个MIB接口计数器?

A. 在SNMP的接口管理根据两个表:ifTable (仅限注册用户)和其分机,在RFC1213/RFC2233 (仅限注册用户)描述的ifxTable。接口能有几块层,取决于媒体,并且每下层由分开的行在表里代表。更高层和较低层之间的关系在ifStackTable (仅限注册用户)描述。ifTable定义了入站和出站八位位组(ifInOctets (仅限注册用户) /ifOutOctets),数据包(ifInUcastPkts (仅限注册用户) /ifOutUcastPkts (仅限注册用户), ifInNUcastPkts (仅限注册用户) /ifOutNUcastPkts (仅限注册用户)),错误和丢弃的32位计数器。ifxTable提供相似的64位计数器,也呼叫高容量(HC)计数器:ifHCInOctets (仅限注册用户) /ifHCOutOctets (仅限注册用户)和ifHCInUcastPkts (仅限注册用户) /ifHCOutUcastPkts (仅限注册用户)。

Q. 什么时候应该使用64位计数器?

A. RFC 2233采用扩展64位计数器,用于高容量接口,因为其中的32位计数器没有提供足够的容量,离线过快。leavingcisco.com

随着网络媒体速度的增加,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位计数器。这意味着64位计数器不支持10Mb以太网端口,只有100 MB Fast-Ethernet和其他高速端口支持64位计数器。

Q. SNMP哪个版本要求查询64位计数器?

A. SNMPv2C或SNMPv3要求查询64位计数器。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 14.32.5.18 ifName.1


ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.1 DISPLAY STRING- (ascii) sc0

与SNMPv1的查询, HP OpenView snmpget的默认

# snmpget -c public 14.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 14.32.5.18 ifHCInOctets.1


ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.1 Counter64 622366215 

Q. 哪些Cisco设备实现64位SNMP计数器,特别是IF-MIB的?

A. 这些Cisco设备实现64位SNMP计数器:

注意: 您必须是注册用户,并且您必须登陆为了访问Cisco Bug ID链路和发现详细Bug信息。

注意: Cisco IOS软件比20 Mbps不支持较少的接口速度的64位计数器。这意味着10 Mb以太网端口不支持64位计数器。100 Mb Fast-Ethernet和仅其他高速端口支持64位计数器。

Q. ifInOctets和ifOutOctets SNMP计数器同show interfaces In/Out counters一样?

A. 是,但是,只有当SNMP从引导程序时间启用。如果将Cisco设备进行通电,然后启用SNMP,则SNMP计数器从0开始。他们不自动地拾起他们的从CLI输出的值。

Q. ifInOctets是否和ifOutOctets计数器包括成帧开销(点对点协议,高级数据链路控制(HDLC)) ?

A. 可以。

Q. 在异步传输模式接口,计数器是否包括信元头?

A. 异步传输模式(ATM)计数器不包括ATM开销(填充的信元头和的AAL5)。

Q. SNMP计数器为什么不返回和一样CLI显示命令的编号?

A. 作为计数器定义的SNMP对象必须遵守RFC1155leavingcisco.com

"3.2.3.3.计数器

这个应用全局类型代表一个非负整数,当该非负整数开始围包并再次从零增加时,它一直会增加到最大值。此通知单为计数器指定最大值2^32-1 (4294967295 十进制)"。

没有重置SNMP的方法与零相反没有需要重新加载设备。

因为SNMP的限制不存在,所以从CLI show命令的计数器输出可以在接口上重置。

在MIB-2定义的原始接口计数器是32位计数器。对于10 Mbps接口, 32位计数器能在57分钟之内理论上包裹。避免与这样长时间的间断性是容易的。但是对于100 Mbps,最低的理论上的暂停离线时间是5.7分钟。对于1 Gbps接口,它下跌对34秒。授权这些时期是为背对背完整尺寸的信息包发射,理论上的理想。即使如此,接口速度越快,它避免计数器错过换行就越困难。作为对此问题的一解决方案, SNMPv2 SMI定义一种新的对象类型, counter64, 64位计数器的。所以,有数在分机接口表定义的新建的64位计数器(ifxTable)里定义在RFC 1573leavingcisco.com (由RFC 2233的最新已取代的leavingcisco.com )。这些是从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.1.10)为仅ATM LANE LEC sub-interface实现。对于Catalyst workgroup交换机, 64位计数器支持在版本3.1实现。

注意: 您必须使用SNMPv2C或SNMPv3协议为了获取所有counter64对象。

SNMP计数器和show命令等同的问题

Q. 什么执行Cisco路由器为以下SNMP MIB变量执行:ifInOctets、ifInUcastPkts、ifInNUcastPkts、ifInDiscards、ifInErrors、ifInUnknownProtos、ifOutOctets、ifOutUcastPkts、ifOutNUcastPkts、ifOutDiscards、ifOutErrors和ifOutQLen ?

A. 参见此表关于详细信息。这些是从RFC1213-MIB (仅限注册用户)。

ifInNUcastPkts (.1.3.6.1.2.1.2.2.1.12) 这些是计数Inbound广播和组播信息包。
ifInDiscards (.1.3.6.1.2.1.2.2.1.13) 这些算作是没有缓冲区如在show interfaces命令反射
ifInErrors (.1.3.6.1.2.1.2.2.1.14) 这些是计数所有输入错误如在show interfaces命令反射
ifInUnknownProtos (.1.3.6.1.2.1.2.2.1.15) 这些算作是未保密的错误。
ifOutOctets (.1.3.6.1.2.1.2.2.1.16) 这些是接口输出的字节数的计数如show interfaces命令所显示
ifOutUcastPkts (.1.3.6.1.2.1.2.2.1.17) 这些是计数出局广播和组播信息包。
ifOutDiscards (.1.3.6.1.2.1.2.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.2.1.21) 这是允许的数据包编号在输出队列如show interfaces命令所显示

不说的变量以前列出了他们在show interfaces出现不是可用的任何地方除SNMP之外。

示例

以Cisco IOS软件Release12.2(2)T1运行的此示例使用一3640。使用的Read-Only(RO)社区字符串公共,并且使用的读Write(RW)社区字符串私有。参考如何配置SNMP团体字符串关于如何配置在设备的SNMP团体字符串的更多信息。

此输出是在特权模式执行的特点show ip interface brief命令

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   99.99.99.99     YES NVRAM  down    dow 
Loopback0    10.1.10.1       YES NVRAM  up      up 
Loopback1    unassigned      YES NVRAM  up      up 
Loopback101  3.3.3.3  YES NVRAM  administratively down dow 
Loopback200  4.4.4.14 YES NVRAM  administratively down dow 
Loopback201  4.4.4.18 YES NVRAM  administratively down dow 

此输出是否是MIB对象Descr (.1.3.6.1.2.1.2.2.1.2)上一个路由器的,是文本字符串包含关于接口的信息。这给予接口名称和说明如获取,使用上一个CLI命令输出。也可以使用ifName (1.3.6.1.2.1.31.1.1.1.2),但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
  1. 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 

    ifInDiscards为此路由器所有接口是零。如果此与CLI结果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 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
  2. 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.

    为了确定哪个接口这是,比较它以上ifDescr的输出,显示该这是从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 
  3. 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 :98interfaces.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

    ifOutOctets的输出与show interfaces FastEthernet 0/0命令的命令行输出不匹配 ,但是很类似。这是因为在轮询接口和执行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 
  4. 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 
  5. 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 

    ifOutErrors为所有接口是零。用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 
  6. 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

    ifOutQLen为所有接口是零。用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 

Q. show interfaces语句有何关系没有缓冲区输入队列丢弃?而SNMP outdiscards给输出队列丢弃, SNMP indiscards为什么不给而不是缓冲区计数输入队列丢弃

A. 不同locIfInputQueueDrops/ifInDiscards工作跟locIfOutputQueueDrops/ifOutDiscards。ifInDiscards计数被投掷的离开因缺乏一种系统资源例如缓冲区数据包的数量。这通常是locIfInputQueueDrops的一子集。您经常看到locIfInputQueueDrops = ifInDiscards。因为他们点击Input queue限制,但是, locIfInputQueueDrops也计数被丢弃的数据包编号。那么通常,您看到locIfInputQueueDrops > ifInDiscards。

摘要

locIfInputQueueDrops =队列限制丢弃+ No buffer drops ifInDiscards = No buffer drops (和是locIfInputQueueDrops的一子集)

当他们计数同样事件时, locIfOutputQueueDrops和ifOutDiscards总是相等的。当数据包从一个接口快速交换到另一个时,那些事件点击输出队列限度和没有硬件tx缓冲区。上一个MIB对象的OIDs是这些:

OLD-CISCO-INTERFACES-MIB (仅限注册用户) RFC1213-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

Q. 不能轮询在路由器的缓冲区?

A. 可以。您不能为ifInDiscards轮询为了轮询缓冲区。

Q. 如何轮询在路由器的队列限制丢包?

A. 使用使用SNMP,没有show interfaces命令的方式能打开进入输出丢弃的各自的元素。

考虑关于什么的此最新信息进入输出丢弃计数器:

输入丢弃=队列限制丢包+限制的丢包+ SMT队列全双工丢包+ RSRB下降+ no buffer drops

另外,从未清除SNMP计数器,即使清除接口。


相关信息


Document ID: 26007