As shown in Figure 1, the route between the device and the NMS is reachable. Users want to view alarms generated by the device on the NMS in real time. Users must monitor the LinkDown alarm to ensure the normal interconnection of the device.
The configuration roadmap is as follows:
Configure the alarm severity to critical, allowing users to monitor LinkDown alarms on the NMS in real time based on the alarm filtering rules.
Configure the alarm reporting delay function to prevent repetitive or flapping alarms from being reported to the NMS.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] snmp-agent [Switch] snmp-agent sys-info version v2c [Switch] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public [Switch] snmp-agent trap enable feature-name ifnet trap-name linkdown [Switch] snmp-agent trap enable feature-name ifnet trap-name linkup
[Switch] alarm [Switch-alarm] alarm linkDown severity critical
[Switch-alarm] delay-suppression enable [Switch-alarm] suppression alarm linkdown cause-period 2 [Switch-alarm] suppression alarm linkup clear-period 5 [Switch-alarm] return
# Run the display alarm information [ name alarm-name ] command to view the alarm configuration.
<Switch> display alarm information name linkdown ********************************** AlarmName: linkDown AlarmType: Alarm AlarmLevel: Critical Suppress Period: 2s CauseAlarmName: NA Match VB Name: ifIndex **********************************
<Switch> display alarm information name linkup ********************************** AlarmName: linkUp AlarmType: Resume Alarm AlarmLevel: Cleared Suppress Period: 5s CauseAlarmName: linkDown Match VB Name: ifIndex **********************************
Configuration file of the Switch
#
sysname Switch
#
snmp-agent
snmp-agent local-engineid 800007DB03000BC0005E0B
snmp-agent sys-info version v2c v3
snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname cipher %^%#Ey)G6^#X.6{X|aE9BbKSSI0WC7l/0>o/ueKU7;SV%^%#
snmp-agent trap enable feature-name IFNET trap-name linkDown
snmp-agent trap enable feature-name IFNET trap-name linkUp
#
alarm
suppression alarm-name linkUp clear-period 5
suppression alarm-name linkDown cause-period 2
#
return