How to map port name from ifTable to a dot1QVLAN ID and Name

THe following steps can be used to map an ifIndex to a dot1QVLAN ID. This helps with ISP customers of Trisul who also want to see the VLAN ID in the same table as the interface names.

  1. Retrieve the full dot1dBasePortTable (. ) snmpwalk .17.1.4
  2. Lookup the ifIndex in the column dot1dBasePortIfIndex (. and locate the table index dot1dBasePort(.
  3. Retrieve the full dot1qPortVlanTable(. snmpwalk
  4. Lookup the dot1dBasePort from step 2 as the index and get the dot1qPvid (.
  5. This is the VLANID for the ifIndex
  6. To retrieve the name of the VLAN . get the full .dot1qVlanStaticTable (. snmpwalk .
  7. Get the dot1qVlanStaticName . against the table index.

MIBS needed

The following MIB modules are referenced. You can use Unbrowse SNMP to load them all from the MIB Packages page Use the Riverstone package which contains the packages.

  • IF-MIB
articles/portvlanid.txt · Last modified: 2021/04/21 17:20 by veera