A class for performing SNMP V2 VLAN queries on Extreme devices

see
copyright Copyright (c) 2012 - 2013, Open Source Solutions Limited, Dublin, Ireland
author Barry O'Donovan

 Methods

For a given VLAN vlanIfIndex, this function returns an array of ports indicating whether the port is a member (tagged or untagged) of the VLAN.

getPortsForVlan(int $vlanIfIndex, $fn = null) : array
A sample result showing that ports with ifIndex 1002 to 1004 are a member of a given VLAN while the others aren't is: [ [1001] => bool(false) [1002] => bool(true) [1003] => bool(true) [1004] => bool(true) [1005] => bool(true) [1006] => bool(false) ]

Parameters

$vlanIfIndex

int

The vlanIfIndex of the VLAN to get the results for

$fn

Returns

arrayArray indexed by ifIndex indicating whether the port is a member of the given vlan

Get the SNMP instance

getSNMP() : \OSS_SNMP\SNMP

Returns

\OSS_SNMP\SNMPInstance of the SNMP object

For a given VLAN vlanIfIndex, this function returns an array of ports indicating whether the port is a tagged member of the VLAN.

getTaggedPortsForVlan(int $vlanIfIndex) : array
see

Parameters

$vlanIfIndex

int

The vlanIfIndex of the VLAN to get the results for

Returns

arrayArray indexed by ifIndex indicating whether the port is a tagged member of the given vlan

For a given VLAN vlanIfIndex, this function returns an array of ports indicating whether the port is a untagged member of the VLAN.

getUntaggedPortsForVlan(int $vlanIfIndex) : array
see

Parameters

$vlanIfIndex

int

The vlanIfIndex of the VLAN to get the results for

Returns

arrayArray indexed by ifIndex indicating whether the port is an untagged member of the given vlan

Get the device's VLAN IDs mapped to names

idsToNames() : array
Sample return: [ [1] => Default [2] => Mgmt ... [200] => INTERNET ... ]

Returns

arrayThe device's VLAN IDs mapped to names

Get the device's VLAN descriptions (indexed by vlanIfIndex)

ifDescriptions() : array

Returns

arrayThe device's VLAN descriptions (indexed by vlanIfIndex)

Get the device's VLAN global identifiers (indexed by vlanIfIndex)

ifGlobalIdentifiers() : array
> An administratively assigned global VLAN identifier. For > VLAN interfaces, on different network devices, which are > part of the same globally identified VLAN, the value of this > object will be the same. > > The binding between a global identifier and a VLAN > interface can be created or removed. To create a binding > an NMS must write a non-zero value to this object. To > delete a binding, the NMS must write a zero to this > object. The value 1 is reserved for the default VLAN and > this cannot be deleted or re-assigned.

Returns

arrayThe device's VLAN global identifiers (indexed by vlanIfIndex)

Get an array of VLAN interface indexes (ifIndex)

ifIndexes() : array
NB: VLAN indexes return only, not physical interfaces. Queries: EXTREME-VLAN-MIB::extremeVlanIfIndex Example of returned array: [ [1000004] => 1000004 [1000005] => 1000005 ... ]

Returns

arrayAn array of VLAN interface indexes (ifIndex)

Get the device's VLAN loopback mode flags

ifLoopbackModeFlags(boolean $translate = false) : array
see

Parameters

$translate

boolean

If true, return boolean values for flag

Returns

arrayThe device's VLAN loopback mode flags (indexed by vlanIfIndex)

Get the device's VLAN states

ifStates(boolean $translate = false) : array
see

Parameters

$translate

boolean

If true, return the string representation

Returns

arrayThe device's VLAN states (indexed by vlanIfIndex)

Get the device's VLAN types (indexed by vlanIfIndex)

ifTypes(boolean $translate = false) : array
> -- Extreme Networks Vlan Type Textual Convention > -- > -- vlanLayer2(1) = The globally identified VLAN interface is protocol > -- independent and based on port grouping. The configuration of > -- port grouping is controlled through the ifStackTable.
see

Parameters

$translate

boolean

If true, return the string representation

Returns

arrayThe device's VLAN types (indexed by vlanIfIndex)

Get the device's VLAN IDs / tags (indexed by vlanIfIndex)

ifVlanIds() : array

Returns

arrayThe device's VLAN IDs / tags (indexed by vlanIfIndex)

Get the device's VLAN IDs / tags mapped to vlanIfIndex (indexed by tag)

ifVlanIdsToIfIndexes() : array

Returns

arrayThe device's VLAN IDs / tags mapped to vlanIfIndex (indexed by tag)

Get tagged ports by VLAN (indexed by vlanIfIndex)

opaqueTaggedPorts() : array
The result is an array of HEX strings indicating VLAN tagging of an interface indexed by the vlanIfIndex such as: [ [1000005] => 0000000000000000000000000000000000000000000000000000000000000000 [1000007] => 0000000000008000000000000000000000000000000000000000000000000000 [1000008] => 5000400000008000000000000000000000000000000000000000000000000000 ... ] So, for VLAN ifIndex 1000008 above, if you take the first octet of '50', you can see that of the first eight ports, only the 2nd and 4th (50 = 01010000) are tagged.
see to translate a hex string to a true / false array
see for a useful use of this function.

Returns

arrayThe device's VLAN IDs / tags (indexed by vlanIfIndex)

Get untagged ports by VLAN (indexed by vlanIfIndex)

opaqueUntaggedPorts() : array
The result is an array of HEX strings indicating VLAN (un)tagging of an interface indexed by the vlanIfIndex such as: [ [1000005] => 0000000000000000000000000000000000000000000000000000000000000000 [1000007] => 0000000000008000000000000000000000000000000000000000000000000000 [1000008] => 5000400000008000000000000000000000000000000000000000000000000000 ... ] So, for VLAN ifIndex 1000008 above, if you take the first octet of '50', you can see that of the first eight ports, only the 2nd and 4th (50 = 01010000) are untagged.
see to translate a hex string to a true / false array
see for a useful use of this function.

Returns

arrayThe device's VLAN IDs / tags (indexed by vlanIfIndex)

Set the SNMP instance

setSNMP(\OSS_SNMP\SNMP $snmp) : \OSS_SNMP\MIB

Parameters

$snmp

\OSS_SNMP\SNMP

the SNMP instance

Returns

\OSS_SNMP\MIBAn instance of this class for fluent interfaces

 Properties

 

Text representation of loopback mode flags

$IF_VLAN_LOOPBACK_MODE_FLAGS : array

Default

array(self::IF_VLAN_LOOPBACK_MODE_FLAG_TRUE => true, self::IF_VLAN_LOOPBACK_MODE_FLAG_FALSE => false)
Static
see
 

Text representation of VLAN states

$IF_VLAN_STATES : array

Default

array(self::IF_VLAN_STATUS_ACTIVE => 'active', self::IF_VLAN_STATUS_NOTINSERVICE => 'notInService', self::IF_VLAN_STATUS_NOTREADY => 'notReady')
Static
see
 

Text representation of VLAN types

$IF_VLAN_TYPES : array

Default

array(self::IF_VLAN_TYPE_LAYER2 => 'vlanLayer2(1)')
Static
see
 

Instance for the SNMP object

$_snmp 

Default

null

 Constants

 

Constant for possible value of loopback mode flag

IF_VLAN_LOOPBACK_MODE_FLAG_FALSE = 2 
see
 

Constant for possible value of loopback mode flag

IF_VLAN_LOOPBACK_MODE_FLAG_TRUE = 1 
see
 

Constant for possible value of VLAN status

IF_VLAN_STATUS_ACTIVE = 1 
see
 

Constant for possible value of VLAN status

IF_VLAN_STATUS_NOTINSERVICE = 2 
see
 

Constant for possible value of VLAN status

IF_VLAN_STATUS_NOTREADY = 3 
see
 

Constant for possible value of VLAN type

IF_VLAN_TYPE_LAYER2 = 1 
see
 

OID_VLAN_IF_DESCRIPTION

OID_VLAN_IF_DESCRIPTION = '.1.3.6.1.4.1.1916.1.2.1.2.1.2' 
 

OID_VLAN_IF_GLOBAL_IDENTIFIER

OID_VLAN_IF_GLOBAL_IDENTIFIER = '.1.3.6.1.4.1.1916.1.2.1.2.1.4' 
 

OID_VLAN_IF_INDEX

OID_VLAN_IF_INDEX = '.1.3.6.1.4.1.1916.1.2.1.2.1.1' 
 

OID_VLAN_IF_LOOPBACK_MODE_FLAG

OID_VLAN_IF_LOOPBACK_MODE_FLAG = '.1.3.6.1.4.1.1916.1.2.1.2.1.9' 
 

OID_VLAN_IF_STATUS

OID_VLAN_IF_STATUS = '.1.3.6.1.4.1.1916.1.2.1.2.1.6' 
 

OID_VLAN_IF_TYPE

OID_VLAN_IF_TYPE = '.1.3.6.1.4.1.1916.1.2.1.2.1.3' 
 

OID_VLAN_IF_VLAN_ID

OID_VLAN_IF_VLAN_ID = '.1.3.6.1.4.1.1916.1.2.1.2.1.10' 
 

OID_VLAN_OPAQUE_TAGGED_PORTS

OID_VLAN_OPAQUE_TAGGED_PORTS = ".1.3.6.1.4.1.1916.1.2.6.1.1.1" 
 

OID_VLAN_OPAQUE_UNTAGGED_PORTS

OID_VLAN_OPAQUE_UNTAGGED_PORTS = ".1.3.6.1.4.1.1916.1.2.6.1.1.2"