Home > CISCO, Network Management, QoS > Monitor QoS Policy on Cisco Router using SNMP

Monitor QoS Policy on Cisco Router using SNMP

March 23rd, 2017

This recipe describes how to use SNMP to determine the traffic offered and drop rate for a QoS policy configured on a Cisco router.

The steps here describe which OIDs to interrogate in the CISCO-CLASS-BASED-QOS-MIB

STEP 1:

Get the SNMP ifIndex for the interface where the QoS policy is attached:
CiscoRouter#sh snmp mib ifmib ifindex | i GigabitEthernet0/1
GigabitEthernet0/1: Ifindex = 22

(or by using SNMP):
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.2.1.2.2 | grep -i GigabitEthernet0/1
RFC1213-MIB::ifDescr.22 = STRING: “GigabitEthernet0/1”

STEP 2:
Use the MIB Object cbQosCMName (1.3.6.1.4.1.9.9.166.1.7.1.1.1) to get the names of class-maps configured on the router:

snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.7.1.1.1

The output will show each class-map with its Index (i.e the cbQosConfigIndex):

root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.7.1.1.1
RFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.1025 = STRING: “class-default”
RFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2159 = STRING: “VOICE”
RFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2165 = STRING: “VIDEO”
RFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2171 = STRING: “CRITICAL”
RFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2181 = STRING: “PRODUCTIVITY”
RFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2187 = STRING: “BULK-TRANSFER”

Make a note of the values (e.g. 1025 for class-default), which is the cbQosConfigIndex.

STEP 3:
Use cbQosConfigIndex to get the cbQosPolicyIndex and cbQosObjectsIndex for individual class-maps:

Example for “class-default” above:
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.5.1.1.2 | grep -i ‘Gauge32: 1025’
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2267 = Gauge32: 1025
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2275 = Gauge32: 1025

Example for “VOICE” above:
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.5.1.1.2 | grep -i ‘Gauge32: 2159’
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2235 = Gauge32: 2159

Example for “VIDEO” above:
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.5.1.1.2 | grep -i ‘Gauge32: 2165’
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2241 = Gauge32: 2165

Example for “CRITICAL” above:
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.5.1.1.2 | grep -i ‘Gauge32: 2171’
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2247 = Gauge32: 2171

Example for “PRODUCTIVITY” above:
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.5.1.1.2 | grep -i ‘Gauge32: 2181’
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2257 = Gauge32: 2181

Example for “BULK-TRANSFER” above:
root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.5.1.1.2 | grep -i ‘Gauge32: 2187’
RFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2263 = Gauge32: 2187

STEP 4:
Determine the offered traffic rate per class:
cbQosCMPrePolicyBitRate (for info refer to: http://oidref.com/1.3.6.1.4.1.9.9.166.1.15.1.1.7 )

RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2235 = Gauge32: 1064000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2241 = Gauge32: 1000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2247 = Gauge32: 308000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2257 = Gauge32: 2835000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2263 = Gauge32: 242000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2267 = Gauge32: 24557000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2275 = Gauge32: 29154000

Determine the drop rate per class:
cbQosCMDropBitRate (for info refer to: http://oidref.com/1.3.6.1.4.1.9.9.166.1.15.1.1.18 )
The bit rate of the drops per class as the result of all features that can produce drops (e.g., police, random detect, etc.)

RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2235 = Gauge32: 0
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2241 = Gauge32: 0
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2247 = Gauge32: 0
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2257 = Gauge32: 0
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2263 = Gauge32: 0
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2267 = Gauge32: 64000
RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2275 = Gauge32: 64000

Categories: CISCO, Network Management, QoS Tags: ,
Comments are closed.