IP Addressing Services

Dynamically Configuring DHCP Server Options

Document ID: 22920

Updated: Oct 12, 2005



DHCP enables you to automatically assign reusable IP addresses to DHCP clients. This document provides an example for how to configure DHCP options such as the Domain Name System (DNS) and Windows Internet Name Service (WINS) addresses, to respond to DHCP requests from local clients behind the customer premises equipment (CPE).

Previously, network administrators had to manually configure the Cisco IOS® DHCP server on each device enabled with this feature. After a router is deployed, it is labor-intensive, time consuming, and expensive to go to each location and make modifications.

Consequently, the Cisco IOS DHCP Server was enhanced in order to allow configuration information to be updated automatically. Network administrators can configure one or more centralized DHCP server to update specific DHCP options within the DHCP pools. The remote servers can request or import these option parameters from the centralized servers.



Cisco recommends readers of this document have knowledge of these topics:

  • DHCP

  • Domain Name System (DNS)

  • Windows Internet Name Service (WINS)

Components Used

This configuration was developed and tested with these software and hardware versions:

  • Cisco IOS® Software Release 12.2(27)

  • Two Cisco 3660 routers with NM-1E used for PC and client connection

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Note: The Cisco IOS DHCP Server feature is introduced in Cisco IOS Software Release 12.0(1)T. You need Cisco IOS® Software Release 12.0(2)T or later for use with Cisco 1700 series routers. For more information on routers that support the DHCP Server feature, see the Supported Platforms section of Cisco IOS DHCP Server document.


For more information on document conventions, refer to the Cisco Technical Tips Conventions.


In this section, you are presented with the information to configure DHCP Server Options for DNS and WINS. The 'Central' router is configured for these Server options and 'Remote' router imports these options. The remote PC or Client receives these imported options from the 'Remote' router during their DHCPACK stage.

Note: In order to find additional information on the commands used in this document, refer to DHCP Commands or use the Command Lookup Tool (registered customers only) .

Network Diagram

This document uses the network setup shown in this diagram:



This document uses these configurations:

Central (3660)
Central# show running-config 
Building configuration...
ip dhcp excluded-address

!--- This range must not be assigned to DHCP clients.

ip dhcp pool Central   

!--- Specify the network number and mask for DHCP clients.
   domain-name Central

!--- Specify the domain name for the client.

!--- Specify the DNS server you want to respond to DHCP clients who

!--- need to correlate the host name to the IP address.

!--- Specify the Network Basic Input/Output System (NetBIOS)

!--- WINS server (for Microsoft DHCP clients)
interface FastEthernet0/0 
 ip address 
 duplex auto 
 speed auto

Note: When you use a Cisco router as DHCP server, only one domain is allowed per DHCP pool, in other words, the router cannot send DHCP leases to clients that include two domain-names. It is not possible to mix static mapping in a dynamic Pool. If it is mixed, the % This command may not be used with network, origin, vrf, or relay pools error message appears.

Remote (3660)
Remote# show running-config 
Building configuration...
ip dhcp excluded-address

!--- This ip address must not be assigned to DHCP clients.

ip dhcp pool Client   
   import all

!--- Import DHCP option parameters into the database.

!--- Specify the network number and mask for DHCP clients.


!--- Specify the default gateway for DHCP clients.
interface FastEthernet0/0 
 ip address dhcp 
 duplex auto 
 speed auto
interface FastEthernet1/0
 ip address
 duplex auto
 speed auto

The service config command is used in conjunction with the boot host or boot network command. The service config command is entered to enable the router to automatically configure the system from the file specified by the boot host or boot network command.

The service config command can also be used without the boot host or boot network command. If you do not specify host or network configuration filenames, the router uses the default configuration files. The default network configuration file is network-config. The default host configuration file is host-config, where host is the host name of the router. If the Cisco IOS software cannot resolve its host name, the default host configuration file is router-config.

Use the boot host command along with the service config command. Without the service config command, the router ignores the boot host command and uses the configuration information in NVRAM. If the configuration information in NVRAM is invalid or missing, the service config command is enabled automatically. The network server will attempt to load two configuration files from remote hosts. The first is the network configuration file containing commands that apply to all network servers on a network. Use the boot network command to identify the network configuration file. The second is the host configuration file that contains commands that apply to one network server in particular. Use the boot host command to identify the host configuration file.

The client sends out a broadcast inspite of the fact that the option 150 is configured because of its default nature to look out for the TFTP server and the Option 150 is defined on the server side not the client side. Other than TFTP, 150 option is also available for these:

  • 150 Etherboot

  • 150 GRUB configuration path name

The DHCP options can be configured with the option code ascii string tftp-server-name command. If you do not have the name of the server and if the server is configured only with the IP address, then use the option code ip ip address command.


This section provides information you can use in order to confirm your configuration works properly.

Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.

  • show ip dhcp import —Displays the option parameters imported into the DHCP server database.

Remote#show ip dhcp import
Address Pool Name: Client
Domain Name Server(s):
NetBIOS Name Server(s):
Domain Name Option: Central
Central#show ip dhcp server statistics
Memory usage         13906
Address pools        1
Database agents      1
Automatic bindings   1
Manual bindings      0
Expired bindings     0
Malformed messages   0

Message              Received
BOOTREQUEST          0
DHCPREQUEST          1
DHCPDECLINE          0
DHCPRELEASE          0
DHCPINFORM           0

Message              Sent
BOOTREPLY            0
DHCPOFFER            1
DHCPACK              1
DHCPNAK              0
Central#show ip dhcp binding
IP address       Client-ID/Hardware address	 	Lease expiration            Type         0063.6973.636f.2d30.                   Apr 25 2005 12:30 AM        Automatic


This section provides information you can use to troubleshoot your configuration.

Troubleshooting Commands

Note: Before you issue debug commands, refer to Important Information on Debug Commands.

The output taken from a PC or Client with a Microsoft Windows Operating system with the ipconfig /all command gives the TCP/IP configuration values configured by DHCP. Refer to RFC 2132 for more information on DHCP options.

C:\>ipconfig /all 
Windows 2000 IP Configuration 
  Host Name . . . . . . . . . . . . : PC 
  Primary DNS Suffix . . . . . . .  : 
  Node Type . . . . . . . . . . . . : Hybrid 
  IP Routing Enabled. . . . . . . . : No
  WINS Proxy Enabled. . . . . . . . : No 
  DNS Suffix Search List. . . . . . : 
Ethernet adapter Local Area Connection :
  Connection-specific DNS Suffix . : Central 
  Description . . . . . . . . . .  : 3Com EtherLink XL 10/100 PCI TX NIC(3C905B-TX) 
  Physical Address. . . . . . . .  : 00-10-5A-86-5A-CA 
  DHCP Enabled. . . . . . . . . .  : Yes 
  Autoconfiguration Enabled . . .  : Yes 
  IP Address. . . . . . . . . . .  : 
  Subnet Mask . . . . . . . . . .  : 
  Default Gateway . . . . . . . .  :
  DHCP Server . . . . . . . . . .  : 
  DNS Servers . . . . . . . . . .  : 
  Primary WINS Server . . . . . .  : 
  Lease Obtained. . . .  . . . . . : Tuesday, April 26, 2005 6:04:29 PM 
  Lease Expires . . . . . . . .. . : Wednesday, April 27, 2005 6:04:29 PM

Related Information

Updated: Oct 12, 2005
Document ID: 22920