Information About the DHCP Client
DHCP Client Operation
When a Dynamic Host Configuration Protocol (DHCP) client requests an IP address from a DHCP server on a Cisco IOS XE platform, the default process includes:
-
DHCPDISCOVERY (broadcast)
-
DHCPOFFER (broadcast)
-
DHCPREQUEST (broadcast)
-
DHCPACK (unicast)
The DHCP on Cisco IOS XE platform supports only broadcast mode with the DHCPOFFER. From Cisco IOS XE Amsterdam Release 17.2, the DHCP on IOS XE platform also supports unicast mode. The DHCP unicast mode helps to split the horizon for security consideration. The DHCP broadcast mode is enabled by default. To enable the DHCP unicast mode, configure the ip dhcp client broadcast-flag clear command on the DHCP client. After configuring the command, the DHCPOFFER is sent as a unicast message.
The 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. The following figure 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/broadcast message.
A DHCP client may receive offers from multiple DHCP servers. However, it can accept any one of the offers; the client usually accepts the first offer it receives. The offer from the DHCP server is not a guarantee that the IP address is 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 is allocated to the client by returning a DHCPACK unicast message to the client.
DHCP Client Overview
The configurable dynamic host configuration protocol 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.
-
Option 77—This option is used by a DHCP clients to optionally identify the type or category of user or applications it represents. The information contained in this option represents the user class of which the client is a member. Based on this class, a DHCP server selects the appropriate address pool to assign an address to the client and the appropriate configuration parameters.
-
Option 120—This option is used to specify a 32-bit (binary) IPv4 address to be used by the Session Initiation Protocol (SIP) client to locate a SIP server.
-
Option 121—This option is used to configure classless static routes by specifying classless network destinations; that is, each routing table entry includes a subnet mask. Upto ten classless static routes are supported using option 121 on the DHCP client. Note
If a request includes both static routes and classless static routes, the client uses only the classless static routes. If the DHCP server returns both a classless static route option and a router option, the DHCP client ignores the router option.
-
Option 124—This option is used by DHCP clients and servers to exchange vendor-class information.
-
Option 125—This option is used by DHCP clients and servers to exchange vendor-specific information.