07-07-2017 08:05 AM
Hi all,
I need to know if is possible to check using snmp the packet transmitted and dropped by a policy on a specific interface:
RP/0/RSP0/CPU0:9k10-RGA-512#sh policy-map interface tenGigE 0/1/0/0 output
Fri Jul 7 16:01:29.771 CET
TenGigE0/1/0/0 output: 10GE-egress-qos-Core
Class IP_EXP_5
Classification statistics (packets/bytes) (rate - kbps)
Matched : 9224056/14039013232 40477
Transmitted : 9232099/14051254678 40493
Total Dropped : 0/0 0
Policing statistics (packets/bytes) (rate - kbps)
Policed(conform) : 9224056/14039013232 40477
Policed(exceed) : 0/0 0
Policed(violate) : 0/0 0
Policed and dropped : 0/0
Queueing statistics
Queue ID : 160
High watermark : N/A
Inst-queue-len (packets) : 0
Avg-queue-len : N/A
Taildropped(packets/bytes) : 0/0
Queue(conform) : 9232099/14051254678 40493
Queue(exceed) : 0/0 0
RED random drops(packets/bytes) : 0/0
Class class-default
Classification statistics (packets/bytes) (rate - kbps)
Matched : 21602313/32878294530 80955
Transmitted : 21618398/32902775580 80985
Total Dropped : 0/0 0
Queueing statistics
Queue ID : 163
High watermark : N/A
Inst-queue-len (packets) : 0
Avg-queue-len : N/A
Taildropped(packets/bytes) : 0/0
Queue(conform) : 21618398/32902775580 80985
Queue(exceed) : 0/0 0
RED random drops(packets/bytes) : 0/0
WRED profile for WRED Curve 1
RED Transmitted (packets/bytes) : N/A
RED random drops(packets/bytes) : 0/0
RED maxthreshold drops(packets/bytes) : N/A
RED ecn marked & transmitted(packets/bytes): N/A
WRED profile for WRED Curve 2
RED Transmitted (packets/bytes) : N/A
RED random drops(packets/bytes) : 0/0
RED maxthreshold drops(packets/bytes) : N/A
RED ecn marked & transmitted(packets/bytes): N/A
The device is a cisco ASR9K with SW version 5.3.3 or 5.3.4.
Thank in advance.
Marco
07-10-2017 05:32 AM
Marco,
supported MIBs and OIDs are available at:
ftp://ftp.cisco.com/pub/mibs/supportlists/asr9000/asr9000-supportlist.html
http://www.cisco.com/en/US/docs/routers/asr9000/mib/guide/asr9kmib3.html
/Aleksandar
07-18-2017 05:39 AM
Hi Aleks,
I constructed this routine to check the packet count over snmp:
RP/0/RSP0/CPU0: rgaxxx#sh run int te 0/2/0/1
Mon Jul 17 16:56:34.592 CET
interface TenGigE0/2/0/1
cdp
mtu 4484
service-policy output 10GE-egress-qos-Core
[SNIP]
snmpwalk -v 2c -c pubblic rgaxxx 1.3.6.1.2.1.2.2 | grep TenGigE0/2/0/1
IF-MIB::ifDescr.34 = STRING: TenGigE0/2/0/1
snmpwalk -v 2c -c pubblic rgaxxx 1.3.6.1.4.1.9.9.166.1.1.1.1 | grep 34
SNMPv2-SMI::enterprises.9.9.166.1.1.1.1.4.694692722 = INTEGER: 34
snmpwalk -v 2c -c pubblic rgaxxx 1.3.6.1.4.1.9.9.166.1.7.1.1.1
snmpwalk -v 2c -c pubblic rgaxxx 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.255586082 = STRING: "IP_EXP_5"
snmpwalk -v 2c -c pubblic rgaxxx 1.3.6.1.4.1.9.9.166.1.5.1.1 | grep 255586082
SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.694692722.755493609 = Gauge32: 255586082
snmpwalk -v 2c -c pubblic rgaxxx 1.3.6.1.4.1.9.9.166.1.15.1.1.10.694692722.755493609
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.10.694692722.755493609 = Counter64: 397719329536
Now the problem is that,
if I clear the policy-map counters on the device target:
RP/0/RSP0/CPU0:rgaxxxx#clear qos counters interface tenGigE 0/2/0/1 out
Tue Jul 18 14:22:44.190 CET
RP/0/RSP0/CPU0:rgaxxxx#sh policy-map interface tenGigE 0/2/0/1
Tue Jul 18 14:22:46.543 CET
Class IP_EXP_5
Classification statistics (packets/bytes) (rate - kbps)
Matched : 39772/9665370 16417
Transmitted : 0/0 17017
Total Dropped : 0/0 0
Policing statistics (packets/bytes) (rate - kbps)
Policed(conform) : 39772/9665370 16417
Policed(exceed) : 0/0 0
Policed(violate) : 0/0 0
Policed and dropped : 0/0
Queueing statistics
Queue ID : 136
High watermark : N/A
Inst-queue-len (packets) : 0
Avg-queue-len : N/A
Taildropped(packets/bytes) : 0/0
Queue(conform) : 0/0 17017
Queue(exceed) : 0/0 0
RED random drops(packets/bytes) : 0/0
But I see other numbers using SNMP:
snmpwalk -v 2c -c public rgaxxxx 1.3.6.1.4.1.9.9.166.1.15.1.1.10.1091506606.1675867576
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.10.1091506606.1675867576 = Counter64: 4254730363780
How can I solve this issue? where I'm doing a mistake?
07-18-2017 09:49 AM
hi Marco,
you're not doing anything wrong, this is how SNMP counters are supposed to work. The CLI and SNMP counters are kept separately. Some customers don't want the SNMP counters to be cleared when CLI counters are cleared. If you want to clear the SNMP counters, you have to do it explicitly from CLI using the "clear snmp counters" command.
/Aleksandar
07-19-2017 12:33 AM
Hi Aleks, I did a little test and.... the command clear snmp counters doesn't work:
root@Ubuntu164-8:~# snmpwalk -v 2c -c pippo 172.17.51.2 1.3.6.1.4.1.9.9.166.1.15.1.1.10.1834921824.1655590267
iso.3.6.1.4.1.9.9.166.1.15.1.1.10.1834921824.1655590267 = Counter64: 598276
RP/0/RSP0/CPU0:9k10-RGA-512#clear snmp counters
Wed Jul 19 08:26:40.109 CET
root@Ubuntu164-8:~# snmpwalk -v 2c -c pippo 172.17.51.2 1.3.6.1.4.1.9.9.166.1.15.1.1.10.1834921824.1655590267
iso.3.6.1.4.1.9.9.166.1.15.1.1.10.1834921824.1655590267 = Counter64: 601220
It seems that the counter snmp can be cleared only rebooting the device.
08-14-2019 02:39 AM
Am I correct? Why I get the 0?
Thank you very much
07-10-2017 05:51 AM
Take a look at these objects:
CISCO-CLASS-BASED-QOS-MIB::cbQosCMPostPolicyByte64
CISCO-CLASS-BASED-QOS-MIB::cbQosCMPostPolicyBitRate
CISCO-CLASS-BASED-QOS-MIB::cbQosCMDropPkt64
CISCO-CLASS-BASED-QOS-MIB::cbQosCMDropByte64
CISCO-CLASS-BASED-QOS-MIB::cbQosCMDropBitRate
CISCO-CLASS-BASED-QOS-MIB::cbQosREDRandomDropByte64
CISCO-CLASS-BASED-QOS-MIB::cbQosREDRandomDropPkt64
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide