Although it is enabled by default on versions
of the Cisco IOS that support it, the DHCP server process can be
re-enabled by using the
service dhcp
global configuration command. The
no
service dhcp
command disables the server.
Like NAT, DHCP server requires that the administrator define a pool of
addresses. In Figure , the
ip dhcp pool
command defines which addresses
will be assigned to hosts.
The first command,
ip dhcp pool room12, creates a pool named room12 and
puts the router in a specialized DHCP configuration mode. In this mode,
you use the network statement to define the range of addresses to be
leased. If you want to exclude specific addresses on this network, you
must return to global configuration mode, as shown in Figure .
This ip dhcp excluded-address command configures the router to exclude
172.16.1.1 through 172.16.1.10 when assigning addresses to clients. You
may choose to use the ip dhcp excluded-address command to reserve
addresses that are statically assigned to key hosts.
Typically, you will want a DHCP server to configure much more than an IP
address. Other IP configuration values can be set from the DHCP config
mode, as shown in Figure .
IP clients will not get very far without a default gateway, which can be set
by using the default-router command. The address of the DNS server
(dns-server)
and
WINS server (netbios-name-server) can be configured here as well. The IOS
DHCP server can configure clients with virtually any TCP/IP information.
Figure lists the key IOS DHCP server commands, which you enter in DHCP
pool configuration mode (identified by the dhcp-config# prompt).
Using the EXEC mode commands shown in Figure
can monitor DHCP server operation.
|
|