UMN:CLI User Manual
V8102
398
SWITCH(config-dhcp[sample])# network 100.1.1.0/24
SWITCH(config-dhcp[sample])# default-router 100.1.1.254
SWITCH(config-dhcp[sample])#
9.6.1.5 IP Lease Time
Basically, the DHCP server leases an IP address in the DHCP pool to DHCP clients,
which will be automatically returned to the DHCP pool when it is no longer in use or ex-
pired by IP lease time.
To specify IP lease time, use the following command.
lease-time default <120-2147483637>
Sets default IP lease time in the unit of
second. (default: 3600)
lease-time max <120-2147483637>
Sets maximum IP lease time in the unit
of second. (default: 3600)
no lease-time {default | max}
Deletes specified IP lease time.
The following is an example of setting default and maximum IP lease time.
SWITCH(config)# service dhcp
SWITCH(config)# ip dhcp pool sample
SWITCH(config-dhcp[sample])# network 100.1.1.0/24
SWITCH(config-dhcp[sample])# default-router 100.1.1.254
SWITCH(config-dhcp[sample])# range 100.1.1.1 100.1.1.100
SWITCH(config-dhcp[sample])# lease-time default 5000
SWITCH(config-dhcp[sample])# lease-time max 10000
SWITCH(config-dhcp[sample])#
9.6.1.6 DNS Server
To specify a DNS server to inform DHCP clients, use the following command.
dns-server A.B.C.D1
[A.B.C.D2] … [A.B.C.D8]
Specifies a DNS server. Up to 8 DNS servers are pos-
sible.
A.B.C.D: DNS server IP address
no dns-server A.B.C.D1
[A.B.C.D2] … [A.B.C.D8]
Deletes a specified DNS server.
Deletes all the specified DNS servers.
The following is an example of specifying a DNS server.
SWITCH(config)# service dhcp
SWITCH(config)# ip dhcp pool sample
SWITCH(config-dhcp[sample])# network 100.1.1.0/24
SWITCH(config-dhcp[sample])# default-router 100.1.1.254
SWITCH(config-dhcp[sample])# range 100.1.1.1 100.1.1.100
SWITCH(config-dhcp[sample])# lease-time default 5000