100% found this document useful (1 vote)
70 views7 pages

Dynamic Host Configuration Protocol (DHCP) : What Is DHCP ? Why DHCP Required ? DHCP Messages

Dynamic Host Configuration Protocol (DHCP) is used to automatically configure host devices on a network with IP addresses and other network parameters. DHCP runs over UDP and uses port 67 for DHCP servers and port 68 for clients. DHCP clients broadcast discovery messages to find available servers, which respond with offers of an IP address and other configuration. Clients then request the offered configuration and are assigned the IP address through an acknowledgment message from the server.

Uploaded by

Sigra Jisaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
70 views7 pages

Dynamic Host Configuration Protocol (DHCP) : What Is DHCP ? Why DHCP Required ? DHCP Messages

Dynamic Host Configuration Protocol (DHCP) is used to automatically configure host devices on a network with IP addresses and other network parameters. DHCP runs over UDP and uses port 67 for DHCP servers and port 68 for clients. DHCP clients broadcast discovery messages to find available servers, which respond with offers of an IP address and other configuration. Clients then request the offered configuration and are assigned the IP address through an acknowledgment message from the server.

Uploaded by

Sigra Jisaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Dynamic Host Configuration Protocol

(DHCP)

What is DHCP ?
Why DHCP required ?
DHCP messages

OPM 1
What is DHCP ?
• A widely used application layer protocol , which addresses
limitations of RARP & InRARP.
• RFC 2131
• Runs over UDP , port no. 67 & 68 are used for DHCP server&
client respectively.
• Configures host device automatically.
• Provides hosts with initial configuration information upon bootup:
– IP address with subnet mask,
– default gateway,
– IP address of the DNS server .

OPM 2
DHCP initial messaging
server A server B
client
(not selected) (selected)
DHCP discover DHCP discover

determine determine
configuration configuration
DHCP offer
DHCP offer

select configuration
DHCP request DHCP request

DHCP ack

Initialization completes
using the allocated configuration
graceful shutdown
DHCP release
discard lease
OPM 3
DHCP message format (based on IPv4)

• Op (operation: request (1), reply(2))


• Htype (hardware type: Ethernet 1)
• Hlen (Hardware address length)
• Hops (hop count: incremented for each hop )
• xid (Transaction ID: to match request & reply)
• Secs (seconds since client started to boot)
• Flags (left most one bit=1 for broadcast,
remaining bits 0)
• ciaddr (Client IP address)
• yiaddr (Your IP address)
• siaddr (Server IP address)
• chaddr (Client MAC address)
• Sname (server name)
• File (boot file name: like UNIX: booting UNIX)
• Options (DHCP messages: TLV) Size of fields are represented as number of
octets enclosed in parenthesis.

The source of the DHCP message sets known values of various fields, Zero to unknown filed values
OPM 4
DHCP Messages (Types: part option field)
• DHCPDISCOVER
– The client broadcasts message in search of available DHCP servers.

• DHCPOFFER
– The server response to the client DHCPDISCOVER with offer of configuration
parameters .

• DHCPREQUEST
– The client broadcasts to the server, requesting offered parameters from one server
specifically.
– Confirms correctness of previously allocated address after, e.g., system reboot.
– Extends the lease on a particular network address.

• DHCPRELEASE
– The client-to-server communication, relinquishing network address and canceling
remaining lease.
OPM 5
DHCP Messages (Cont.)
• DHCPACK
– The server-to-client communication with configuration parameters, including
committed network address.

• DHCPNAK
– Server to client indicating client's notion of network address is incorrect (e.g., client
has moved to new subnet) or client's lease has expired

• DHCPDECLINE
– The client-to-server communication, indicating that the network address is already
in use.

• DHCPINFORM
– The client-to-server communication, asking for only local configuration parameters
that the client already has externally configured as an address.

OPM 6
DHCP as UDP application
• DHCP server - port 67, client - port 68
• Reliability is not provided by UDP.

• Client is responsible for reliability


– The client implements timer to measure timeout for the messages that were
not responded.
– The client adopts a retransmission strategy that incorporates a randomized
exponential backoff algorithm to determine the delay between
retransmissions.
– Every next message acts as an acknowledgment for the previous step.
• For example, DHCPREQUEST is an ACK for DHCPOFFER.

OPM 7

You might also like