Il protocollo DHCP O protocolo DHCP Das DHCP Protokoll Le protocole DHCP El protocolo DHCP

Definition of the term DHCP

DHCP stands for Dynamic Host Configuration Protocol. It is a protocol which enables a computer that is connected to a network to obtain its configuration (mainly, its network configuration) dynamically (i.e. without special intervention). You only have to specify to the computer to find a stand alone IP address by DHCP. The main aim being to simplify network administration.

The DHCP protocol mainly serves to distribute IP addresses on a network, but was designed from the start as a complement to the BOOTP protocol (Bootstrap Protocol) which is used for example when installing a machine across a network (BOOTP is used closely with a TFTP server upon which the client will find the files to be loaded and copied onto the hard disk). A DHCP server can send back the BOOTP parameters or the configuration specific to a given host.

Operation of DHCP protocol

Firstly, a DHCP server is needed which distributes the IP addresses. This machine will serve as a base for all DHCP requests and must also have a fixed IP address. Therefore, on a network there can only be one machine with a fixed IP address, the DHCP server.

The basic communication system is BOOTP (with UDP frame). When a machine is turned on, it has no information on its network configuration, and there is nothing special that the user needs to do to find an IP address. In order to do this, the technique used is the broadcast: to find and talk with a DHCP server, the machine will simply send a special broadcast packet (broadcast on 255.255.255.255 with other information such as the type of request, the connection ports, etc.) over the local network. When the DHCP receives the broadcast packet, it will send back another broadcast packet (do not forget that the client does not obviously have the IP address and that therefore cannot be connected to directly) containing all the information required for the client.

It could be believed that one single packet is enough for the protocol to work. In fact, there are several types of DHCP packets likely to be issued either by the client for the server(s), or by the servers to a client:

  • DHCPDISCOVER (to locate available DHCP servers)
  • DHCPOFFER (server response to a DHCPDISCOVER packet, which contains the initial parameters)
  • DHCPREQUEST (varied request from the client for example to extend its lease)
  • DHCPACK (server response which contains the parameters and IP address of the client)
  • DHCPNAK (server response to indicate to the client that its lease has expired or if the client announces a bad network configuration)
  • DHCPDECLINE (the client announces to the server that the address is already in use)
  • DHCPRELEASE (the client releases its IP address)
  • DHCPINFORM (the client requests local parameters, it already has its IP address)

The first packet issued by the client is a DHCPDISCOVER type packet. The server responds with a DHCPOFFER packet, particularly in order to submit an IP address to the client. The client establishes its configuration and then makes a DHCPREQUEST to validate its IP address (a broadcast request since DHCPOFFER does not contain the IP address). The server simply responds with a DHCPACK with the IP address for confirmation of the allocation. Normally, this is enough for the client to obtain an effective network configuration, but it can be longer or shorter according to whether the client accepts the IP address or not...

Leases:

In order to optimise network resources, the IP addresses are delivered with a start and end date for their validity. This is what is known as a "lease". A client that sees its lease expire can ask the server for an extension of the lease by a DHCPREQUEST. Likewise, when the server sees a lease expire, it will send a DCHPNAK to ask the client if it wants to extend its lease. If the server does not receive a valid response, it will make the IP address available.

This is the subtlety of DHCP: allocation of IP addresses can be optimised by playing on the lease durations. The problem is that if no address is released at the end of a certain time limit, no further DHCP request can be satisfied due to a lack of addresses to distribute.

On a network where many computers are connecting and disconnecting regularly (school or sales office network for example), it is good to offer short term leases. Conversely, on a network mostly comprised of fixed machines, seldomly rebooted, long term leases are sufficient. Do not forget that DHCP mainly works by broadcast, and that it can take up bandwidth on small networks with high demand.

Obtaining a DHCP server

The Internet Software Consortium develops DHCP servers in the world of open software. This is the most commonly used DHCP server, and one that best "follows" the RFCs. ATTENTION! A DHCP server is far from simple to develop and the servers that that they offer are regularly patched and added to. The latest version to date is 3.0 but it is still a beta version. One of the principal innovations in this version is the opportunity to dynamically update a DNS according to IP addresses supplied by the DHCP server. For information, the first draft on dynamic DNS dates from March 1996... More information on the updating of DNS by DHCP servers.

Of course, Microsoft has its own DHCP server for NT, but this still does not implement dynamic updating of DNS.

More information

The main documentation on DHCP is comprised of the essential RFCs:

written by Sylvain Baudoin

Last update on Thursday October 16, 2008 02:43:22 PM.This document entitled « The DHCP protocol » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.

Best answers for « The DHCP protocol » in :
SNMP protocol Show Definition of the term SNMP SNMP means Simple Network Management Protocol. It is a protocol which enables network administrators to manage network devices and diagnose network problems. SNMP operating principle The network management system is...
The HTTP protocol Show Introduction to the HTTP protocol Since 1990 HTTP protocol (HyperText Transfer Protocol) has been the most widely used protocol on the Internet. Version 0.9 was only intended to transfer data over the Internet (in particular Web pages written in...
FTP protocol (File Transfer Protocol) Show Introduction to FTP protocol FTP protocol (File Transfer Protocol) is, as its name indicates a protocol for transferring files. The implementation of FTP dates from 1971 when a file transfer system (described in RFC141) between MIT machines...
IPX/SPX protocol under Windows Vista ShowIPX/SPX protocol under Windows Vista IPX/SPX: Internetwork Packet Exchange/Sequenced Packet Exchange The protocol IPX/ SPX allow some old games to play in network (Red Alert, Command & Conquer, etc.) This function is not supported...
The BitTorrent Protocol ShowThe BitTorrent Protocol What is the BitTorrent protocol? How does it work? Is BitTorrent legal? Downloading Torrent and sharing files BitTorrent Clients What is the BitTorrent protocol? The BitTorrent protocol was designed by the...
Differences between the UDP and TCP protocols ShowDifferences between the UDP and TCP protocols User Datagram Protocol (UDP) Transmission Control Protocol (TCP) User Datagram Protocol (UDP) It is part of the base protocols of the Internet Protocol Suite. Programs on networked...
Download Steam ShowSteam is a download agent of on line games permitting to buy and to download them. Compared with the classical installation from a CD or DVD, this method has many advantages. In particular, it removes the problems of : - media (scratches, damaged...
IP protocol ShowThe role of IP protocol IP protocol is part of the Internet layer of the TCP/IP protocol suite. It is one of the most important Internet protocols because it allows the development and transport of IP datagrams (data packets), without however...
TCP protocol ShowThe characteristics of TCP protocol TCP (which means Transmission Control Protocol) is one of the main protocols of the transport layer of the TCP/IP model. It makes it possible, at application level, to manage data coming from (or going to) the...
The ARP protocol ShowThe aim of ARP protocol The ARP protocol plays a key role among Internet layer protocols relating to TCP/IP, since it enables the physical address of a network interface card corresponding to an IP address to be known. That is why it is called...