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:
Enabling DHCP snooping.
Configuring DHCP snooping trusted ports.
Enabling recording client information in DHCP snooping entries.
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
Enter system view.
system-view
Enable DHCP snooping globally.
dhcp snooping enable
By default, DHCP snooping is disabled globally.
Enter interface view.
interface interface-type interface-number
This interface must connect to the DHCP server.
Specify the port as a trusted port.
dhcp snooping trust
By default, all ports are untrusted ports after DHCP snooping is enabled.
(Optional.) Enable the recording of DHCP snooping entries.
Return to system view.
quit
Enter interface view.
interface interface-type interface-number
This interface must connect to the DHCP client.
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
Enter system view.
system-view
Enable DHCP snooping for VLANs.
dhcp snooping enable vlan vlan-id-list
By default, DHCP snooping is disabled for all VLANs.
Enter VLAN view
vlan vlan-id
Make sure DHCP snooping is enabled for the VLAN.
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.
(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.