{"id":2220,"date":"2017-03-23T13:44:28","date_gmt":"2017-03-23T13:44:28","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=2220"},"modified":"2017-03-23T18:08:01","modified_gmt":"2017-03-23T18:08:01","slug":"monitor-qos-policy-on-cisco-router-using-snmp","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=2220","title":{"rendered":"Monitor QoS Policy on Cisco Router using SNMP"},"content":{"rendered":"<p>This recipe describes how to use SNMP to determine the traffic offered and drop rate for a QoS policy configured on a Cisco router.<\/p>\n<p>The steps here describe which OIDs to interrogate in the <span style=\"text-decoration: underline;\">CISCO-CLASS-BASED-QOS-MIB<\/span><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>STEP 1:<\/strong><\/span><\/p>\n<p>Get the SNMP ifIndex for the interface where the QoS policy is attached:<br \/>\nCiscoRouter#sh snmp mib ifmib ifindex | i GigabitEthernet0\/1<br \/>\nGigabitEthernet0\/1: Ifindex = 22<\/p>\n<p>(or by using SNMP):<br \/>\nroot@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.2.1.2.2 | grep -i GigabitEthernet0\/1<br \/>\nRFC1213-MIB::ifDescr.22 = STRING: &#8220;GigabitEthernet0\/1&#8221;<!--more--><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>STEP 2:<\/strong> <\/span><br \/>\nUse 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:<\/p>\n<p>snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.7.1.1.1<\/p>\n<p>The output will show each class-map with its Index (i.e the cbQosConfigIndex):<\/p>\n<p>root@Linux# snmpwalk -v2c -c communityname 10.0.200.12 1.3.6.1.4.1.9.9.166.1.7.1.1.1<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.1025 = STRING: &#8220;class-default&#8221;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2159 = STRING: &#8220;VOICE&#8221;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2165 = STRING: &#8220;VIDEO&#8221;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2171 = STRING: &#8220;CRITICAL&#8221;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2181 = STRING: &#8220;PRODUCTIVITY&#8221;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.7.1.1.1.2187 = STRING: &#8220;BULK-TRANSFER&#8221;<\/p>\n<p>Make a note of the values (e.g. 1025 for class-default), which is the cbQosConfigIndex.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>STEP 3:<\/strong><\/span><br \/>\nUse cbQosConfigIndex to get the cbQosPolicyIndex and cbQosObjectsIndex for individual class-maps:<\/p>\n<p>Example for &#8220;class-default&#8221; above:<br \/>\nroot@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 &#8216;Gauge32: 1025&#8217;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2267 = Gauge32: 1025<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2275 = Gauge32: 1025<\/p>\n<p>Example for &#8220;VOICE&#8221; above:<br \/>\nroot@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 &#8216;Gauge32: 2159&#8217;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2235 = Gauge32: 2159<\/p>\n<p>Example for &#8220;VIDEO&#8221; above:<br \/>\nroot@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 &#8216;Gauge32: 2165&#8217;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2241 = Gauge32: 2165<\/p>\n<p>Example for &#8220;CRITICAL&#8221; above:<br \/>\nroot@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 &#8216;Gauge32: 2171&#8217;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2247 = Gauge32: 2171<\/p>\n<p>Example for &#8220;PRODUCTIVITY&#8221; above:<br \/>\nroot@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 &#8216;Gauge32: 2181&#8217;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2257 = Gauge32: 2181<\/p>\n<p>Example for &#8220;BULK-TRANSFER&#8221; above:<br \/>\nroot@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 &#8216;Gauge32: 2187&#8217;<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.5.1.1.2.2231.2263 = Gauge32: 2187<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>STEP 4:<\/strong> <\/span><br \/>\n<strong>Determine the offered traffic rate per class:<\/strong><br \/>\ncbQosCMPrePolicyBitRate (for info refer to: http:\/\/oidref.com\/1.3.6.1.4.1.9.9.166.1.15.1.1.7 )<\/p>\n<p>RFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2235 = Gauge32: 1064000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2241 = Gauge32: 1000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2247 = Gauge32: 308000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2257 = Gauge32: 2835000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2263 = Gauge32: 242000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2267 = Gauge32: 24557000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.7.2231.2275 = Gauge32: 29154000<\/p>\n<p><strong>Determine the drop rate per class:<\/strong><br \/>\ncbQosCMDropBitRate (for info refer to: http:\/\/oidref.com\/1.3.6.1.4.1.9.9.166.1.15.1.1.18 )<br \/>\nThe bit rate of the drops per class as the result of all features that can produce drops (e.g., police, random detect, etc.)<\/p>\n<p>RFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2235 = Gauge32: 0<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2241 = Gauge32: 0<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2247 = Gauge32: 0<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2257 = Gauge32: 0<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2263 = Gauge32: 0<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2267 = Gauge32: 64000<br \/>\nRFC1155-SMI::enterprises.9.9.166.1.15.1.1.18.2231.2275 = Gauge32: 64000<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83,10,76],"tags":[21,23],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2220"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2220"}],"version-history":[{"count":2,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2220\/revisions"}],"predecessor-version":[{"id":2222,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2220\/revisions\/2222"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2220"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}