Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

vlan name <-> port number

Leonardo_14
Frequent Advisor

vlan name <-> port number

Hi!
Any body saye which snmp command I can do to retrive the vlan name and port number associated?

Thanks
Leonardo
1 REPLY
Manfred Arndt
Valued Contributor

Re: vlan name <-> port number

Hi Leonardo,

Here the command to get the vlan ID to port ifIndex association:

# walkmib hpSwitchIgmpPortVlanIndex2
hpSwitchIgmpPortVlanIndex2.1.71 = 1
hpSwitchIgmpPortVlanIndex2.1.72 = 1
hpSwitchIgmpPortVlanIndex2.10.13 = 10
hpSwitchIgmpPortVlanIndex2.10.14 = 10
hpSwitchIgmpPortVlanIndex2.10.24 = 10
hpSwitchIgmpPortVlanIndex2.10.49 = 10
hpSwitchIgmpPortVlanIndex2.50.1 = 50
hpSwitchIgmpPortVlanIndex2.50.2 = 50

The 1, 10, and 50 are the vlan IDs
The 71, 72, 13, etc are the ifIndex

And heres the command to get the ifIndex to port association:

# walkmib ifDescr
...
ifDescr.23 = A23
ifDescr.24 = A24
ifDescr.49 = C1

For example, ifIndex 49 is port C1 (and a member of VLAN 10)

Cheers