Configuring DHCP
DHCP Configuration Task List
IPC-74
Cisco IOS IP Configuration Guide
Configuring DHCP Server Options Import and Autoconfiguration
The Cisco IOS DHCP server can dynamically configure options such as the DNS and WINS addresses
to respond to DHCP requests from local clients behind the customer premises equipment (CPE).
Previously, network administrators needed to manually configure the Cisco IOS DHCP server on each
device enabled with this feature. The Cisco IOS DHCP server was enhanced to allow configuration
information to be updated automatically. Network administrators can configure one or more centralized
DHCP servers to update specific DHCP options within the DHCP pools. The remote servers can request
or “import” these option parameters from the centralized servers. See the section “DHCP Server Options
Import and Autoconfiguration Example” later in this chapter for a configuration example.
To configure the central router to update specific DHCP options within the DHCP pools, use the
following commands beginning in global configuration mode:
To configure the remote router to import DHCP options into the DHCP server database, use the
following commands beginning in global configuration mode:
Command Purpose
Step1 Router(config)# ip dhcp pool name Creates a name for the a DHCP Server address pool and places you
in DHCP pool configuration mode—identified by the
(dhcp-config)# prompt.
Step2 Router(dhcp-config)# network
network-number [mask | /prefix-length]
Specifies the subnet network number and mask of the DHCP
address pool.
The prefix length specifies the number of bits that comprise the
address prefix. The prefix is an alternative way of specifying the
network mask of the client. The prefix length must be preceded by
a forward slash (/).
Step3 Router(dhcp-config)# dns-server address
[address2 ... address8]
Specifies the IP address of a DNS server that is available to a DHCP
client. One IP address is required; however, you can specify up to
eight IP addresses in one command line.
Command Purpose
Step1 Router(config)# ip dhcp pool name Creates a name for the a DHCP Server address pool and places you
in DHCP pool configuration mode—identified by the
(dhcp-config)# prompt.
Step2 Router(dhcp-config)# network
network-number [mask | /prefix-length]
Specifies the subnet network number and mask of the DHCP
address pool.
The prefix length specifies the number of bits that comprise the
address prefix. The prefix is an alternative way of specifying the
network mask of the client. The prefix length must be preceded by
a forward slash (/).
Step3 Router(dhcp-config)# import all Import DHCP option parameters into the DHCP server database.
Step4 Router(dhcp-config)# exit Exits DHCP pool configuration mode.
Step5 Router(config)# interface type number Configures an interface and enters interface configuration mode.
Step6 Router(config-if)# ip address dhcp
[client-id interface name] [hostname
host-name]
Specifies that the interface acquires an IP address through DHCP.