Feedback
|
Table Of Contents
Configuring the Cisco IOS XE DHCP Client
Information About the DHCP Client
How to Configure the DHCP Client
Configuration Examples for the DHCP Client
Configuring the DHCP Client: Example
Customizing the DHCP Client Configuration: Example
Feature Information for the Cisco IOS XE DHCP Client
Configuring the Cisco IOS XE DHCP Client
First Published: May 2, 2005Last Updated: May 4, 2009Cisco IOS XE Dynamic Host Configuration Protocol (DHCP) client software provides the flexibility to include various configuration options for the DHCP client. A DHCP client is defined as an Internet host using DHCP to obtain configuration parameters such as an IP address. This module describes the concepts and tasks needed to configure the Cisco IOS XE DHCP client.
Finding Feature Information
For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "Feature Information for the Cisco IOS XE DHCP Client" section.
Use Cisco Feature Navigator to find information about platform support and Cisco IOS XE software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•
Information About the DHCP Client
•
Information About the DHCP Client
•
How to Configure the DHCP Client
•
Configuration Examples for the DHCP Client
•
Feature Information for the Cisco IOS XE DHCP Client
Information About the DHCP Client
To configure the DHCP client, you must understand the following concepts:
DHCP Client Operation
DHCP provides a framework for passing configuration information to hosts on a TCP/IP network. A DHCP client is an Internet host using DHCP to obtain configuration parameters such as an IP address. Figure 1 shows the basic steps that occur when a DHCP client requests an IP address from a DHCP server. The client, Host A, sends a DHCPDISCOVER broadcast message to locate a DHCP server. A DHCP server offers configuration parameters (such as an IP address, a MAC address, a domain name, and a lease for the IP address) to the client in a DHCPOFFER unicast message.
Figure 1 DHCP Request for an IP Address from a DHCP Server
A DHCP client may receive offers from multiple DHCP servers and can accept any one of the offers; however, the client usually accepts the first offer it receives. Additionally, the offer from the DHCP server is not a guarantee that the IP address will be allocated to the client; however, the server usually reserves the address until the client has had a chance to formally request the address.
The client returns a formal request for the offered IP address to the DHCP server in a DHCPREQUEST broadcast message. The DHCP server confirms that the IP address has been allocated to the client by returning a DHCPACK unicast message to the client.
DHCP Client Overview
The configurable DHCP client functionality allows a DHCP client to use a user-specified client identifier, class identifier, or suggested lease time when requesting an address from a DHCP server.
Configuration parameters and other control information are carried in tagged data items that are stored in the options field of the DHCP message. The DHCP client provides flexibility by allowing the following options to be configured for a DHCP client:
•
Option 12—This option specifies the name of the client. The name may or may not be qualified with the local domain.
•
Option 51—This option is used in a client request (DHCPDISCOVER or DHCPREQUEST) to allow the client to request a lease time for the IP address.
•
Option 55—This option allows the DHCP client to request certain options from the DHCP server. The ip dhcp client request command allows the system administrator to turn off some of the requested options, thus removing them from the request list.
•
Option 60—This option allows the user to configure the vendor class identifier string to use in the DHCP interaction.
•
Option 61—This option is used by DHCP clients to specify their unique identifier. DHCP servers use this value to index their database of address bindings. This value is expected to be unique for all clients in an administrative domain.
How to Configure the DHCP Client
This section contains the following tasks:
•
Configuration Examples for the DHCP Client
Configuring the DHCP Client
Perform this task to configure the DHCP client.
DHCP Client Default Behavior
Cisco routers running Cisco IOS XE software include DHCP server and relay agent software, which are enabled by default. Your router can act as both the DHCP client and DHCP server. Use the ip address dhcp interface command to obtain IP address information for the configured interface.
Prerequisites
You must configure the ip dhcp client commands before entering the ip address dhcp command on an interface to ensure that the DHCPDISCOVER messages that are generated contain the correct option values. The ip dhcp client commands are checked only when an IP address is acquired from DHCP. If any of the ip dhcp client commands are entered after an IP address has been acquired from DHCP, it will not take effect until the next time the router acquires an IP address from DHCP. This means that the new configuration will only take effect after the ip address dhcp command command has been configured.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
interface type number
4.
ip dhcp client client-id {interface-name | ascii string | hex string}
5.
ip dhcp client class-id {string | hex string}
6.
ip dhcp client lease days [hours] [minutes]
7.
ip dhcp client hostname host-name
8.
[no] ip dhcp client request option-name
9.
ip address dhcp
10.
exit
11.
ip dhcp compatibility lease-query client {cisco | standard}
DETAILED STEPS
Troubleshooting Tips
To verify the configuration, you can use the debug dhcp detail EXEC command to display the DHCP packets that were sent and received. To display the server side of the DHCP interaction, use the debug ip dhcp server packets command.
Configuration Examples for the DHCP Client
This section provides the following configuration examples:
•
Configuring the DHCP Client: Example
•
Customizing the DHCP Client Configuration: Example
Configuring the DHCP Client: Example
Figure 2 shows a simple network diagram of a DHCP client on an Ethernet LAN.
Figure 2 Topology Showing DHCP Client with GigabitEthernet Interface
On the DHCP server, the configuration is as follows:
ip dhcp pool 1network 10.1.1.0 255.255.255.0lease 1 6On the DHCP client, the configuration is as follows on interface GigabitEthernet 0/0/0:
interface GigabitEthernet 0/0/0ip address dhcpThis configuration allows the DHCP client to acquire an IP address from the DHCP server through GigabitEthernet interface 0/0/0.
Customizing the DHCP Client Configuration: Example
The following example shows how to customize the DHCP client configuration with various options on GigabitEthernet interface 0/0/1:
interface GigabitEthernet 0/0/1ip dhcp client client-id ascii my-test1ip dhcp client class-id my-class-idip dhcp client lease 0 1 0ip dhcp client hostname sanfranno ip dhcp client request tftp-server-addressip address dhcpAdditional References
The following sections provide references related to the DHCP client.
Related Documents
Related Topic Document TitleDHCP commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples.
DHCP conceptual information
"DHCP Overview" module
DHCP server configuration
DHCP server on-demand address pools
"Configuring the DHCP Server On-Demand Address Pool Manager" module
DHCP relay agent configuration
DHCP advanced features
"Configuring DHCP Services for Accounting and Security"module
Standards
Standards TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
RFCs TitleRFC 2131
Dynamic Host Configuration Protocol
RFC 2132
DHCP Options and BOOTP Vendor Extensions
Technical Assistance
Feature Information for the Cisco IOS XE DHCP Client
Table 1 lists the features in this module and provides links to specific configuration information.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS XE software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note
Table 1 lists only the Cisco IOS XE software release that introduced support for a given feature in a given Cisco IOS XE software release train. Unless noted otherwise, subsequent releases of that Cisco IOS XE software release train also support that feature.
CCDE, CCENT, CCSI, Cisco Eos, Cisco HealthPresence, Cisco IronPort, the Cisco logo, Cisco Nurse Connect, Cisco Pulse, Cisco SensorBase, Cisco StackPower, Cisco StadiumVision, Cisco TelePresence, Cisco Unified Computing System, Cisco WebEx, DCE, Flip Channels, Flip for Good, Flip Mino, Flipshare (Design), Flip Ultra, Flip Video, Flip Video (Design), Instant Broadband, and Welcome to the Human Network are trademarks; Changing the Way We Work, Live, Play, and Learn, Cisco Capital, Cisco Capital (Design), Cisco:Financed (Stylized), Cisco Store, Flip Gift Card, and One Million Acts of Green are service marks; and Access Registrar, Aironet, AllTouch, AsyncOS, Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Lumin, Cisco Nexus, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Collaboration Without Limitation, Continuum, EtherFast, EtherSwitch, Event Center, Explorer, Follow Me Browsing, GainMaker, iLYNX, IOS, iPhone, IronPort, the IronPort logo, Laser Link, LightStream, Linksys, MeetingPlace, MeetingPlace Chime Sound, MGX, Networkers, Networking Academy, PCNow, PIX, PowerKEY, PowerPanels, PowerTV, PowerTV (Design), PowerVu, Prisma, ProConnect, ROSA, SenderBase, SMARTnet, Spectrum Expert, StackWise, WebEx, and the WebEx logo are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0910R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.
© 2005-2009 Cisco Systems, Inc. All rights reserved.
Feedback

