41
• If you use the network or address range command multiple times for the same address pool,
the most recent configuration takes effect.
• IP addresses specified by the forbidden-ip command are not assignable in the current address
pool, but are assignable in other address pools. IP addresses specified by the dhcp server
forbidden-ip command are not assignable in any address pool.
To specify a primary subnet and multiple address ranges for a DHCP address pool:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Create a DHCP user class and
enter DHCP user class view.
dhcp class
class-name
Required for client
classification.
By default, no DHCP user
class exists.
3. Configure the match rule for
the DHCP user class.
if-match rule
rule-number {
option
option-code [
hex
hex-string [
mask
mask |
offset
offset
length
length ] ] |
hardware-address
hardware-address
mask
hardware-address-mask }
Required for client
classification.
By default, no match rule is
configured for a DHCP user
class.
4. Return to system view.
quit
N/A
5. Create a DHCP address pool
and enter its view.
dhcp server ip-pool
pool-name
By default, no DHCP address
pool exists.
6. Specify the primary subnet for
the address pool.
network
network-address
[ mask-length
|
mask
mask ]
By default, no primary subnet
is specified.
7. (Optional.) Specify the
common address range.
address range
start-ip-address
[ end-ip-address ] [
vpn-instance
vpn-instance-name ]
By default, no IP address
range is specified.
8. (Optional.) Specify an IP
address range for a DHCP user
class.
class
class-name
range
start-ip-address end-ip-address
By default, no IP address
range is specified for a user
class.
The DHCP user class must
already exist.
To specify address ranges for
multiple DHCP user classes,
repeat this step.
9. (Optional.) Set the address
lease duration.
expired
{
day
day [
hour
hour
[
minute
minute [
second
second ] ] ] |
unlimited
}
The default setting is 1 day.
10. (Optional.) Exclude the
specified IP addresses in the
address pool from dynamic
allocation.
forbidden-ip
ip-address&<1-8>
By default, all the IP
addresses in the DHCP
address pool are assignable.
To exclude multiple address
ranges from dynamic
allocation, repeat this step.
11. Return to system view.
quit
N/A
12. (Optional.) Exclude the
specified IP addresses from
automatic allocation globally.
dhcp server forbidden-ip
start-ip-address
[
end-ip-address ]
By default, except for the IP
address of the DHCP server
interface, all IP addresses in
address pools are assignable.
To exclude multiple IP
address ranges, repeat this
step.