Configuring basic DHCP snooping features in a common network

About basic DHCP snooping features in a common network

Basic DHCP snooping features refer to the following features:

If you enable DHCP snooping globally, DHCP snooping is enabled on all interfaces on the device.

You can also enable DHCP snooping for specific VLANs. After enabling DHCP snooping for a VLAN, you can configure the other basic DHCP snooping features in the VLAN.

Restrictions and guidelines

If the basic DHCP snooping features are configured globally, you can only use the undo form of the global configuration commands to disable the settings globally. The VLAN-specific configuration commands cannot disable the settings.

If the basic DHCP snooping features are configured in a VLAN, you can only use the undo form of the VLAN-specific configuration commands to disable the settings in the VLAN. The global configuration command cannot disable the settings.

Configuring basic DHCP snooping features globally

  1. Enter system view.

    system-view

  2. Enable DHCP snooping globally.

    dhcp snooping enable

    By default, DHCP snooping is disabled globally.

  3. Enter interface view.

    interface interface-type interface-number

    This interface must connect to the DHCP server.

  4. Specify the port as a trusted port.

    dhcp snooping trust

    By default, all ports are untrusted ports after DHCP snooping is enabled.

  5. (Optional.) Enable the recording of DHCP snooping entries.

    1. Return to system view.

      quit

    2. Enter interface view.

      interface interface-type interface-number

      This interface must connect to the DHCP client.

    3. Enable the recording of DHCP snooping entries.

      dhcp snooping binding record

      By default, the recording of DHCP snooping entries is disabled.

Configuring basic DHCP snooping features for VLANs

  1. Enter system view.

    system-view

  2. Enable DHCP snooping for VLANs.

    dhcp snooping enable vlan vlan-id-list

    By default, DHCP snooping is disabled for all VLANs.

  3. Enter VLAN view

    vlan vlan-id

    Make sure DHCP snooping is enabled for the VLAN.

  4. Configure an interface in the VLAN as a trusted port.

    dhcp snooping trust interface interface-type interface-number

    By default, all interfaces in the VLAN are untrusted ports.

  5. (Optional.) Enable recording of client information in DHCP snooping entries.

    dhcp snooping binding record

    By default, recording of client information in DHCP snooping entries is disabled.