USA Finance

Jan 14 2018

SNMP Counters: Frequently Asked Questions

#snmp #header


#

SNMP Counters: Frequently Asked Questions

SNMP Counters Questions

Q. Which MIB should I use for interface counters?

A. Interface management over SNMP is based on two tables: ifTable ( registered customers only ) and its extension, ifXTable ( registered customers only ) described in RFC1213/RFC2233. Interfaces can have several layers, which depends on the media, and each sub-layer is represented by a separate row in the table. The relationship between the higher layer and lower layers is described in the ifStackTable ( registered customers only ). The ifTable defines 32-bit counters for inbound and outbound octets (ifInOctets ( registered customers only ) /ifOutOctets), packets (ifInUcastPkts ( registered customers only ) /ifOutUcastPkts ( registered customers only ). ifInNUcastPkts ( registered customers only ) /ifOutNUcastPkts ( registered customers only ) ), errors, and discards. The ifXTable provides similar 64-bit counters, also called high capacity (HC) counters: ifHCInOctets ( registered customers only ) /ifHCOutOctets ( registered customers only ). and ifHCInUcastPkts ( registered customers only ) /ifHCOutUcastPkts ( registered customers only ) .

Q. When should 64-bit counters be used?

A. RFC 2233 adopted expanded 64-bit counters for high capacity interfaces in which 32-bit counters do not provide enough capacity and wrap too fast.

As the speed of network media increases, the minimum time in which a 32-bit counter wraps decreases. For example, a 10 Mbps stream of back-to-back, full-size packets causes ifInOctets to wrap in just over 57 minutes. At 100 Mbps, the minimum wrap time is 5.7 minutes, and at 1 Gbps, the minimum is 34 seconds.

Note: The SNMP counters wrap, the command line interface (CLI) counters do not.

For interfaces that operate at 20,000,000 (20 million) bits per second or less, you must use 32-bit byte and packet counters. For interfaces that operate faster than 20 million bits per second, and slower than 650,000,000 bits per second, you must use 32-bit packet counters and 64-bit octet counters. For interfaces that operate at 650,000,000 bits/second or faster, 64-bit packet and octet counters must be used.

Correspondingly, Cisco IOS Software does not support 64-bit counters for interface speeds of less than 20 Mbps. This means that 64-bit counters are not supported on 10 Mb Ethernet ports, only 100 Mb Fast-Ethernet and other high speed ports support 64-bit counters.

Q. Which version of SNMP is required to query 64-bit counters?

A. SNMPv2C or SNMPv3 is required to query 64-bit counters. SNMPv1 does not support 64-bit counters. Be aware that ifInOctets = .1.3.6.1.2.1.2.2.1.10 is a 32-bit counter while the 64-bit version is ifHCInOctets = .1.3.6.1.2.1.31.1.1.1.6.

Catalyst 5000 uses HP OpenView snmpget, which defaults to SNMPv1

Query with SNMPv1, default for HP OpenView snmpget

Same query with SNMPv2C

Q. Which Cisco devices implement 64-bit SNMP counters, especially for the IF-MIB?

A. These Cisco devices implement 64-bit SNMP counters:

Note: You must be a registered user and you must be logged in in order to visit the Cisco bug ID links and see detailed bug information.

Cisco 2500, 2600 routers—These routers do not support 64-bit counters.

Catalyst 2950 and 3550—Support begins in Cisco IOS Software Release 12.1(11)EA1 since Cisco bug ID CSCdx67611 ( registered customers only ) and Cisco bug ID CSCdw52807 ( registered customers only ).

Catalyst 2900XL and 3500XL—Support begins in Cisco IOS Software Release 12.0(5)WC3 since Cisco bug ID CSCds45300 ( registered customers only ).

Catalyst 5000 series—Since Cisco IOS Software Release 3.x. On RSM/RSFC, support begins in Cisco IOS Software Release 12.1(6)E1 since Cisco bug ID CSCds50549 ( registered customers only ).

Catalyst 5000/6000 ATM modules—Since Cisco IOS Software Release 12.0(14)W05(20), refer to Cisco bug ID CSCds07238 ( registered customers only ) .

Catalyst 6000 Gigabit Ethernet WAN OSM—Since Cisco IOS Software Release 12.1.12E, refer to Cisco bug ID CSCdw64849 ( registered customers only ).

Catalyst 6000 series—All Cisco IOS software releases. WS-F6K-MSFC and MSM support begins in Cisco IOS Software Release 12.1(8a)E4.

Catalyst 8500 series—Support begins as of Cisco IOS Software Release 12.0(5)W5(13).

Cisco routers 3600, 4000, and higher platforms—As of Cisco IOS Software 12.0(1) and Cisco IOS Software Release 12.0(1)T, refer to Cisco bug ID CSCdj93712 ( registered customers only ) and Cisco bug ID CSCdt58029 ( registered customers only ) .

Frame Relay interfaces—As of Cisco IOS Software Release 12.0(17)S and Cisco IOS Software Release 12.2(4)T3, refer to Frame Relay 64-Bit Counters .

OC3 ATM interfaces—As of Cisco IOS Software Release 12.0(6)T, refer to Cisco bug ID CSCdm45357 ( registered customers only ).

Tunnel interfaces—As of Cisco IOS Software Release 12.0(16)S, refer to Cisco bug ID CSCdt58029 ( registered customers only ) .

Note: Cisco IOS Software does not support 64-bit counters for interface speeds of less than 20 Mbps. This means that 64-bit counters are not supported on 10 Mb Ethernet ports. Only 100 Mb Fast-Ethernet and other high speed ports support 64-bit counters.

Q. Are ifInOctets and ifOutOctets SNMP counters the same as the show interfaces In/Out counters?

A. Yes, but only when SNMP is enabled from boot time. If you power on a Cisco device, then enable SNMP, the SNMP counters start from 0. They do not automatically pick up their values from the CLI output.

Q. Do the ifInOctets and ifOutOctets counters include framing overhead (Point-to-Point Protocol, High-Level Data Link Control)?

Q. On an Asynchronous Transfer Mode interface, do the counters include the cell header?

A. Asynchronous Transfer Mode (ATM) counters do not include ATM overhead (cell headers and AAL5 padding).

Q. Why do SNMP counters not return the same number as CLI show commands?

A. An SNMP object defined as a Counter must abide by RFC1155 :

This application-wide type represents a non-negative integer which monotonically increases until it reaches a maximum value, when it wraps around and starts increasing again from zero. This memo specifies a maximum value of 2^32-1 (4294967295 decimal) for counters.

There are no methods to reset an SNMP counter to zero without the need to reload the device.

The counter output from a CLI show command can be reset on interfaces since the SNMP restrictions are not present.

The original interface counters defined in MIB-2 are 32-bit counters. For a 10 Mbps interface, a 32-bit counter could theoretically wrap in 57 minutes. It is easy to avoid discontinuities with such a long period. But for 100 Mbps, the minimum theoretical wrap time is 5.7 minutes. For 1 Gbps interfaces, it falls to 34 seconds. Granted these times are for transmission of back-to-back full-sized packets, a theoretical ideal. Even so, the higher the interface speed, the harder it becomes to avoid missing a counter wrap. As a solution to this problem, SNMPv2 SMI defined a new object type, counter64, for 64-bit counters. Therefore, there are several new 64-bit counters defined in the extension interface table (ifxTable) defined in RFC 1573 (later superceded by RFC 2233 ). These are from the IF-MIB-V1SMI.my ( registered customers only ).

Although basic support for 64-bit counters was written into Cisco IOS Software Release 11.3, which starts from Cisco IOS Software Release 12.0, only ifHCInOctets (.1.3.6.1.2.1.31.1.1.1.6) and ifHCOutOctets (1.3.6.1.2.1.31.1.1.1.10) have been implemented for ATM LANE LEC sub-interfaces only. For Catalyst workgroup switches, 64-bit counter support has been implemented in version 3.1.

Note: You must use SNMPv2c or SNMPv3 protocol in order to retrieve any counter 64 objects.

SNMP Counters and show Command Equivalent Questions

Q. What do Cisco routers do for the following SNMP MIB variables: ifInOctets, ifInUcastPkts, ifInNUcastPkts, ifInDiscards, ifInErrors, ifInUnknownProtos, ifOutOctets, ifOutUcastPkts, ifOutNUcastPkts, ifOutDiscards, ifOutErrors, and ifOutQLen?

A. See this table for details. These are from the RFC1213-MIB ( registered customers only ).


Written by admin


Leave a Reply

Your email address will not be published. Required fields are marked *