User Manual UMN:CLI
V5808
327
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])#
8.5.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
possible.
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
SWITCH(config-dhcp[sample])# lease-time max 10000
SWITCH(config-dhcp[sample])# dns-server 200.1.1.1 200.1.1.2 200.1.1.3
SWITCH(config-dhcp[sample])#
If you want to specify a DNS server for all the DHCP pools, use the dns server command.
For more information, see Section 6.1.8.
8.5.1.7 Manual Binding
To manually assign a static IP address to a DHCP client who has a specified MAC
address, use the following command.
fixed-address A.B.C.D
MAC-ADDR
Assigns a static IP address to a DHCP client.
A.B.C.D: static IP address
MAC-ADDR: MAC address
Deletes a specified static IP assignment.