0% found this document useful (0 votes)
42 views

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

Dynamic Host Configuration Protocol (DHCP) is a network protocol that automatically provides IP addresses and other network configuration parameters to devices on a TCP/IP network. DHCP uses UDP and runs on well-known ports 67 and 68. It provides devices with IP addresses, subnet masks, default gateways and DNS server addresses upon network connection or boot up. DHCP messages include DHCP Discover, Offer, Request, Ack, Decline and Release to negotiate IP addresses between clients and servers.

Uploaded by

sunnys45
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
0% found this document useful (0 votes)
42 views

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

Dynamic Host Configuration Protocol (DHCP) is a network protocol that automatically provides IP addresses and other network configuration parameters to devices on a TCP/IP network. DHCP uses UDP and runs on well-known ports 67 and 68. It provides devices with IP addresses, subnet masks, default gateways and DNS server addresses upon network connection or boot up. DHCP messages include DHCP Discover, Offer, Request, Ack, Decline and Release to negotiate IP addresses between clients and servers.

Uploaded by

sunnys45
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

What is DHCP ?
An application layer protocol , widely used alternative which
addresses limitations of RARP & InRARP.
RFC 2131
Runs over UDP , port no. 67 & 68 are used for DHCP server&
client respectively.
Provides automatic configuration of the host connected to network
or booted
Provides hosts with initial configuration information upon bootup:
IP address with subnet mask,
default gateway,
IP address of the DNS server .

OPM

DHCP initial messaging


server A

(not selected)
DHCP discover

client

determine
configuration

server B

(selected)
DHCP discover

DHCP offer

DHCP offer

determine
configuration

select configuration
DHCP request
DHCP request
DHCP ack
Initialization completes
using the allocated configuration
graceful shutdown
DHCP release
OPM

discard lease
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

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

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 as 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

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

You might also like