05-28-2014 02:37 AM
Hi
I'm currently setting up Nagios/Icinga to monitor our Cisco Switches.
I can get a list of Interfaces using the following snmp mib:
snmpwalk -v 2c -c <community string> <ip address> 1.3.6.1.2.1.2.2.1.2
I can then get a list of the InOctets and OutOctets for those interfaces using the following mibs:
In Octets
snmpwalk -v 2c -c <community string> <ip address> 1.3.6.1.2.1.2.2.1.10
Out Octets
snmpwalk -v 2c -c <community string> <ip address> 1.3.6.1.2.1.2.2.1.16
However, for a particular trunk port, is there a way of breaking down the InOctets/OutOctets for each vlan on that trunk port using snmp?
Many Thanks
John
Solved! Go to Solution.
05-28-2014 04:19 AM
Hi John,
AFAIK , You can get VLAN traffic stats via SNMP, but not on a per port level.
FYI: a Supervisor does not provide hardware counters for the SNMP subsystem to poll the ifInOctets and ifOutOctets for the vlans per se in layer2, meaning there is no way via SNMP to see the incoming and outgoing traffic into/from the vlan itself, since the inbound traffic could be from either another vlan, or an access port, or a trunk port, so there is no 1 counter for SNMP to poll this value.
Thanks-
Afroz
***Ratings Encourages Contributors ***
05-28-2014 04:19 AM
Hi John,
AFAIK , You can get VLAN traffic stats via SNMP, but not on a per port level.
FYI: a Supervisor does not provide hardware counters for the SNMP subsystem to poll the ifInOctets and ifOutOctets for the vlans per se in layer2, meaning there is no way via SNMP to see the incoming and outgoing traffic into/from the vlan itself, since the inbound traffic could be from either another vlan, or an access port, or a trunk port, so there is no 1 counter for SNMP to poll this value.
Thanks-
Afroz
***Ratings Encourages Contributors ***
05-28-2014 05:13 AM
Hi Afroz
Thanks for the prompt reply.
I did notice that when I ran snmpwalk, there are entries for the vlans for which an interface has been configured.
e.g. IF-MIB::ifDescr.61 = STRING: Vlan61
What does the InOctet and OutOctet counters record for these vlans? Is it the traffic being sent to and from the ip address of the vlan interface? If not, what is it?
Once again, thanks.
John
05-28-2014 05:21 AM
Hi John,
did you get any response when you poll {InOctet .61}
Thanks-
05-28-2014 06:37 AM
Hi Afroz
For example vlan 6 is configured on the switch. It is configured on various access ports, on various trunk ports and has its own interface and ip address
The following snmpwalk shows me the interface index & description for vlan 6.
#snmpwalk -v 2c -c <community string> <ip address> 1.3.6.1.2.1.2.2.1.2
....IF-MIB::ifDescr.6 = STRING: Vlan6.....
This is the InOctets poll using snmpwalk:
# snmpwalk -v 2c -c <community string> <ip address> 1.3.6.1.2.1.2.2.1.10.6
IF-MIB::ifInOctets.6 = Counter32: 2114270375
This is the OutOctets poll using snmpwalk:
# snmpwalk -v 2c -c <community string> <ip address> 1.3.6.1.2.1.2.2.1.16.6
IF-MIB::ifOutOctets.6 = Counter32: 4173186333
What I'm unsure about is what traffic the InOctets and OutOctets are recording. It is all traffic in and out of the switch using on vlan 6, irrespective of port or is it traffic to the interface or what?
I look forward to hearing from you.
John
05-28-2014 06:44 AM
Hi John,
kindly check if this command work on your device "show interface vlan6 counters snmp" ..
Thanks-
05-28-2014 07:25 AM
switch1#show interface vlan6 counters
Counters information is not available for Vlan6
switch1#show interface vlan6 counters snmp
^
% Invalid input detected at '^' marker.
John
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