[rrd-users] QoS

Merta, Gregory (GTI Pac Rim) Gregory_Merta at ml.com
Mon Jun 25 06:34:19 CEST 2007


If you are talking Cisco, look into Cacti RRD management system and its
thread on CBQoS...


Here are steps to get per QoS class interface statistics for WAN type

1.) Get QoS class names...
./snmpwalk -c [string] [ip] .
SNMPv2-SMI::enterprises. = STRING: "class-default"
SNMPv2-SMI::enterprises. = STRING: "CRITICAL"
SNMPv2-SMI::enterprises. = STRING: "REALTIME"
SNMPv2-SMI::enterprises. = STRING: "BULK"
SNMPv2-SMI::enterprises. = STRING: "PRIORITY"

NOTE: The last number of the OID is a numerical class identifier created
by the router for a QoS class name.
NOTE: This number will change after each QoS (re)configuration or
reboot.  Cisco provides a command to save these values to NVRAM.  Search
on their website for this command.

2.) Get ifIndexes (and ifIndex QoS code) of interfaces with policy
./snmpwalk -c [string] [ip] .
SNMPv2-SMI::enterprises. = INTEGER: 3
< ifIndex 3 = ifIndex QoS code = 1159
SNMPv2-SMI::enterprises. = INTEGER: 5
SNMPv2-SMI::enterprises. = INTEGER: 6
SNMPv2-SMI::enterprises. = INTEGER: 37
SNMPv2-SMI::enterprises. = INTEGER: 39
SNMPv2-SMI::enterprises. = INTEGER: 41
SNMPv2-SMI::enterprises. = INTEGER: 43
SNMPv2-SMI::enterprises. = INTEGER: 45

3.) ...determine ifDescres for the above ifIndex'es:
./snmpwalk -c [string] [ip] .
RFC1213-MIB::ifDescr.3 = STRING: "FastEthernet0/0"
< ifIndex 3 description = FastEthernet0/0
RFC1213-MIB::ifDescr.5 = STRING: "GigabitEthernet0/1"
RFC1213-MIB::ifDescr.6 = STRING: "GigabitEthernet0/2"
RFC1213-MIB::ifDescr.37 = STRING: "ATM2/0.5-aal5 layer"
RFC1213-MIB::ifDescr.39 = STRING: "ATM3/0.1-aal5 layer"
RFC1213-MIB::ifDescr.41 = STRING: "ATM3/0.2-aal5 layer"
RFC1213-MIB::ifDescr.43 = STRING: "ATM3/0.3-aal5 layer"
RFC1213-MIB::ifDescr.45 = STRING: "ATM3/0.4-aal5 layer"

3.) Get .oid.[step 2 ifIndex QoS code].[new random identifier number] to
[step 1 QoS class identifier] mapping... (only for the 5 QoS class names
we have concern with (step 1))
./snmpwalk -c [string] [ip] .
SNMPv2-SMI::enterprises. = Gauge32: 1025
< ifIndex 3 QoS code 1159 = CBQoS code = 1159.1191 = class-default QoS
code 1025
SNMPv2-SMI::enterprises. = Gauge32: 1041
< ifIndex 3 QoS code 1159 = CBQoS code = 1159.1167 = CRITICAL QoS code
SNMPv2-SMI::enterprises. = Gauge32: 1051
< ifIndex 3 QoS code 1159 = CBQoS code = 1159.1161 = REALTIME QoS code
SNMPv2-SMI::enterprises. = Gauge32: 1057
< ifIndex 3 QoS code 1159 = CBQoS code = 1159.1185 = BULK QoS code 1057
SNMPv2-SMI::enterprises. = Gauge32: 1063
< ifIndex 3 QoS code 1159 = CBQoS code = 1159.1177 = PRIORITY QoS code

a. snmpwalk . and find all values equal to
the last number of the OIDs in step 1 (QoS class indentifiers)
b. from the snmpwalk result of step a., find the OIDs returned with the
ifIndex QoS code (second to last OID value) of the ifIndex you wish to
get values for (in this example, ifIndex 3 = ifIndex QoS code 1159)
c. check that the returned value of the snmpwalk equals to the QoS code
you wish to get values for (in this example, all 5 QoS codes are listed)

NOTE: You need to make sure that the QoS codes match the QoS codes
(classes) you wish to get statistics for---ifIndex code 1159 (ifIndex)
may have more than 5 QoS codes associated with it

d. get the last two values of the OID, and use this as the index (CBQoS)
code into the statistics table...

SNMPv2-SMI::enterprises. = Gauge32: 1063
< ifIndex 3 QoS code 1159 = CBQoS code = 1159.1177 = PRIORITY QoS code

NOTE: 1159.1177 is the CBQoS code that provides statistics for ifIndex 3
(FastEthernet0/0) (ifIndex QoS code 1159) PRIORITY queue (QoS code

4.) Get values!

Typically graphed CBQoS values...
cbQosCMPrePolicyBitRate (7)
cbQosCMPostPolicyBitRate (11)
cbQosCMDropPkt (13)
cbQosCMDropPkt64 (14)
cbQosCMDropBitRate (18)

For each ifIndex's CBQoS Index (5 per ifIndex), snmpget the following...

./snmpget -c [string] [ip] .[CBQoS code]
> cbQosCMPrePolicyBitRate (7)
./snmpget -c [string] [ip] .[CBQoS code]
> cbQosCMPostPolicyBitRate (11)
./snmpget -c [string] [ip] .[CBQoS code]
> cbQosCMDropPkt (13)
./snmpget -c [string] [ip] .[CBQoS code]
> cbQosCMDropPkt64 (14)
./snmpget -c [string] [ip] .[CBQoS code]
> cbQosCMDropBitRate (18)

For example:

Get values for ifIndex 3 PRIORITY queue performance...

./snmpget -c [string] [ip] .
> cbQosCMPrePolicyBitRate (7)
./snmpget -c [string] [ip] .
> cbQosCMPostPolicyBitRate (11)
./snmpget -c [string] [ip] .
> cbQosCMDropPkt (13)
./snmpget -c [string] [ip] .
> cbQosCMDropPkt64 (14)
./snmpget -c [string] [ip] .
> cbQosCMDropBitRate (18)

Other possible statistic values...
cbQosCMStatsTable (1)
cbQosCMStatsEntry (1)

cbQosCMPrePolicyPktOverflow (1)
cbQosCMPrePolicyPkt (2)
cbQosCMPrePolicyPkt64 (3)

cbQosCMPrePolicyByteOverflow (4)
cbQosCMPrePolicyByte (5)
cbQosCMPrePolicyByte64 (6)

cbQosCMPrePolicyBitRate (7)

cbQosCMPostPolicyByteOverflow (8)
cbQosCMPostPolicyByte (9)
cbQosCMPostPolicyByte64 (10)

cbQosCMPostPolicyBitRate (11)

cbQosCMDropPktOverflow (12)
cbQosCMDropPkt (13)
cbQosCMDropPkt64 (14)

cbQosCMDropByteOverflow (15)
cbQosCMDropByte (16)
cbQosCMDropByte64 (17)

cbQosCMDropBitRate (18)

cbQosCMNoBufDropPktOverflow (19)
cbQosCMNoBufDropPkt (20)
cbQosCMNoBufDropPkt64 (21)

-----Original Message-----
From: rrd-users-bounces at lists.oetiker.ch
[mailto:rrd-users-bounces at lists.oetiker.ch] On Behalf Of Simon Hobson
Sent: Sunday, June 24, 2007 5:38 PM
To: rrd-users at lists.oetiker.ch
Subject: Re: [rrd-users] QoS

Mohammed Alhaj Ali wrote:

>  I need to implement QoS and measure the drop packet for each 
>customer; would any one please help me on how can I generate such 
>map like this with detailed steps please !!

Using what ?
What OS do you use ? Where are you applying the QoS ?

If you do the routing with a Linux box then I suggest visiting the 
Linux Advanced Routing Howto and in particular section 9 "Queueing 
Disciplines for Bandwidth Management".

You would probably be making extensive use of HTB queues, for which 
the documentation is at http://luxik.cdi.cz/~devik/qos/htb/

Once you have your queueing and prioritisation, you can then read the 
stats from 'tc' and stuff the numbers into one or more rrd files - I 
do this with a cron job.

If you are using different routers (eg Cisco), then you will need to 
learn how to do traffic shaping on those, and find out how to read 
the stats (probably with snmp and mrtg).

rrd-users mailing list
rrd-users at lists.oetiker.ch

This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.

More information about the rrd-users mailing list