ExtremeSwitching (EXOS)

Expand all | Collapse all

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

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

    Posted 02-27-2018 16:00
    Using SNMP, how can I find the VLANs associated with an interface?

    I know I can snmpwalk
    code:
    1.3.6.1.4.1.1916.1.4.17.1.1
    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!


  • 2.  RE: Using SNMP, how can I find the VLANs associated with an interface

    Posted 02-27-2018 16:07
    Hello Florian,
    EXOS has in the latest version implemented the dot1Q MIB which is an MIB2 value.
    Can you confirm you looking for Software EXOS 21.xx and later.
    regards
    BAstian
    .


  • 3.  RE: Using SNMP, how can I find the VLANs associated with an interface

    Posted 02-28-2018 09:09
    Florian,

    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?

    Frank


  • 4.  RE: Using SNMP, how can I find the VLANs associated with an interface

    Posted 02-28-2018 20:16
    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!


  • 5.  RE: Using SNMP, how can I find the VLANs associated with an interface

    Posted 02-27-2018 16:07
    Hi Bastia, thanks for the quick reply. Unfortunately we are running v.15 and 16 in our company...


  • 6.  RE: Using SNMP, how can I find the VLANs associated with an interface

    Posted 02-28-2018 09:09
    Basically I'm using these OIDs to crawl my way through the switches: (Yay for the formatting squish...)
    "Extreme" => array ("vname" => ".1.3.6.1.4.1.1916.1.2.1.2.1.2", //extremeVlanIfDescr.vlan_no = string NOT the tag, though
    "vport" => ".1.3.6.1.4.1.1916.1.4.17.1.1", //extremePortVlanInfoDescr.port.vlan_no = string
    "vtag" => ".1.3.6.1.4.1.1916.1.2.1.2.1.10", //extremeVlanIfVlanId.vlan_no = integer
    "tagged" => ".1.3.6.1.4.1.1916.1.2.6.1.1.1", //extremeVlanOpaqueTaggedPorts .VLANid.SLOT = Hex-String
    "untagged" => ".1.3.6.1.4.1.1916.1.2.6.1.1.2" //extremeVlanOpaqueUntaggedPorts .VLANid.SLOT = Hex-String
    )[/code][/code]


  • 7.  RE: Using SNMP, how can I find the VLANs associated with an interface

    Posted 02-28-2018 20:16
    Florian,
    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!