Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Use SNMP to find which VLAN an interface belongs to.

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
Red

Re: Use SNMP to find which VLAN an interface belongs to.

New Member

Re: Use SNMP to find which VLAN an interface belongs to.

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

Red

Re: Use SNMP to find which VLAN an interface belongs to.

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."

331
Views
0
Helpful
3
Replies
CreatePlease login to create content