Enabling MAC Address Alarm Functions
Context
When alarm functions are enabled, the switch sends an alarm when the MAC address usage exceeds the threshold, a MAC address changes, or a MAC address hash conflict occurs. The alarms enable you to know the running status of the MAC address table in real time.
MAC address entry resources are key resources for the switch. Monitoring the use of the MAC address table is important for ensuring normal system operations. The switch provides three alarm functions for MAC address entries.
Alarm 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 threshold-exceeding alarm indicates that the MAC address usage is too high. You are advised to redistribute traffic or expand your network. The clear alarm will only be generated if a threshold-exceeding alarm has already been generated. |
MAC address learning or aging |
An alarm is generated when a MAC address entry is learned or aged. The switch does not send an alarm when a MAC address entry is learned or aged in a VSI. |
MAC address hash conflict |
To improve the MAC address forwarding performance, the MAC address table of the switch is saved using a hash chain. When multiple MAC addresses map the same key value in accordance with the hash algorithm, some MAC addresses may not be learned. This is called MAC address hash conflict. When this occurs, 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 device or network adapter of a terminal to prevent MAC address hash conflicts. NOTE:
The SA boards of S series do not support the alarm function. |
Procedure
- Enable the alarm function for MAC address usage out of the specified
range.
Run:
system-view
The system view is displayed.
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. 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%.
- Enable the alarm function for MAC address learning or aging.
Run:
system-view
The system view is displayed.
(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 intervals of 10s.
Run:
interface interface-type interface-number
The interface view is displayed.
Run:
mac-address trap notification { aging | learn | all }
The alarm function for MAC address learning and aging is enabled on the interface.
By default, the alarm function for MAC address learning or aging is disabled.
- Enable the alarm function for MAC address hash conflicts.
Run:
system-view
The system view is displayed.
Run:
mac-address trap hash-conflict enable
The alarm function for MAC address hash conflicts is enabled.
By default, the alarm function for MAC address hash conflicts is disabled.
(Optional) Run:
mac-address trap hash-conflict history history-number
The number of MAC address hash conflict alarms reported per interval is set.
By default, 10 MAC address hash conflict alarms are reported per interval.
(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 intervals of 60s.
Checking the Configuration
Run the display current-configuration command to check MAC address alarm functions on the switch.