hwVlanPorts

HUAWEI-VLAN-MIB · .1.3.6.1.4.1.2011.5.6.1.1.1.3

Object

column r/w PortList
Indicates the list of the standard ports in the VLAN.
If the VLAN contains a port, the corresponding bit of the port is set to 1.
The value of hwVlanPorts is an octet string.
One bit in each octet indicates one port,
so the octet string can indicate eight ports.
When a bit is set to 0, it indicates that the
corresponding port does not belong to this VLAN.
When a bit is set to 1, it indicates that the corresponding
port belongs to this VLAN. The order is as follows: The maximum number
of ports in a slot is 64, so the ports need to occupy eight octets.
The order, from left to right, is presented as eight groups, 0-7, 8-15,
16-23, 24-31, 32-39, 40-47, 48-55, and 56-63. In each octet,
the port IDs in ascending order are presented from low bit to high bit.
For example, ports 0/11/2 and 0/11/3 need to added to VLAN 2.
The values of hwVlanPorts of the upstream ports
(ports 0/11/2 and 0/11/3) to be added is calculated as follows:
For ports 0-7 in slot 11, their corresponding character string
positions are 76543210, and after ports 0/11/2 and 0/11/3 are added,
the bitmap is 00001100 00000000 00000000 00000000,
and the string is 0c 00 00 00 00 00 00 00.
Assuming that the other slots do not have any port that is added to the VLAN,
the character string of each of these slots is 0x0000000000000000.
According to the ascending order of slot from left to right,
the character strings of ports 0/11/2 and 0/11/3 are as follows:
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0c00000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000

Context

MIB
HUAWEI-VLAN-MIB
OID
.1.3.6.1.4.1.2011.5.6.1.1.1.3
Type
column
Access
readwrite
Status
current
Parent
hwVlanMIBEntry

Walk the column to discover its indexed instances, or supply every index to read one instance.

Walk the column
/usr/bin/snmpbulkwalk -v2c -c '<community>' -Pud -Ir -OQUs -m 'HUAWEI-VLAN-MIB' -M '/opt/observium/mibs/huawei:/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'udp:<hostname>:161' 'HUAWEI-VLAN-MIB::hwVlanPorts'
More examples
Read one indexed instance
/usr/bin/snmpget -v2c -c '<community>' -Pud -Ir -OQUv -m 'HUAWEI-VLAN-MIB' -M '/opt/observium/mibs/huawei:/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'udp:<hostname>:161' 'HUAWEI-VLAN-MIB::hwVlanPorts.<hwVlanIndex>'
Translate to a numeric OID
/usr/bin/snmptranslate -Pud -Ir -On -m 'HUAWEI-VLAN-MIB' -M '/opt/observium/mibs/huawei:/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'HUAWEI-VLAN-MIB::hwVlanPorts'

Syntax

Source
PortList
Base type
OctetString

Values & Constraints

No enumerated values or constraints recorded.