Dynamic Host Configuration Protocol (DHCP) is used to dynamically configure IP addresses on end devices. A DHCP server provides IP addresses to a DHCP client from a pool/scope configured by an DHCP server administrator with options that provide additional information for the client to operate successfully on the network. There’s chicken in egg problem, how do I get an IP address from a Server that requires an IP address to be spoken too? DHCP uses an IP broadcast to reach the server on UDP port 67 with the request coming on port 68. DHCP is an open standard defined in RFC 2132 and updated in RFC 3942.
If I walk into a crowded room and need to find some with a pen, I broadcast aloud that I’m looking to discover a pen. I get an offer from several people, Matthew, Leonardo, and Jonah, and the closest person with a pen, Leonardo, offer is accepted. I send a request to inform everyone that I’ve received a pen from Leonardo, so they can put their pens away for the next person asking. The pen is an IP address. I’m the client and Leonardo is the server. So what are my options? Leonardo acknowledges he has a blue pen only with a felt tip. I accepted this and Leonardo told me I could only use it for 10 minutes. Five minutes into using the pen, I determine I need more time so I ask for more time, a renewal of my pen lease from Leonardo. Leonardo accepts my request and rebinds my lease of the pen to me. Finally I’m done with the pen 13 minutes later and give it back to him, releasing the pen. Leonardo is now able to share the pen with someone else. The pen is back in the pool of pens, Leonard has to offer.
- Initialization: looking for address
- Renewal: looking to keep an address
- Rebind: keeping the address
- Release: not needing an address
- DHCP Pool
A range of ip addresses that can be offered by the Server, configured by the DHCP server Administrator.
- DHCP Scope
An administrative definition of the options and pool to be used for clients requesting IP addresses for a subnet.
The DHCP client is without an address, and thus uses a broadcast to request it’s IP address.
The DHCP server responds with an IP address, if one is available and maps the MAC address of the client to the IP address provided in it’s DHCP database table.
The DHCP client broadcasts a respond to the IP address offered and requests to use it. This broadcast is to inform any other DHCP servers that the client has accepted the address from one of the offering servers and they may reallocate the IP address they provided.
The DHCP server responds to the client and provides additional information such as parameters/ options available for in the DHCP server. The DHCP server provides these options per subnet/ scope or for all subnets requesting IP addresses. These options are listed in table below.
The DHCP server responds to the client with no IP address. Typically because there is no IP address available to be given from the pool of addresses.
The DHCP client can release it’s IP address to inform the server that it is no longer using the IP address and reallocate the IP address to the pool of IP’s address the server is maintaining.
- CIADDR Client IP address
All zeros during DHCPdiscover but becomes the IP address offered during DHCPrequest
- YIADDR Your IP address
IP Addressed offered by the DHCP server
- SIADDR Server IP address
IP Address of the DHCP Server responding to broadcast
- GIADDR Gateway IP address
IP address of the DHCP relay agent interface that received the client broadcast in a VLAN different than the DHCP server. The router will forward the client request to the DHCP server. By sending the router’s interface address, the DHCP server can pick the correct scope to reply with an IP address.
- CHADDR Client hardware address
MAC address of the Client requesting and IP address. This MAC address is used to define who received the IP address lease from the server.
- DHCP Options
Options are parameters that provide additional configuration to DHCP clients for operation on the network. Commonly used options are shown below.
|1||Subnet Mask||Subnet Mask Value|
|3||Router||Default Gateway addresses|
|4||Time Server||Time server addresses|
|5||Name Server]||IEN-116 Server addresses|
|6||Domain Server||DNS Server addresses|
|43||Vendor Specific||Vendor Specific Information|
|82||Relay Agent Information||Used to Identify Client Location|
|150||TFTP server address||Used to Identify Voice Server/Gateway|
DHCP is used to easy IP address configuration of end devices. The DHCP server has a pool of IP addresses and options within a DHCP scope which configure the end devices known as clients. Broadcasts are used by DHCP clients to find DHCP servers. Based on the response the client can accept or reject an offer, but they invariably accept the first offer heard.
<-PREVIOUS Why do we use VLANs?