HUAWEI-L2IF-MIB :: hwL2IfMacAddressLearn

MIB Reference — IPNetwork Monitor · Updated September 14, 2026

All MIBsHUAWEI-L2IF-MIBhwL2IfMacAddressLearn

hwL2IfMacAddressLearn

Module: HUAWEI-L2IF-MIB

OID (symbolic): HUAWEI-L2IF-MIB::hwL2IfMacAddressLearn

OID (numeric): 1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.7

Node type: OBJECT-TYPE

Type: INTEGER

Access: read-write

Description: Status indicates if the interface is allowed to learn mac address, enable(1) can be setted, (enabled(1) means that the interface can learn mac address), otherwise disabled(2) can be setted. discard(3) means the interface will drop packets.

What is hwL2IfMacAddressLearn?

This read-write INTEGER controls whether the port learns source MAC addresses: enabled(1) lets it learn, disabled(2) stops learning without dropping traffic, and discard(3) drops packets outright. An admin sets discard(3) on a port they want to lock down from any new device connecting.

Examples

Walk all instances (SNMPv2c):

snmpwalk -v2c -c public <target> 1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.7
snmpwalk -v2c -c public <target> HUAWEI-L2IF-MIB::hwL2IfMacAddressLearn

Get a specific instance (index 1):

snmpget -v2c -c public <target> 1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.7.1
snmpget -v2c -c public <target> HUAWEI-L2IF-MIB::hwL2IfMacAddressLearn.1

Set instance 1 (SNMPv2c):

snmpset -v2c -c private <target> 1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.7.1 i <value>

Start monitoring Huawei switch (Layer 2 interface, hybrid/trunk port config) with a free 30-day trial of IPNetwork Monitor. Create custom SNMP monitor using the HUAWEI-L2IF-MIB::hwL2IfMacAddressLearn OID value, configure state conditions and alerts, and monitor any Huawei switch (Layer 2 interface, hybrid/trunk port config) from a single console.

OID Breakdown

Upper-level ancestors (10 from the standard OID tree / other modules)
Numeric OIDNameModule
1isoLANART-AGENT
1.3orgAirPair-MIB
1.3.6dodAirPair-MIB
1.3.6.1internetAirPair-MIB
1.3.6.1.4privateAirPair-MIB
1.3.6.1.4.1enterprisesAirPair-MIB
1.3.6.1.4.1.2011huaweiHUAWEI-3COM-OID-MIB
1.3.6.1.4.1.2011.5huaweiMgmtHUAWEI-3COM-OID-MIB
1.3.6.1.4.1.2011.5.25huaweiDatacommHUAWEI-3COM-OID-MIB
1.3.6.1.4.1.2011.5.25.42hwL2MgmtHUAWEI-IPDSLAM-MSTP-MIB
Numeric OIDNameModule
1.3.6.1.4.1.2011.5.25.42.1hwL2IfMibHUAWEI-L2IF-MIB
1.3.6.1.4.1.2011.5.25.42.1.1hwL2IfObjectsHUAWEI-L2IF-MIB
1.3.6.1.4.1.2011.5.25.42.1.1.1hwL2InterfaceHUAWEI-L2IF-MIB
1.3.6.1.4.1.2011.5.25.42.1.1.1.3hwL2IfTableHUAWEI-L2IF-MIB
1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1hwL2IfEntryHUAWEI-L2IF-MIB
1.3.6.1.4.1.2011.5.25.42.1.1.1.3.1.7hwL2IfMacAddressLearnHUAWEI-L2IF-MIB