SNMP QoS

From NippAero

Jump to: navigation, search

Contents

SNMP CBWFQ Monitoring

You can monitor bit rates per CBWFQ on an interface Qos policy. This would be usefull for graphing in Cacti or alerting using Nagios.

The Class-Based Quality of Service Management Information Base (Class-Based QoS MIB) provides read access to QoS configurations. This MIB also provides QoS statistics information based on the Modular QoS CLI, including information regarding class map and policy map parameters.

The Class-Based QoS MIB is actually two MIBs:

  • CISCO-CLASS-BASED-QOS-MIB
  • CISCO-CLASS-BASED-QOS-CAPABILITY-MIB

You can download these MIBs from this link:

ftp://ftp-sj.cisco.com/pub/mibs/v2

Find the Config_Id

To find what qos maps are on the router, walk the following MIB location.

Cisco MIB Tree for 1.3.6.1.4.1.9.9.166.1.7.1.1.1

1.3.6.1.4.1.9.9.166.1.7.1.1.1

punky:/home/mnipp # snmpwalk -c public -v 1 router 1.3.6.1.4.1.9.9.166.1.7.1.1.1
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1025 = STRING: "class-default"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1029 = STRING: "call-control"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1037 = STRING: "scavenger-mpls"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1043 = STRING: "call-control-mpls"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1049 = STRING: "voice"
SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1055 = STRING: "scavenger"

Find the Policy_Id.Object_id

The Last object in OID example above is Config_ID (eg scavenger-mpls = 1037, voice = 1049, etc).

This must be mapped to a Policy-Id.Object-id which is the last two objects of the result of the SNMPWALK done on 1.3.6.1.4.1.9.9.166.1.5.1.1.2.

Cisco MIB Tree for 1.3.6.1.4.1.9.9.166.1.5.1.1.2

punky:/home/mnipp # snmpwalk -c public -v 1 router 1.3.6.1.4.1.9.9.166.1.5.1.1.2
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1097 = Gauge32: 1071
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1099 = Gauge32: 1029
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1101 = Gauge32: 1033
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1103 = Gauge32: 1035
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1423.1469 = Gauge32: 1049
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1107 = Gauge32: 1055
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1109 = Gauge32: 1059
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1111 = Gauge32: 1061
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1097.1113 = Gauge32: 1063
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1423.1425 = Gauge32: 1037
And so on........

Therefore, "scavenger-mpls" is the name = 1037, which is the config_id = 1423.1425, which is the policy_id.object_id. SO now we have the following information:

Name = config_id = policy_id.object_id

"scavenger-mpls" = 1037 = 1423.1425

"voice" = 1049 = 1423.1469

There are two MIB locations that are interesting to us regarding bit rates. We can see the pre and post policy bit rates. Below are the location strings.

Pre Policy Bit Rate = .1.3.6.1.4.1.9.9.166.1.15.1.1.7

Post Policy Bit Rate = .1.3.6.1.4.1.9.9.166.1.15.1.1.11

You would simply issue the command

punky:/home/mnipp # snmpget -v 1 -c public router .1.3.6.1.4.1.9.9.166.1.15.1.1.7.X.Y

Where X is the policy_id and Y is the object_id.

Example

Pre Policy bit rate for the "voice" policy you would issue the command like below. Notice the 1423.1469 on the end.

punky:/home/mnipp # snmpget -v 1 -c public router .1.3.6.1.4.1.9.9.166.1.15.1.1.11.1423.1469
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.11.1423.1469 = Gauge32: 12000

From this example the SNMP GET returns the value of 12000. Which is 12000bps.

Verify by issuing the sh policy map command on the router and you get the following output. (Some omitted)

router#sh policy-map int s0/0/0:1
 Serial0/0/0:1
  Service-policy output: branch-wan-edge
    Class-map: voice (match-any)
      21246662 packets, 1359868444 bytes
      5 minute offered rate 12000 bps, drop rate 0 bps
      Match: ip dscp ef (46)
        21246664 packets, 1359868636 bytes
        5 minute rate 12000 bps
      Queueing
        Strict Priority
        Output Queue: Conversation 264
        Bandwidth 384 (kbps) Burst 9600 (Bytes)
        (pkts matched/bytes matched) 983242/62938860
        (total drops/bytes drops) 0/0

You can see that the 5 minute offered rate is 12000bps. This matches the SNMP get above.

Now you can query the bit rate for a select Qos policy. The next step would be to either graph this information with Cacti or set up some alerting in Nagios.