03-08-2011 03:32 PM - edited 03-06-2019 03:58 PM
Is there a MIB that will either tell what ports a vlan is associated to, or a MIB that can help us what ports and vlans are associated? We are spacifically looking at reporting on trunk interfaces with multiple vlans allowed accross.
Thanks,
Duane R. Anderson
03-16-2011 05:31 PM
Hello Duane,
Object vlanTrunkPortTable
OID 1.3.6.1.4.1.9.9.46.1.6.1
Type SEQUENCE
Permission not-accessible
Status current
MIB CISCO-VTP-MIB ; - View Supporting Images this link will generate a new window
Description "The table containing information on the local system's VLAN trunk ports."
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.4.1.9.9.46.1.6.1
Note: the output of the complete table, you can check the link to see the complete MIB treea and see the information that you can poll from it.
======================================================================================================================
Object vmMembershipTable
OID 1.3.6.1.4.1.9.9.68.1.2.2
Type SEQUENCE
Permission not-accessible
Status current
MIB CISCO-VLAN-MEMBERSHIP-MIB ; - View Supporting Images this link will generate a new window
Description "A table for configuring VLAN port membership.
There is one row for each bridge port that is assigned to a static or dynamic access port. Trunk ports are not represented in this table. An entry may be created and deleted when ports are created or
deleted via SNMP or the management console on a device."
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=vmMembershipTable&translate=Translate&submitValue=SUBMIT&submitClicked=true
If you run that table you will see the following 3 outputs::
===============================================================
Object vmVlanType
OID 1.3.6.1.4.1.9.9.68.1.2.2.1.1
Type INTEGER
Permission read-write
Status current
Values 1 : static
2 : dynamic
3 : multiVlan
MIB CISCO-VLAN-MEMBERSHIP-MIB ; - View Supporting Images this link will generate a new window
Description "The type of VLAN membership assigned to this port.
A port with static vlan membership is assigned to a single VLAN directly. A port with dynamic membership is assigned a single VLAN based on content of packets received on the port and via VQP queries to VMPS.
A port with multiVlan membership may be assigned to one or more VLANs directly.
A static or dynamic port membership is specified by the value of vmVlan. A multiVlan port membership is specified by the value of vmVlans."
===============================================================
Object vmVlan
OID 1.3.6.1.4.1.9.9.68.1.2.2.1.2
Type INTEGER
Permission read-write
Status current
Range 0 - 4095
MIB CISCO-VLAN-MEMBERSHIP-MIB ; - View Supporting Images this link will generate a new window
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."
===============================================================
Object vmPortStatus
OID 1.3.6.1.4.1.9.9.68.1.2.2.1.3
Type INTEGER
Permission read-only
Status current
Values 1 : inactive
2 : active
3 : shutdown
MIB CISCO-VLAN-MEMBERSHIP-MIB ; - View Supporting Images this link will generate a new window
Description "An indication of the current VLAN status of the port.
A status of inactive(1) indicates that a dynamic port does not yet have a VLAN assigned, or a port is assigned to a VLAN that is currently not active. A status of active(2) indicates that the currently assigned VLAN is active. A status of shutdown(3) indicates that the port has been disabled as a result of VQP shutdown response."
===============================================================
HTH,
Rahul
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