The dhcp server mask command sets the subnet mask of IP addresses that a DHCP server pre-allocates to DHCP clients.
The undo dhcp server mask command deletes the configured subnet mask.
By default, the subnet mask of IP addresses that a DHCP server pre-allocates to DHCP clients is not configured.
| Parameter | Description | Value |
|---|---|---|
mask |
Specifies a subnet mask. |
The value is in decimal dotted notation. |
mask-length |
Specifies the length of the subnet. |
The value is an integer ranging from 0 to 32. |
After enabling the DHCP server function on an interface, you can configure the range and subnet mask of IP addresses that a DHCP server pre-allocates to DHCP clients. Run the dhcp server ip-range command to configure the IP address range and run the dhcp server mask command to configure the subnet mask of the IP addresses.
Prerequisites
IP addresses in the interface address pool have been configured using the ip address command.
The DHCP server function has been enabled on the interface using the dhcp select interface command.