< Home

Enabling MAC Address Trap Functions

Context

When trap functions are enabled on the switch, it sends an alarm if the MAC address usage exceeds the threshold, a MAC address changes, or a MAC address hash conflict occurs. The switch provides three trap functions for MAC address entries, enabling you to monitor the usage of MAC address table resources.

Table 1 Three trap functions for MAC address entries

Trap Function

Description

MAC address usage out of the specified range

An alarm is generated when the MAC address usage is higher than 80%, and a clear alarm is generated when the MAC address usage is lower than 70%.

A clear alarm can be generated only if a threshold-exceeding alarm has been generated.

A threshold-exceeding alarm indicates that the MAC address usage is too high. You are advised to redistribute traffic or expand the network.

MAC address learning or aging

An alarm is generated when a MAC address entry is learned or aged.

MAC address hash conflict

To improve the MAC address forwarding performance, the MAC address table of the switch is saved using a hash chain. If multiple MAC addresses map the same key value in accordance with the hash algorithm, some MAC addresses may not be learned. That is, a MAC address hash conflict occurs.

In this situation, the MAC address entries cannot be learned even though the MAC address table is not full.

A MAC address hash conflict does not affect traffic forwarding. The switch broadcasts traffic destined for the conflicting MAC addresses, occupying bandwidth and system resources. You can replace the network adapter of the switch or terminal to prevent MAC address hash conflicts.

Procedure

  • Enable the trap function for MAC address usage out of the specified range.
    1. Run system-view

      The system view is displayed.

    2. Run mac-address threshold-alarm upper-limit upper-limit-value lower-limit lower-limit-value

      The upper and lower alarm thresholds for the MAC address usage are set.

    By default, the upper and lower alarm thresholds for the MAC address usage are 80% and 70% respectively. That is, if the MAC address usage is greater than or equal to 80%, an alarm is generated; If the MAC address usage is less than 70%, the alarm is cleared.

  • Enable the trap function for MAC address changes.
    1. Run system-view

      The system view is displayed.

    2. (Optional) Run mac-address trap notification interval interval-time

      The interval at which the switch checks MAC address learning or aging is set.

      By default, the switch checks MAC address learning or aging at an interval of 10 seconds.

    3. Run interface interface-type interface-number

      The interface view is displayed.

    4. Run mac-address trap notification { aging | learn | all }

      The trap function for MAC address learning or aging is enabled on the interface.

      By default, the trap function for MAC address learning or aging is disabled.

  • Enable the trap function for MAC address hash conflicts.
    1. Run system-view

      The system view is displayed.

    2. Run mac-address trap hash-conflict enable

      The trap function for MAC address hash conflicts is enabled.

      By default, the trap function for MAC address hash conflicts is enabled.

    3. (Optional) Run mac-address trap hash-conflict history history-number

      The number of MAC address hash conflict alarms reported at an interval is set.

      By default, 10 MAC address hash conflict alarms are reported at an interval.

    4. (Optional) Run mac-address trap hash-conflict interval interval-time

      The interval at which MAC address hash conflict alarms are reported is set.

      By default, MAC address hash conflict alarms are reported at an interval of 60 seconds.

    5. (Optional) Run mac-address trap hash-conflict threshold threshold-value

      The lower alarm threshold for MAC address hash conflicts is set.

      By default, the lower alarm threshold for MAC address hash conflicts is 0.

Verifying the Configuration

Run the display current-configuration command to check whether the MAC address trap functions are configured on the switch.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >