5-17
By default, the lease duration of a static address pool is unlimited, and the lease duration of a dynamic
address pool is one day.
Note that if the lease duration you specified is beyond the year 2106, the system regards the lease as
expired.
Related commands:
dhcp server ip-pool
and
display dhcp server tree
.
Examples
# Specify the lease duration as one day, two hours and three minutes in DHCP address pool 0.
<Sysname> system-view
[Sysname] dhcp server ip-pool 0
[Sysname-dhcp-pool-0] expired day 1 hour 2 minute 3
forbidden-ip
Syntax
forbidden-ip ip-address
&<1-8>
undo forbidden-ip
{
ip-address
&<1-8> |
all
}
View
DHCP address pool view
Default Level
2: System level
Parameters
ip-address
&<1-8>: IP addresses to be excluded from dynamic allocation. &<1-8> indicates that you can
specify up to eight IP addresses, separated with spaces.
all
: Excludes all IP addresses from dynamic allocation.
Description
Use the
forbidden-ip
command to exclude IP addresses from dynamic allocation in an extended
address pool.
Use the
undo forbidden-ip
command to free specified or all excluded IP addresses.
By default, all IP addresses in an extended address pool are assignable except the IP addresses of the
DHCP server interfaces.
Note that:
z
Only the extended address pool supports this command.
z
IP addresses specified with the
forbidden-ip
command in extended DHCP address pool view are
excluded from dynamic address allocation in the current extended address pool only. They are
assignable in other address pools.
z
Repeatedly using the
dhcp server forbidden-ip
command can exclude multiple IP address
ranges from dynamic allocation.
Related commands:
dhcp server ip-pool
and
display dhcp server tree
.
Examples
# Exclude IP addresses 192.168.1.3 and 192.168.1.10 from dynamic allocation for extended address
pool 0.
<Sysname> system-view