Showing results for 
Search instead for 
Did you mean: 

Using SNMP, how can I find the VLANs associated with an interface

Using SNMP, how can I find the VLANs associated with an interface

New Contributor
Using SNMP, how can I find the VLANs associated with an interface?

I know I can snmpwalk
but that only starts "at the top" (ie the first port), and takes AGES to get to the actual interface I'm interested in...

Thanks for any pointers!

New Contributor
Dear Frank,

Thank you, I am aware of those MIBs and have played around with them. However, I am looking at core switches of a large ISP with a great many VLANs and interfaces, so this technique is not directly an option. I was rather wanting to double check if I missed something, but it looks like I haven't; at least not with the version of EXOS at hand.

Thank you, gentlemen!

Sadly, I agree with you. What's even worse is that it appears as if the other players don't seem to do it either, so if that OID really works on 22.x, Extreme might just be the first one to give us what we need 😉

I think the only remaining option (if you know which port is interesting to you), do an automated ssh session and a "show vlan port X" and "screenscrape"/parse the output. Either with "Expect" scripts or some python magic. That way you'd not only get the vlans with their tags, but also VR and other information.

Good luck!


I wrote a small PHP script with a web interface that lists my switches, which port is in what VLANS (tagged/untagged) and also lists all ports on all switches that are in the same VLAN. It uses SNMP to query the switches and a little bit of MySQL to store the information

It's a hack that does what I needed. It doesn't follow best practice developer standards, but it works. "Butterknife-as-screwdriver". If I had to redo it, it would probably be in python, but knowing myself, it would probably still be a hack 😉

I'll be more than happy to share that with you. Can this forum do private messages to exchange email addresses?


Basically I'm using these OIDs to crawl my way through the switches: (Yay for the formatting squish...)
"Extreme" => array ("vname" => ".", //extremeVlanIfDescr.vlan_no = string NOT the tag, though
"vport" => ".", //extremePortVlanInfoDescr.port.vlan_no = string
"vtag" => ".", //extremeVlanIfVlanId.vlan_no = integer
"tagged" => ".", //extremeVlanOpaqueTaggedPorts .VLANid.SLOT = Hex-String
"untagged" => "." //extremeVlanOpaqueUntaggedPorts .VLANid.SLOT = Hex-String