<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: SNMP get vlan information in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57613#M17085</link>
    <description>That's great! Thanks!&lt;BR /&gt;</description>
    <pubDate>Fri, 26 Jun 2015 13:38:00 GMT</pubDate>
    <dc:creator>eyeV</dc:creator>
    <dc:date>2015-06-26T13:38:00Z</dc:date>
    <item>
      <title>SNMP get vlan information</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57611#M17083</link>
      <description>Hi everybody!&lt;BR /&gt;
&lt;BR /&gt;
I'd like to get some information about vlans on ports. Unfortunately, XOS doesn't respond to standard dot1qVLanStaticTable OID (.1.3.6.1.2.1.17.7.1.4.3). So, I've decided to use extremePortVlanInfoTable private OID. But I can't find tagged/untagged information. &lt;BR /&gt;
&lt;BR /&gt;
Can anybody suggest something? &lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:15:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57611#M17083</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-06-26T13:15:00Z</dc:date>
    </item>
    <item>
      <title>RE: SNMP get vlan information</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57612#M17084</link>
      <description>Hello,&lt;BR /&gt;
I have a homegrown little app for switchports and what VLAN they're in, and which ports are tagged/untagged.&lt;BR /&gt;
&lt;BR /&gt;
"vname"     =&amp;gt; ".1.3.6.1.4.1.1916.1.2.1.2.1.2",   //extremeVlanIfDescr.vlan_no = string NOT the tag&lt;BR /&gt;
"vport"     =&amp;gt; ".1.3.6.1.4.1.1916.1.4.17.1.1",    //extremePortVlanInfoDescr.port.vlan_no = string&lt;BR /&gt;
"vtag"      =&amp;gt; ".1.3.6.1.4.1.1916.1.2.1.2.1.10",  //extremeVlanIfVlanId.vlan_no = integer&lt;BR /&gt;
"tagged"    =&amp;gt; ".1.3.6.1.4.1.1916.1.2.6.1.1.1",   //extremeVlanOpaqueTaggedPorts .VLANid.SLOT = Hex-String&lt;BR /&gt;
"untagged"  =&amp;gt; ".1.3.6.1.4.1.1916.1.2.6.1.1.2"    //extremeVlanOpaqueUntaggedPorts .VLANid.SLOT = Hex-String&lt;BR /&gt;
&lt;BR /&gt;
Caveat programmer: That hex string is as mean as those hex strings can get. Basically it's a hex representation of a 256 bit binary string, where the Nth position of the binary "1" or "0" means that port N is tagged (untagged) or not respectively.&lt;BR /&gt;
For instance: "01 00 00.....00" would mean:&lt;BR /&gt;
00000001 00000000 00000000 ...., which in turn means "port 8 is (un)tagged" (depending on which OID you query)&lt;BR /&gt;
&lt;BR /&gt;
Code snippet in PHP (for string-to-hex-to-bin conversion): $value being the value of the OID query, in this case "untagged"&lt;BR /&gt;
&lt;BR /&gt;
$hex=trim(substr(strstr($value,":"),1));   // converting string to hex&lt;BR /&gt;
$hex = preg_replace("/[ \n]/","",$hex);    // step two, get rid of spaces and newlines&lt;BR /&gt;
$bin = gmp_convert($hex, 16, 2);           // convert hex to binary&lt;BR /&gt;
$bin = str_pad($bin,256,"0", STR_PAD_LEFT); // left-pad the binary string with zeros,&lt;BR /&gt;
                                           // so that we don't converting "01 00 hex" to "1 00000000" binary&lt;BR /&gt;
And that might be the reason why things never tell you "this port is in VLAN X, tagged/untagged", but only "here are the tagged/untagged ports of a vlan".&lt;BR /&gt;
&lt;BR /&gt;
Hope that helps - oh, and if anyone has a better way of skinning this particular cat, please share! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:38:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57612#M17084</guid>
      <dc:creator>Frank</dc:creator>
      <dc:date>2015-06-26T13:38:00Z</dc:date>
    </item>
    <item>
      <title>RE: SNMP get vlan information</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57613#M17085</link>
      <description>That's great! Thanks!&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:38:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmp-get-vlan-information/m-p/57613#M17085</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-06-26T13:38:00Z</dc:date>
    </item>
  </channel>
</rss>

