SlideShare a Scribd company logo
1 of 23
DHCP
Dynamic Host Configuration Protocol
CIS 856: TCP/IP and Upper Layer Protocols
Presented by Kyle Getz
October 20, 2005
Motivation for DHCP
 Configuration parameters for network hosts
 IP address
 Router
 Subnet Mask
 Many more…
 Before DHCP
 Manual assignment
 RARP
 BOOTP
DHCP Features
 Protocol for providing configuration
parameters to hosts over network
 Dynamic allocation of IP addresses
 Minimal human intervention
Sample Network
Router
Internet
DHCP
Server
UDP Port
68
UDP Port
68
UDP Port
68
UDP Port
67
DHCP
Clients
Preliminaries
 (DHCP) Message = DHCP-PDU (A-PDU)
 Client = DHCP Client
 Server = DHCP Server
 Well-known port numbers
 DHCP Server: UDP port 67
 DHCP Client: UDP port 68
 No ephemeral ports
 Broadcast and unicast used for PDU’s in both
directions
 “Broadcast”: link and IP addresses are broadcast
 “Unicast”: link and IP addresses are unicast
Initial Message Flow
Server A Client Server B
Client attempts to discover
available DHCP serversDHCPDISCOVE
R
DHCPDISCOVE
R
Servers reply with offers
DHCPOFFE
R
DHCPOFFE
R
Client collects offers and
decides which offer to accept
Client broadcasts request for
one of the received offersDHCPREQUES
T
DHCPREQUES
T
Server acknowledges client’s
use of IP addressDHCPAC
K
Configuration complete
Client explicitly releases
use of IP addressDHCPRELEA
SE
Graceful shutdown
DHCP Message Types
DHCP
Message
Use
DHCPDISCOVER Client broadcast to locate available servers
DHCPOFFER Server to client response offering configuration parameters
DHCPREQUEST Client broadcast requesting offered parameters
DHCPDECLINE Client to server notification that IP address is in use
DHCPACK Server to client response confirming a request
DHCPNAK Server to client response denying a request
DHCPRELEASE Client to server request to relinquish IP address
DHCPINFORM Client to server request for configuration parameters
Lease Renewal Times (Client)
 T1 < T2 < Lease time
 T1 default value = 1/2 of lease time
 T2 default value = 7/8 of lease time
 Communicated via DHCPOFFER, DHCPACK
 Client actions when times elapse
 T1: client must renew address with the DHCP server
 T2: client must renew address with any DHCP server
 Lease time: client must stop using IP address
Renewal Message Flow
Server A Client Server B
Client unicasts request to
continue using IP addressDHCPREQUES
T
Server acknowledges
request and updates leaseDHCPACK
Client broadcasts request to
continue using IP addressDHCPREQUES
T
DHCPREQUES
T
Server acknowledges request
and updates leaseDHCPAC
K
Configuration complete
T1 elapses
T1 elapses
Client unicasts request to
continue using IP addressDHCPREQUES
T
T2 elapses
Configuration complete
Client FSM (Simplified)
INIT
SELECTIN
G
-/DHCPDISCOV
ER
DHCPOFFER/
Process offer
REQUESTIN
G
Select
offer/DHCPREQUEST
BOUN
D
DHCPACK/Set T1,T2
DHCPACK/Set T1,T2
DHCPACK/Set T1,T2
RENEWIN
G
T1/ Unicast
DHCPREQUES
T
REBINDIN
G
T2/Broadcast
DHCPREQUEST
DHCPNAK/
Stop using IP
addressDHCPNAK,
Lease expires/
Stop using IP
address
DHCPACK (in
use)/
DHCPDECLINE
DHCPNAK/
Discard offer
Retransmissions
 Client responsible for all retransmissions
 Retransmission strategy
 Exponential backoff
 Randomized
 Recommendations
 Base delay doubled for each retransmission
 Random number picked from [-1,+1]
 Maximum base delay: 64 seconds
Server Storage
 Permanent storage
 Pool of available IP addresses
 Local configuration parameters
 Mapping between clients and leases
 Flexibility concerning storage update
 When DHCPOFFER sent
 When DHCPACK sent
Server Logic (Simplified)
Event Action Taken
DHCPDISCOVER
If current lease for client exists, send DHCPOFFER
Else, if IP address available, send DHCPOFFER
Else, do nothing
DHCPREQUEST If IP address available, send DHCPACK
Else, send DHCPNAK
DHCPDECLINE Mark IP address unavailable, notify network administrator
DHCPRELEASE Mark IP address available, delete lease
DHCPINFORM Send DHCPACK with configuration parameters
Lease expiration Mark IP address available, delete lease
DHCP PDU Format
32 Bits
Operation Code Hardware Type Hardware Length Hop Count
Transaction ID
Seconds Elapsed B Must Be Zero (MBZ)
Client IP address
Your IP address
Server IP address
Relay agent IP address
Client hardware address
(16 bytes)
Server host name
(64 bytes)
Boot file name
(128 bytes)
Options
(up to 312 bytes)
Magic Cookie
DHCP Options
255 End of options
Code Length Data
1 byte 1 byte Length bytes
0 Padding
1 4 255 255 255 0
Subnet Mask:
99 130 83 99Magic Cookie:
Option format:
One-byte options:
4 bytes
Another Sample Network
Router Internet
DHCP
Server
DHCP
Clients
Relay Agent
within
Relay Agents
 Remove restriction of having DHCP server on
every network
 Listen for DHCP messages and transmit them
to appropriate machine
 Client to server relay
 Broadcast from client → Unicast to server(s)
 Server to client relay
 Broadcast from server → Broadcast to client
 Unicast from server → Unicast to client
Demonstration
Advanced Topics
 Lease times
 Dynamic DNS
 Reliability
 Security
Lease Times
 Anywhere from 15 minutes – 1 year
 Common lease times & rationales
 15 minutes: Maximum number of addresses free
 3 days: Microsoft default
 4 months: Students can keep lease over summer
 Tradeoff
Dynamic DNS
 If IP address changes due to DHCP, DNS
entry is wrong
 Client or server can update DNS
 Option 81: Client FQDN
81 Length Flags rcode1 rcode2 Name…
1 byte 1 byte “Length” bytes
Reliability
 Two synchronized DHCP servers on the same
network: Primary, Secondary
 Permanent storage constantly communicated
 Failure: Secondary server takes over
Secondar
y Server
DHCP
Clients
Primary
Server
Security
 Potentially unauthorized clients
 Malicious client could exhaust address pool
 Malicious server (Rogue server)
 Supply incorrect configuration parameters
 Supply malicious configuration parameters

More Related Content

What's hot (20)

Basics about IP address, DNS and DHCP.
Basics about IP address, DNS and DHCP.Basics about IP address, DNS and DHCP.
Basics about IP address, DNS and DHCP.
 
Wintel ppt for dhcp
Wintel ppt for dhcpWintel ppt for dhcp
Wintel ppt for dhcp
 
DHCP (Dynamic Host Configuration Protocol)
DHCP (Dynamic Host Configuration Protocol)DHCP (Dynamic Host Configuration Protocol)
DHCP (Dynamic Host Configuration Protocol)
 
Intro to DNS
Intro to DNSIntro to DNS
Intro to DNS
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
DHCP
DHCPDHCP
DHCP
 
Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
X.25
X.25X.25
X.25
 
DHCP
DHCPDHCP
DHCP
 
Subnetting supernetting
Subnetting supernettingSubnetting supernetting
Subnetting supernetting
 
ccna networking ppt
ccna networking pptccna networking ppt
ccna networking ppt
 
6 understanding DHCP
6 understanding DHCP6 understanding DHCP
6 understanding DHCP
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 
DHCP Protocol
DHCP ProtocolDHCP Protocol
DHCP Protocol
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
 
Subnetting
SubnettingSubnetting
Subnetting
 
Dynamic Host Configuration Protocol
Dynamic Host Configuration ProtocolDynamic Host Configuration Protocol
Dynamic Host Configuration Protocol
 

Similar to DHCP

Durai presentation of dhcp
Durai presentation of dhcpDurai presentation of dhcp
Durai presentation of dhcpduraimurugan89
 
Zoran - 70-216 DHCP.ppt
Zoran - 70-216 DHCP.pptZoran - 70-216 DHCP.ppt
Zoran - 70-216 DHCP.pptIggiePoppins
 
DHCP Server & Client Presentation
DHCP Server & Client PresentationDHCP Server & Client Presentation
DHCP Server & Client Presentationraini
 
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...Vignesh kumar
 
Tutorial on dhcp
Tutorial on dhcp Tutorial on dhcp
Tutorial on dhcp Salah Amean
 
Module (8) DHCP Server.pptx
Module (8) DHCP Server.pptxModule (8) DHCP Server.pptx
Module (8) DHCP Server.pptxGeorgeThoreJr
 
Dhcp server configuration
Dhcp server configurationDhcp server configuration
Dhcp server configurationUttamAgarwal9
 
Networking DHCP server Setup Reports
Networking DHCP server Setup ReportsNetworking DHCP server Setup Reports
Networking DHCP server Setup ReportsJiaul Hasan Jony
 
dhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptxdhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptxKushalAsodia
 

Similar to DHCP (20)

Durai presentation of dhcp
Durai presentation of dhcpDurai presentation of dhcp
Durai presentation of dhcp
 
unit 2
unit 2unit 2
unit 2
 
zuiqui_DHC.ppt
zuiqui_DHC.pptzuiqui_DHC.ppt
zuiqui_DHC.ppt
 
Zoran - 70-216 DHCP.ppt
Zoran - 70-216 DHCP.pptZoran - 70-216 DHCP.ppt
Zoran - 70-216 DHCP.ppt
 
DHCP.pptx
DHCP.pptxDHCP.pptx
DHCP.pptx
 
DHCP Server & Client Presentation
DHCP Server & Client PresentationDHCP Server & Client Presentation
DHCP Server & Client Presentation
 
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
 
Tutorial on dhcp
Tutorial on dhcp Tutorial on dhcp
Tutorial on dhcp
 
DHCP
DHCPDHCP
DHCP
 
Dhcp
DhcpDhcp
Dhcp
 
Dhcp
DhcpDhcp
Dhcp
 
Module (8) DHCP Server.pptx
Module (8) DHCP Server.pptxModule (8) DHCP Server.pptx
Module (8) DHCP Server.pptx
 
Moac291 Week02
Moac291 Week02Moac291 Week02
Moac291 Week02
 
Lession4 Dhcp
Lession4 DhcpLession4 Dhcp
Lession4 Dhcp
 
DHCP Server Guaidlines using CISCO PACKET TRACER
DHCP Server Guaidlines using CISCO PACKET TRACERDHCP Server Guaidlines using CISCO PACKET TRACER
DHCP Server Guaidlines using CISCO PACKET TRACER
 
Dhcpsession
DhcpsessionDhcpsession
Dhcpsession
 
Dhcp server configuration
Dhcp server configurationDhcp server configuration
Dhcp server configuration
 
Networking DHCP server Setup Reports
Networking DHCP server Setup ReportsNetworking DHCP server Setup Reports
Networking DHCP server Setup Reports
 
dhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptxdhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptx
 
Dhcp with cisco
Dhcp with ciscoDhcp with cisco
Dhcp with cisco
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 

DHCP

  • 1. DHCP Dynamic Host Configuration Protocol CIS 856: TCP/IP and Upper Layer Protocols Presented by Kyle Getz October 20, 2005
  • 2. Motivation for DHCP  Configuration parameters for network hosts  IP address  Router  Subnet Mask  Many more…  Before DHCP  Manual assignment  RARP  BOOTP
  • 3. DHCP Features  Protocol for providing configuration parameters to hosts over network  Dynamic allocation of IP addresses  Minimal human intervention
  • 4. Sample Network Router Internet DHCP Server UDP Port 68 UDP Port 68 UDP Port 68 UDP Port 67 DHCP Clients
  • 5. Preliminaries  (DHCP) Message = DHCP-PDU (A-PDU)  Client = DHCP Client  Server = DHCP Server  Well-known port numbers  DHCP Server: UDP port 67  DHCP Client: UDP port 68  No ephemeral ports  Broadcast and unicast used for PDU’s in both directions  “Broadcast”: link and IP addresses are broadcast  “Unicast”: link and IP addresses are unicast
  • 6. Initial Message Flow Server A Client Server B Client attempts to discover available DHCP serversDHCPDISCOVE R DHCPDISCOVE R Servers reply with offers DHCPOFFE R DHCPOFFE R Client collects offers and decides which offer to accept Client broadcasts request for one of the received offersDHCPREQUES T DHCPREQUES T Server acknowledges client’s use of IP addressDHCPAC K Configuration complete Client explicitly releases use of IP addressDHCPRELEA SE Graceful shutdown
  • 7. DHCP Message Types DHCP Message Use DHCPDISCOVER Client broadcast to locate available servers DHCPOFFER Server to client response offering configuration parameters DHCPREQUEST Client broadcast requesting offered parameters DHCPDECLINE Client to server notification that IP address is in use DHCPACK Server to client response confirming a request DHCPNAK Server to client response denying a request DHCPRELEASE Client to server request to relinquish IP address DHCPINFORM Client to server request for configuration parameters
  • 8. Lease Renewal Times (Client)  T1 < T2 < Lease time  T1 default value = 1/2 of lease time  T2 default value = 7/8 of lease time  Communicated via DHCPOFFER, DHCPACK  Client actions when times elapse  T1: client must renew address with the DHCP server  T2: client must renew address with any DHCP server  Lease time: client must stop using IP address
  • 9. Renewal Message Flow Server A Client Server B Client unicasts request to continue using IP addressDHCPREQUES T Server acknowledges request and updates leaseDHCPACK Client broadcasts request to continue using IP addressDHCPREQUES T DHCPREQUES T Server acknowledges request and updates leaseDHCPAC K Configuration complete T1 elapses T1 elapses Client unicasts request to continue using IP addressDHCPREQUES T T2 elapses Configuration complete
  • 10. Client FSM (Simplified) INIT SELECTIN G -/DHCPDISCOV ER DHCPOFFER/ Process offer REQUESTIN G Select offer/DHCPREQUEST BOUN D DHCPACK/Set T1,T2 DHCPACK/Set T1,T2 DHCPACK/Set T1,T2 RENEWIN G T1/ Unicast DHCPREQUES T REBINDIN G T2/Broadcast DHCPREQUEST DHCPNAK/ Stop using IP addressDHCPNAK, Lease expires/ Stop using IP address DHCPACK (in use)/ DHCPDECLINE DHCPNAK/ Discard offer
  • 11. Retransmissions  Client responsible for all retransmissions  Retransmission strategy  Exponential backoff  Randomized  Recommendations  Base delay doubled for each retransmission  Random number picked from [-1,+1]  Maximum base delay: 64 seconds
  • 12. Server Storage  Permanent storage  Pool of available IP addresses  Local configuration parameters  Mapping between clients and leases  Flexibility concerning storage update  When DHCPOFFER sent  When DHCPACK sent
  • 13. Server Logic (Simplified) Event Action Taken DHCPDISCOVER If current lease for client exists, send DHCPOFFER Else, if IP address available, send DHCPOFFER Else, do nothing DHCPREQUEST If IP address available, send DHCPACK Else, send DHCPNAK DHCPDECLINE Mark IP address unavailable, notify network administrator DHCPRELEASE Mark IP address available, delete lease DHCPINFORM Send DHCPACK with configuration parameters Lease expiration Mark IP address available, delete lease
  • 14. DHCP PDU Format 32 Bits Operation Code Hardware Type Hardware Length Hop Count Transaction ID Seconds Elapsed B Must Be Zero (MBZ) Client IP address Your IP address Server IP address Relay agent IP address Client hardware address (16 bytes) Server host name (64 bytes) Boot file name (128 bytes) Options (up to 312 bytes) Magic Cookie
  • 15. DHCP Options 255 End of options Code Length Data 1 byte 1 byte Length bytes 0 Padding 1 4 255 255 255 0 Subnet Mask: 99 130 83 99Magic Cookie: Option format: One-byte options: 4 bytes
  • 16. Another Sample Network Router Internet DHCP Server DHCP Clients Relay Agent within
  • 17. Relay Agents  Remove restriction of having DHCP server on every network  Listen for DHCP messages and transmit them to appropriate machine  Client to server relay  Broadcast from client → Unicast to server(s)  Server to client relay  Broadcast from server → Broadcast to client  Unicast from server → Unicast to client
  • 19. Advanced Topics  Lease times  Dynamic DNS  Reliability  Security
  • 20. Lease Times  Anywhere from 15 minutes – 1 year  Common lease times & rationales  15 minutes: Maximum number of addresses free  3 days: Microsoft default  4 months: Students can keep lease over summer  Tradeoff
  • 21. Dynamic DNS  If IP address changes due to DHCP, DNS entry is wrong  Client or server can update DNS  Option 81: Client FQDN 81 Length Flags rcode1 rcode2 Name… 1 byte 1 byte “Length” bytes
  • 22. Reliability  Two synchronized DHCP servers on the same network: Primary, Secondary  Permanent storage constantly communicated  Failure: Secondary server takes over Secondar y Server DHCP Clients Primary Server
  • 23. Security  Potentially unauthorized clients  Malicious client could exhaust address pool  Malicious server (Rogue server)  Supply incorrect configuration parameters  Supply malicious configuration parameters