(Optional) Configuring the Alarm Function forDiscarded DHCP Reply Packets

By configuring the function described in this chapter, you can have an alarm generated when a specified number of Dynamic Host Configuration Protocol (DHCP) reply packets are discarded.

Context

After trusted and untrusted interfaces are configured, the device discards all DHCP reply packets received from untrusted interfaces. You can set a threshold for the number of discarded packets. When the number of discarded packets reaches the threshold, an alarm is generated.

For a Layer 2 device, configure the alarm function for discarded DHCP reply packets in a VLAN view. For a Layer 3 device, configure the alarm function for discarded DHCP reply packets in an interface view or in a BD view.

Procedure

  • Configure the alarm function for discarded DHCP reply packets in a VLAN view.
    1. Run system-view

      The system view is displayed.

    2. Run vlan vlan-id

      The VLAN view is displayed.

    3. Run dhcp snooping alarm dhcp-reply enable [ interface interface-type interface-number ]

      The alarm function for discarded DHCP reply packets is enabled for the VLAN.

    4. Run dhcp snooping alarm dhcp-reply threshold threshold [ interface interface-type interface-number ]

      The alarm threshold for the number of discarded packets is configured for the VLAN.

    5. Run commit

      The configuration is committed.

  • Configure the alarm function for discarded DHCP packets with incorrect CHADDR fields in a BD view.
    1. Run system-view

      The system view is displayed.

    2. Run bridge-domain bd-id

      The BD view is displayed.

    3. Run dhcp snooping alarm dhcp-reply enable

      The alarm function for discarded DHCP reply packets is enabled.

    4. Run dhcp snooping alarm threshold threshold-value

      The alarm threshold for the number of discarded packets is configured in a BD.

    5. Run commit

      The configuration is committed.

  • Configure the alarm function for discarded DHCP reply packets in an interface view.
    1. Run system-view

      The system view is displayed.

    2. Run interface interface-type interface-number

      The interface view is displayed.

    3. Run dhcp snooping alarm dhcp-reply enable

      The alarm function for discarded DHCP reply packets is enabled for the interface.

    4. Run dhcp snooping alarm dhcp-reply threshold threshold-value

      The alarm threshold for the number of discarded packets is configured for the interface.

    5. Run commit

      The configuration is committed.

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