dhcp server mask
Function
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.
Parameters
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. |
Usage Guidelines
Usage Scenario
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
The DHCP server function of the interface address pool has been enabled on interfaces using the dhcp select interface command.
Example
# Set the subnet mask of IP addresses that a DHCP server on a VLANIF100 pre-allocates to DHCP clients to 255.255.255.0.
<Huawei> system-view [Huawei] dhcp enable [Huawei] interface vlanif 100 [Huawei-Vlanif100] ip address 10.1.1.1 24 [Huawei-Vlanif100] dhcp select interface [Huawei-Vlanif100] dhcp server mask 255.255.255.0