2.7 DHCP and Easy IP  
  2.7.3 Configuring IOS DHCP server  
The DHCP server process is enabled by default on versions of the Cisco IOS that support it. If for some reason the DHCP server process becomes disabled, it can be re-enabled by using the service dhcp global configuration command. The no service dhcp command disables the server.

Like NAT, DHCP servers require 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, use the network statement to define the range of addresses to be leased. If specific addresses are to be excluded on this network, return to global configuration mode.

The ip dhcp excluded-address command configures the router to exclude 172.16.1.1 through 172.16.1.10 when assigning addresses to clients. The ip dhcp excluded-address command may be used to reserve addresses that are statically assigned to key hosts.

A DHCP server is capable of configuring much more than an IP address. Other IP configuration values can be set from the DHCP configuration mode.

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. These commands are entered in DHCP pool configuration mode, identified by the router(dhcp-config)# prompt.

Use the EXEC mode commands to monitor DHCP server operation.

 

Lab Activity

e-Lab Activity: Configuring IOS DHCP Server

This lab is to configure a DHCP server on the router using the Cisco IOS.

   
 

Web Links

Configuring DHCP

http://www.cisco.com/univercd/cc/td/doc/ product/software/ios121/ 121cgcr/ ip_c/ipcprt1/1cddhcp.ht