0

hello i have a router cisco 1006

and i create a policy-map

with to class

policy-map CheckBand-BandPerUsr
 class BandPerUsr
  police cir 10000000000
 class class-default
  police cir 10000000000

i need to get a (Post Policy Size) by snmp

i look and find a right oid but value was wrong

in ubuntu-server cli i used snmpwalk after i get a right oid

snmpwalk -v2c -c ABCDED X.X.X.X iso.3.6.1.4.1.9.9.166.1.15.1.1.11
iso.3.6.1.4.1.9.9.166.1.15.1.1.11.1298180580.65536 = Gauge32: 4012315000
iso.3.6.1.4.1.9.9.166.1.15.1.1.11.1298180580.131072 = Gauge32: 376176704

Gauge32: 376176704 so to If i divide 376176704 bps / 1000000 = 376 Mbps

and now the real traffic for class-default is 4,600 Mbps

sh policy-map target
 Port-channel7: EFP 1045

  Service-policy input: CheckBand-BandPerUsr

    Class-map: BandPerUsr (match-all)
      33378869376 packets, 33153538986508 bytes
      5 minute offered rate 4025078000 bps, drop rate 0000 bps
      Match: access-group name BandPerUsr
      police:
          cir 10000000000 bps, bc 33292000 bytes
        conformed 33374131354 packets, 33148621833696 bytes; actions:
          transmit
        exceeded 0 packets, 0 bytes; actions:
          drop
        conformed 4025078000 bps, exceeded 0000 bps

    Class-map: class-default (match-any)
      41735372388 packets, 38731449873476 bytes
      5 minute offered rate 4665204000 bps, drop rate 0000 bps     <<<<<here 4665204000 bps
      Match: any
      police:
          cir 10000000000 bps, bc 33292000 bytes
        conformed 41735372388 packets, 38731449873476 bytes; actions:
          transmit
        exceeded 0 packets, 0 bytes; actions:
          drop
        conformed 4665204000 bps, exceeded 0000 bps

I noticed something , we the traffic in class-map is below of 4200Mbps , i get a correct value in snmpwalker for exmample

in class-map the real traffic is 3200Mbps and in snmpwalk the Gauge32: 3200000000 . is 10 Digit

but when traffic is more of 4200Mbps i get uncorrect Gauge32 vlau with 9 Digit only

  • Think about it. A 32-bit number (unsigned integer) tops out at 4,294,967,295. You need to use 64-bit numbers for something larger. – Ron Maupin Apr 10 at 1:14
  • how to do that ? – Anas Programmer Apr 10 at 1:23
  • That is going to depend on your application. It is showing a 32-bit answer (Guage32), and that is, unfortunately, off-topic here. You may need to update it or get a different SNMP application. – Ron Maupin Apr 10 at 1:38
  • Find the 64bit ("HC"?) version of that OID, if one exists. The number is too large for a 32bit value. – Ricky Beam Apr 10 at 5:14
  • i thank , for post policy (bit rate ) it is only 32 bit i send. – Anas Programmer Apr 10 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.