The snmp-agent trap enable feature-name dhcp command enables the trap function for the DHCP module.
The undo snmp-agent trap enable feature-name dhcp command disables the trap function for the DHCP module.
For details about whether the trap function for the DHCP module is enabled or disabled by default, see display snmp-agent trap feature-name dhcp all.
snmp-agent trap enable feature-name dhcp [ trap-name { hwdhcppktratealarm | hwdhcpsnpchaddralarm | hwndsnpusernumberalarmglobal | hwndsnpusernumberalarmglobalresume | hwndsnpusernumberalarmif | hwndsnpusernumberalarmifresume | hwnomatchsnpbindtbldhcppktalarm | hwsnpusernumberalarmglobal | hwsnpusernumberalarmglobalresume | hwsnpusernumberalarmif | hwsnpusernumberalarmifresume | hwsnpusernumberalarmvlan | hwsnpusernumberalarmvlanresume | hwuntrustedreplypktalarm | hwnomatchsnpbindtbldhcpv6pktalarm | hwnomatchsnpbindtblndpktalarm | hwsnpremotebackupalarm | hwsnpremotebackupalarmresume } ]
undo snmp-agent trap enable feature-name dhcp [ trap-name { hwdhcppktratealarm | hwdhcpsnpchaddralarm | hwndsnpusernumberalarmglobal | hwndsnpusernumberalarmglobalresume | hwndsnpusernumberalarmif | hwndsnpusernumberalarmifresume | hwnomatchsnpbindtbldhcppktalarm | hwsnpusernumberalarmglobal | hwsnpusernumberalarmglobalresume | hwsnpusernumberalarmif | hwsnpusernumberalarmifresume | hwsnpusernumberalarmvlan | hwsnpusernumberalarmvlanresume | hwuntrustedreplypktalarm | hwnomatchsnpbindtbldhcpv6pktalarm | hwnomatchsnpbindtblndpktalarm | hwsnpremotebackupalarm | hwsnpremotebackupalarmresume } ]
Parameter |
Description |
Value |
---|---|---|
trap-name |
Enables or disables the trap function for a specified event of the DHCP module. |
- |
hwdhcppktratealarm |
Enables the device to send a Huawei proprietary trap when the number of discarded DHCP packets whose rate exceeds the limit exceeds the threshold. |
- |
hwdhcpsnpchaddralarm |
Enables the device to send a Huawei proprietary trap when the number of discarded DHCP packets whose CHADDR field differs from the source MAC address exceeds the threshold. |
- |
hwndsnpusernumberalarmglobal |
Enables the device to send a Huawei proprietary trap when the number of ND access users on the device exceeds the upper threshold. |
- |
hwndsnpusernumberalarmglobalresume |
Enables the device to send a Huawei proprietary trap when the number of ND access users on the device falls below the lower threshold. |
- |
hwndsnpusernumberalarmif |
Enables the device to send a Huawei proprietary trap when the number of ND access users on an interface exceeds the upper threshold. |
- |
hwndsnpusernumberalarmifresume |
Enables the device to send a Huawei proprietary trap when the number of ND access users on an interface falls below the lower threshold. |
- |
hwnomatchsnpbindtbldhcppktalarm |
Enables the device to send a Huawei proprietary trap when the number of DHCP Request packets that do not match DHCP snooping binding entries and are discarded on an interface exceeds the threshold. |
- |
hwsnpusernumberalarmglobal |
Enables the device to send a Huawei proprietary trap when the number of DHCP access users on the device exceeds the upper threshold. |
- |
hwsnpusernumberalarmglobalresume |
Enables the device to send a Huawei proprietary trap when the number of DHCP access users on the device falls below the lower threshold. |
- |
hwsnpusernumberalarmif |
Enables the device to send a Huawei proprietary trap when the number of DHCP access users on an interface exceeds the upper threshold. |
- |
hwsnpusernumberalarmifresume |
Enables the device to send a Huawei proprietary trap when the number of DHCP access users on an interface falls below the lower threshold. |
- |
hwsnpusernumberalarmvlan |
Enables the device to send a Huawei proprietary trap when the number of DHCP access users in a VLAN exceeds the upper threshold. |
- |
hwsnpusernumberalarmvlanresume |
Enables the device to send a Huawei proprietary trap when the number of DHCP access users in a VLAN falls below the lower threshold. |
- |
hwuntrustedreplypktalarm |
Enables the device to send a Huawei proprietary trap when the number of DHCP Reply packets discarded on an untrusted interface exceeds the threshold. |
- |
hwnomatchsnpbindtbldhcpv6pktalarm |
Enables the device to send a Huawei proprietary trap message when the number of DHCPv6 Request packets discarded on an interface because they do not match the binding entries exceeds the threshold. |
- |
hwnomatchsnpbindtblndpktalarm |
Enables the device to send a Huawei proprietary trap message when the number of ND packets discarded on an interface because they do not match the binding entries exceeds the threshold. |
- |
hwsnpremotebackupalarm |
Enables the device to send a Huawei proprietary trap message when DHCP snooping binding entries fail to be restored from the remote server. |
- |
hwsnpremotebackupalarmresume |
Enables the device to send a Huawei proprietary trap message when DHCP snooping binding entries are successfully restored from the remote server. |
- |
After the trap function is enabled, the device generates traps during operation and sends the traps to the NMS through the SNMP module. If the trap function is disabled, the device does not generate traps and the SNMP module does not send traps to the NMS.
You can specify snmp-agent to enable the trap function for one or more events.
For traps that are enabled by default, the device has the trap suppression function configured and does not report traps within 10 minutes.