02-27-2011 09:06 PM - edited 03-03-2019 06:13 AM
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.
02-28-2011 05:47 AM
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.
02-28-2011 06:37 AM
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.
03-01-2011 09:10 PM
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.
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