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

Use SNMP to find which VLAN an interface belongs to.

khuysmans
Level 1
Level 1

Hi,

Is there a table that maps the ifIndex to the VLAN it belongs to?

I cannot seem to find it on the Cisco website.

regards,

Kevin

3 Replies 3

It looks like this might work, but I am more looking for the configured situation. Using the link you provided I would have to see which MAC addresses have been seen passing an interface, then see which VLAN they belonged to. And as such be able to determine what VLAN the interface must belong to.

I am wondering if it not possible to poll using SNMP and find the configured information. Sorta the "sh vlan brief" equivalent in SNMP.

regards,

Kevin

Looks like the information you are looking for resides in the CISCO-VLAN-MEMBERHSIP-MIB.

For example:

.1.3.6.1.4.1.9.9.68.1.2.2.1.2

vmVlan OBJECT-TYPE

-- FROM CISCO-VLAN-MEMBERSHIP-MIB

SYNTAX Integer (0..4095)

MAX-ACCESS read-write

STATUS Current

DESCRIPTION "The VLAN id of the VLAN the port is assigned to when vmVlanType is set to static or dynamic.

This object is not instantiated if not applicable.

The value may be 0 if the port is not assigned to a VLAN.

If vmVlanType is static, the port is always assigned to a VLAN and the object may not be set to 0.

If vmVlanType is dynamic the object's value is 0 if the port is currently not assigned to a VLAN.

In addition, the object may be set to 0 only."

Review Cisco Networking for a $25 gift card