hwL2VlanMIBTable describes created VLAN information on the device, including the VLAN description and information about interfaces in VLANs.
You can query information about all interfaces added to a VLAN in tagged and untagged modes through hwL2VlanPortList, excluding the Eth-Trunk.
Object | Description | OID |
---|---|---|
hwL2VlanPortList | This object indicates information about the interfaces that join VLANs in tagged and untagged modes. | 1.3.6.1.4.1.2011.5.25.42.3.1.1.1.1.3 |
To query information about the interfaces that join a VLAN, perform the following steps:
As shown in Figure 1, select hwL2VlanPortList and perform the Walk operation to query information about all created VLANs and interfaces that join the VLANs.
The query result in red box is used as an example:Figure 1 Querying information about interfaces in the VLAN
In the first column, the value 2 in hwL2VlanPortList.2 (octet string) indicates information about all interfaces in VLAN 2.
In the second column, 00.00.C0 is a set of indexes of interfaces in VLAN 2, which is displayed in hexadecimal notation. The value is converted into 00000000 00000000 11000000 in binary notation. he index starts from 0 in ascending order. The value 1 indicates that the corresponding interface joins VLAN 2. The query result indicates that interfaces 16 and 17 join VLAN 2.
Query the mapping between interface names and interface indexes.
hwL2IfTable describes information about Layer 2 interfaces. You can query the mapping between interface names and interface indexes through hwL2IfPortName.Table 2 Description of MIB objects Object
Description
OID
hwL2IfPortName
This object indicates the interface name corresponding to the Layer 2 interface index.
1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.19
As shown in Figure 2, select hwL2IfPortName and perform the Walk operation to query the interface names corresponding to all Layer 2 interface indexes on the device.
The query result in red box is used as an example:
hwL2IfPortName.16 (octet string) GigabitEthernet0/0/14 indicates that interface with index 16 corresponds to GigabitEthernet0/0/14, that is, GigabitEthernet0/0/14 joins VLAN 2.
hwL2IfPortName.17 (octet string) GigabitEthernet0/0/15 indicates that interface with index 17 corresponds to GigabitEthernet0/0/15, that is, GigabitEthernet0/0/15 joins VLAN 2.
Figure 2 Querying interface names
This is what I want to talk about/share with you today, thank you!