- This page is about Dynamic Host Configuration Protocol, protocol for automatically configuring networked computers. For the Decentralized Hospital Computer Program, see MUMPS
Dynamic Host Configuration Protocol (DHCP) is a client-server networking protocol. A DHCP server provides configuration parameters specific to the DHCP client host requesting, generally, information required by the host to participate on the Internet network. DHCP also provides a mechanism for allocation of IP addresses to hosts.
DHCP appeared as a standard protocol in October 1993. RFC 2131 provides the latest (March 1997) DHCP definition.
The latest work on a protocol describing DHCPv6 , DHCP in a IPv6 environment, was published in July 2003 as RFC 3315
IP Address Allocation
The DHCP protocol provides three methods of IP address allocation:
- manual allocation, where the allocation is based on a table with MAC address - IP address pairs manually filled by the server admin. Only requesting clients with a MAC address listed in this table get the IP address according to the table.
- automatic allocation, where a free IP address of a range given by the admin is permanently assigned to a requesting client.
- dynamic allocation, the only method which provides dynamic reuse of IP addresses. A network administrator assigns a range of IP addresses to DHCP, and each client computer on the LAN has its TCP/IP software configured to request an IP address from the DHCP server when that client computer's network interface card starts up. The request-and-grant process uses a lease concept with a controllable time period. This eases the network installation procedure on the client computer side considerably.
Some DHCP server implementations can update the DNS name associated with the client hosts to reflect the new IP address by way of the DNS update protocol which was established with RFC 2136.
Client Configuration Parameters
A DHCP server can provide optional configurations to the client. DHCP Options are defined in RFC 2132
List of configurable options:
Implementations
Microsoft introduced DHCP on their NT server with Windows NT version 3.5 in late 1994. Despite being called a new feature from Microsoft, it was not invented by them.
The Internet Software Consortium published DHCP software distributions for Unix variants with version 1.0.0 of the ISC DHCP Server released on December 6, 1997 and a more RFC compliant version 2.0 on June 22, 1999. The software is available at http://www.isc.org/sw/dhcp/
Other major implementations included Cisco with a DHCP server made available in Cisco IOS 12.0 in February 1999 and Sun who added DHCP support in the July 2001 release of Solaris 8.
A free DHCP server for the Microsoft Windows platform is available at http://tftpd32.jounin.net/
Usage
DHCP is used by most cable internet in the U.S. to allocate IP addresses. DSL providers in the US rarely use DHCP, using PPPoE instead. In addition, several routers provide DHCP support for networks of up to 255 computers, for assigning private IP addresses.
Protocol Anatomy
DHCP uses the same two IANA assigned ports for BOOTP: 67/udp for the server side, and 68/udp for the client side.
DHCP Discover
The client broadcasts on the local physical subnet to find available servers. The local router can be configured to forward DHCP packets to a DHCP server on a different subnet. This client implementation creates a UDP packet with the broadcast destination of 255.255.255.255 and also requests its last known IP address of 192.168.1.100 although this is not necessary and may be ignored by the server.
DHCP Offer
The server determines the configuration based on the client's hardware address that is specified in the CHADDR field. Here the server, 192.168.1.1, specifies the IP address in the YIADDR field.
DHCP Request
The client selects a configuration out of the DHCP Offer packets it received. Again, this client requests the 192.168.1.100 address that the server specified.
DHCP Acknowledge
The server acknowledges the request and broadcasts that on the local subnet. The client is expected to configure its network interface with the supplied options.
DHCPDISCOVER
UDP Src=0.0.0.0 Dest=255.255.255.255
|
OP |
HTYPE |
HLEN |
HOPS |
0x01 |
0x01 |
0x06 |
0x00 |
XID |
0x3903F326 |
SECS |
FLAGS |
0x0000 |
0x0000 |
CIADDR |
0x00000000 |
YIADDR |
0x00000000 |
SIADDR |
0x00000000 |
GIADDR |
0x00000000 |
CHADDR |
|
0x00053C04 |
0x8D590000 |
0x00000000 |
0x00000000 |
192 octets of 0's. BOOTP legacy
|
DHCP option 53: DHCP Discover |
|
DHCP option 50: 192.168.1.100 requested |
|
|
DHCPOFFER
UDP Src=192.168.1.1 Dest=255.255.255.255 |
OP |
HTYPE |
HLEN |
HOPS |
0x02 |
0x01 |
0x06 |
0x00 |
XID |
0x3903F326 |
SECS |
FLAGS |
0x0000 |
0x0000 |
CIADDR |
0x00000000 |
YIADDR |
0xC0A80164 |
SIADDR |
0x00000000 |
GIADDR |
0x00000000 |
CHADDR |
|
0x00053C04 |
0x8D590000 |
0x00000000 |
0x00000000 |
192 octets of 0's. BOOTP legacy
|
DHCP option 53: DHCP Offer |
|
DHCP option 1: 255.255.255.0 subnet mask |
|
DHCP option 3: 192.168.1.1 router |
|
DHCP option 51: 1 day IP lease time |
|
DHCP option 54: 192.168.1.1 DHCP server |
|
|
DHCPREQUEST
UDP Src=0.0.0.0 Dest=255.255.255.255 |
OP |
HTYPE |
HLEN |
HOPS |
0x01 |
0x01 |
0x06 |
0x00 |
XID |
0x3903F326 |
SECS |
FLAGS |
0x0000 |
0x0000 |
CIADDR |
0x00000000 |
YIADDR |
0x00000000 |
SIADDR |
0x00000000 |
GIADDR |
0x00000000 |
CHADDR |
|
0x00053C04 |
0x8D590000 |
0x00000000 |
0x00000000 |
192 octets of 0's. BOOTP legacy
|
DHCP option 53: DHCP Request |
|
DHCP option 50: 192.168.1.100 requested |
|
|
DHCPACK
UDP Src=192.168.1.1 Dest=255.255.255.255 |
OP |
HTYPE |
HLEN |
HOPS |
0x02 |
0x01 |
0x06 |
0x00 |
XID |
0x3903F326 |
SECS |
FLAGS |
0x0000 |
0x0000 |
CIADDR |
0x00000000 |
YIADDR |
0xC0A80164 |
SIADDR |
0x00000000 |
GIADDR |
0x00000000 |
CHADDR |
|
0x00053C04 |
0x8D590000 |
0x00000000 |
0x00000000 |
192 octets of 0's. BOOTP legacy
|
DHCP option 53: DHCP ACK |
|
DHCP option 1: 255.255.255.0 subnet mask |
|
DHCP option 3: 192.168.1.1 router |
|
DHCP option 51: 1 day IP lease time |
|
DHCP option 54: 192.168.1.1 DHCP server |
|
|
See also
Last updated: 10-29-2005 02:13:46