cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2789
Views
0
Helpful
3
Replies

SNMP ifInOctets|ifOutOctets on two routers.

Sergey Alexeev
Level 1
Level 1

Hi, all! I have 2 Cisco 2821 routers with the same configuration. IOS c2800nm-spservicesk9-mz.124-25b.bin.

When i try to get ifInOctets|ifOutOctets on subinterfaces via snmpwalk, an the one router is all OK, but other returns me zero.

For example:

IF-MIB::ifInOctets.100 = Counter32: 0 - there is the problem.

IF-MIB::ifInOctets.126 = Counter32: 440924398 - All OK.

When i try to get subinterface or interface description or ifInOctets on non-subinterface - all OK on both routers.

Sample subinterface configuration:

interface GigabitEthernet0/0.XYZ
description ---
encapsulation dot1Q 234
ip vrf forwarding 234
ip address 172.16.199.1 255.255.255.0
ip access-group interface_on in
ip access-group interface_on out
ip flow egress

Thanks for any help. If you need any output - please, ask me.

3 Replies 3

Collin Clark
VIP Alumni
VIP Alumni

The interface indexes are probably different (they can change after a reboot). You can view what interface has which index with the following command:

show snmp mib ifmib ifindex

Next change the query string to match the interface index.

IF-MIB::ifInOctets.100

You can set the indexes to be persistant with:

snmp-server ifindex persist

Hope it helps.

Thanks for hint, but subinterface is correctly up and in working state. We use persistent if index for countig clients traffic via netflow. Of course, interfaces & ifindexes are actually.

But because of the above mentioned problem, we cant monitor interface's traffic via Cacti on problematic router.

Sorry for my english, it really not so good.

Wow! I find answer. There need to configure

router(config)#vlan accounting input
router(config)#vlan accounting output

on router. Hope this can help you in situation, like this.