network
Use network to specify the subnet for dynamic allocation in a DHCP address pool.
Use undo network to remove the specified subnet.
Syntax
network network-address [ mask-length | mask mask ] [ secondary ]
undo network network-address [ mask-length | mask mask ] [ secondary ]
Default
No subnet is specified in a DHCP address pool.
Views
DHCP address pool view
Predefined user roles
network-admin
Parameters
network-address: Specifies the subnet for dynamic allocation. If no mask length or mask is specified, the natural mask will be used.
mask-length: Specifies the mask length in the range of 1 to 30.
mask mask: Specifies the mask in dotted decimal format.
secondary: Specifies the subnet as a secondary subnet. If you do not specify this keyword, this command specifies the primary subnet. If the addresses in the primary subnet are used up, the DHCP server can select addresses from a secondary subnet for clients.
Usage guidelines
You can use the secondary keyword to specify a secondary subnet and enter its view, where you can specify gateways by using the gateway-list command for DHCP clients in the secondary subnet.
You can specify only one primary subnet for a DHCP address pool. If you use the network command multiple times, the most recent configuration takes effect.
You can specify up to 32 secondary subnets for a DHCP address pool.
The primary subnet and secondary subnets in a DHCP address pool must not have the same network address and mask.
If you have used the address range or class command in an address pool, you cannot specify a secondary subnet in the same address pool.
Modifying or removing the network configuration deletes the assigned addresses from the current address pool.
Examples
# Specify primary subnet 192.168.8.0/24 and secondary subnet 192.168.10.0/24 in DHCP address pool 0.
<Sysname> system-view [Sysname] dhcp server ip-pool 0 [Sysname-dhcp-pool-0] network 192.168.8.0 mask 255.255.255.0 [Sysname-dhcp-pool-0] network 192.168.10.0 mask 255.255.255.0 secondary [Sysname-dhcp-pool-0-secondary]
Related commands
display dhcp server pool
gateway-list