Dynamic Host Configuration Protocol (DHCP)

Vicente González Ruiz

December 14, 2014

Contents

1 Funci’on
2 Operation
3 Clientes, servidores y agentes de retransmisi’on
4 Configuraciones est’aticas y din’amicas
5 El proceso de concesi’on
6 La solucitud (DHCP Discover)
7 La oferta (DHCP Offer)
8 La petici’on (DHCP Request)
9 El reconocimiento (DHCP Ack)
10 Atacks
11 BOOTP (Bootstrap Protocol)
12 DHCP message format

1 Funci’on

2 Operation

DHCP includes three different address allocation mechanisms to provide flexibility when assigning IP addresses:

  1. Manual Allocation: The administrator assigns a pre-allocated IP address to the client and DHCP only communicates the IP address to the device.
  2. Automatic Allocation: DHCP automatically assigns a static IP address permanently to a device, selecting it from a pool of available addresses. There is no lease and the address is permanently assigned to a device.
  3. Dynamic Allocation: DHCP automatically dynamically assigns, or leases, an IP address from a pool of addresses for a limited period of time chosen by the server, or until the client tells the DHCP server that it no longer needs the address.

DHCP works in a client/server mode and operates like any other client/server relationship. When a PC connects to a DHCP server, the server assigns or leases an IP address to that PC. The PC connects to the network with that leased IP address until the lease expires. The host must contact the DHCP server periodically to extend the lease. This lease mechanism ensures that hosts that move or power off do not hold onto addresses that they do not need. The DHCP server returns these addresses to the address pool and reallocates them as necessary.

3 Clientes, servidores y agentes de retransmisi’on

4 Configuraciones est’aticas y din’amicas

5 El proceso de concesi’on

6 La solucitud (DHCP Discover)

7 La oferta (DHCP Offer)

8 La petici’on (DHCP Request)

9 El reconocimiento (DHCP Ack)

10 Atacks

11 BOOTP (Bootstrap Protocol)

The Bootstrap Protocol (BOOTP), defined in RFC 951, is the predecessor of DHCP and shares some operational characteristics. BOOTP is a way to download address and boot configurations for diskless workstations. A diskless workstation does not have a hard drive or an operating system. For example, many automated cash register systems at your local super market are examples of diskless workstations. Both DHCP and BOOTP are client/server based and use UDP ports 67 and 68. Those ports are still known as BOOTP ports.

DHCP and BOOTP have two components. The server is a host with a static IP address that allocates, distributes, and manages IP and configuration data assignments. Each allocation (IP and configuration data) is stored on the server in a data set called a binding. The client is any device using DHCP as a method for obtaining IP addressing or supporting configuration information.

There are three primary differences between DHCP and BOOTP:

  1. The main difference is that BOOTP was designed for manual pre-configuration of the host information in a server database, while DHCP allows for dynamic allocation of network addresses and configurations to newly attached hosts. When a BOOTP client requests an IP address, the BOOTP server searches a predefined table for an entry that matches the MAC address for the client. If an entry exists, the corresponding IP address for that entry is returned to the client. This means that the binding between the MAC address and the IP address must have already been configured in the BOOTP server.
  2. DHCP allows for recovery and reallocation of network addresses through a leasing mechanism. Specifically, DHCP defines mechanisms through which clients can be assigned an IP address for a finite lease period. This lease period allows for reassignment of the IP address to another client later, or for the client to get another assignment if the client moves to another subnet. Clients may also renew leases and keep the same IP address. BOOTP does not use leases. Its clients have reserved IP address which cannot be assigned to any other host.
  3. BOOTP provides a limited amount of information to a host. DHCP provides additional IP configuration parameters, such as WINS and domain name.

12 DHCP message format

 0            7 8            15 16            23 24            31  
+--------------+---------------+----------------+----------------+  
|     OP       |   Hardware    |    Hardware    |      Hops      |  
|    code      |      type     |  addr length   |                |  
+--------------+---------------+----------------+----------------+  
|                   Transaction Identifier                       |  
+------------------------------+---------------------------------+  
|           Seconds            |              Flags              |  
+------------------------------+---------------------------------+  
|                   Client IP addr (CIADDR)                      |  
+----------------------------------------------------------------+  
|                    Your IP addr (YIADDR)                       |  
+----------------------------------------------------------------+  
|                   Server IP addr (SIADDR)                      |  
+----------------------------------------------------------------+  
|                  Gateway IP addr (GIADDR)                      |  
+----------------------------------------------------------------+  
|                Client hardware addr (CHADDR)                   |  
+----------------------------------------------------------------+  
|                    Server name (SNAME)                         |  
+----------------------------------------------------------------+  
|                         Filename                               |  
+----------------------------------------------------------------+  
|                       DHCP options                             |  
+----------------------------------------------------------------+

References

[1]   James F. Kurose and Keith W. Ross. Computer Networking: A Top-Down Approach Featuring the Internet (3rd Edition). Addison Wesley, 2005. http://www.cp.eng.chula.ac.th/~fyta/663/Curose-Ross%20-%20Computer_Networking_-_A_Top-down_Approach_Featuring_the_Internet__Third_Edition.pdf.