< Home

Configuring Defense Against Bogus DHCP Message Attacks

Context

If an attack pretends to be an authorized user to send a bogus DHCP message to the DHCP server on a DHCP network, the authorized user cannot use the IP address or goes offline unexpectedly. After the DHCP snooping binding table is generated, the device can check DHCP messages against the binding table. Only messages that match the binding table can be forwarded; otherwise, the messages are discarded. This prevents unauthorized users from sending bogus DHCP messages to renew or release IP addresses.

Procedure

  1. Enable a device to check DHCP messages against the DHCP snooping binding table.

    If the function is configured in the VLAN view, it takes effect on all the interfaces in the VLAN; if the function is configured in the interface view, it takes effect only on the interface.

    • In the system view:

    1. Run system-view

      The system view is displayed.

    2. Run dhcp snooping check dhcp-request enable vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

      The device is enabled to check DHCP messages sent from a specified VLAN against the DHCP snooping binding table.

      By default, a device is not enabled to check DHCP Request messages against the DHCP snooping binding table.

    3. Run dhcp snooping check dhcp-chaddr enable vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

      The function of checking whether the CHADDR field is the same as the source MAC address of the header of a DHCP Request message is enabled.

      By default, the function of checking whether the CHADDR field is the same as the source MAC address of the header of a DHCP Request message is disabled.

    • In the VLAN view or interface view:

    1. Run system-view

      The system view is displayed.

    2. Run vlan vlan-id or interface interface-type interface-number

      The VLAN or interface view is displayed, respectively.

    3. Run dhcp snooping check dhcp-request enable
    4. The device is enabled to check DHCP messages against the DHCP snooping binding table.

      By default, a device is not enabled to check DHCP messages against the DHCP snooping binding table.

    5. Run dhcp snooping check dhcp-chaddr enable

      The function of checking whether the CHADDR field is the same as the source MAC address of the header of a DHCP Request message is enabled.

      By default, the function of checking whether the CHADDR field is the same as the source MAC address of the header of a DHCP Request message is disabled.

  2. (Optional) Enable the DHCP snooping alarm function.
    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-request | dhcp-chaddr | dhcp-reply | dhcpv6-request } enable

      The DHCP snooping alarm function is enabled.

      By default, the DHCP snooping alarm function is disabled.

  3. (Optional) Configure the alarm threshold.

    If the alarm threshold is configured in the system view and interface view, the smaller value takes effect.

    • In the system view:

    1. Run system-view

      The system view is displayed.

    2. Run dhcp snooping alarm threshold threshold

      The alarm threshold for the number of DHCP snooping-discarded messages is configured.

      If this command is run in the system view, it takes effect on all the interfaces of the device.

      By default, the alarm threshold for the number of DHCP snooping-discarded messages is 100.

    • In the 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-request | dhcp-chaddr | dhcp-reply | dhcpv6-request } threshold threshold

      The alarm threshold for the number of DHCP snooping-discarded messages is configured.

      By default, the global alarm threshold for the number of DHCP snooping-discarded messages is 100, and the alarm threshold for the number of DHCP snooping-discarded messages on an interface is the value configured using the dhcp snooping alarm threshold command in the system view.

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