cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3107
Views
1
Helpful
6
Replies

Can snmp return InOctets/OutOctets per vlan per port on a Cisco 3750 Switch?

John12321
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

AFROJ AHMAD
Cisco Employee
Cisco Employee

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 ***

 


 

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

View solution in original post

6 Replies 6

AFROJ AHMAD
Cisco Employee
Cisco Employee

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 ***

 


 

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

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

Hi John,

did you get any response when you poll   {InOctet .61}

 

Thanks-

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

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

Hi John,

kindly check if this command work on your device "show interface vlan6 counters snmp"  ..

 

 

Thanks-

 

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

switch1#show interface vlan6 counters
Counters information is not available for Vlan6

switch1#show interface vlan6 counters snmp
                                      ^
% Invalid input detected at '^' marker.

 

John

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: