38
Usage guidelines
The class range command allows you to divide an address range into multiple address ranges for
different DHCP user classes. The address range for a user class must be within the primary subnet
specified by the network command. If the DHCP client does not match any DHCP user class, the
DHCP server selects an address in the IP address range specified by the address range command.
If the address range has no assignable IP addresses or no address range is configured, the address
allocation fails.
After you specify an address range for a user class, you cannot use the network secondary
command to specify a secondary subnet in the address pool.
You can specify only one address range for a DHCP user class in an address pool. If you execute
this command multiple times for a DHCP user class, the most recent configuration takes effect.
Examples
# Specify an IP address range of 192.168.8.1 through 192.168.8.150 for DHCP user class user in
DHCP address pool 1.
<Sysname> system-view
[Sysname] dhcp server ip-pool 1
[Sysname-dhcp-pool-1] class user range 192.168.8.1 192.168.8.150
Related commands
address range
dhcp class
display dhcp server pool
default ip-pool
Use default ip-pool to specify the default DHCP address pool.
Use undo default ip-pool to restore the default.
Syntax
default ip-pool pool-name
undo default ip-pool
Default
No default DHCP address pool is specified.
Views
DHCP policy view
Predefined user roles
network-admin
Parameters
pool-name: Specifies a DHCP address pool by its name, a case-insensitive string of 1 to 63
characters.
Usage guidelines
In a DHCP policy, the DHCP server uses the default DHCP address pool to assign IP addresses and
other parameters to clients that do not match any user classes. If no default address pool is specified
or the default address pool does not have assignable IP addresses, the address assignment fails.
You can specify only one default address pool in a DHCP policy. If you execute this command
multiple times, the most recent configuration takes effect.