SlideShare a Scribd company logo
2
Most read
5
Most read
7
Most read
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

PPT
Dhcp presentation 01
PPSX
Lesson 6: Dynamic Host Configuration Protocol A
PPT
PDF
DHCP (dynamic host configuration protocol)
PPT
Dhcp presentation
PPTX
PPTX
Dhcp presentation 01
Lesson 6: Dynamic Host Configuration Protocol A
DHCP (dynamic host configuration protocol)
Dhcp presentation

What's hot (20)

PPT
dynamic host configuration protocol
PPTX
PPTX
DHCP (Dynamic Host Configuration Protocol)
PPT
DHCP Protocol
PPT
Configuration DHCP
PPTX
PPTX
Dhcp ppt
PPTX
Unicast multicast & broadcast
PDF
Transport layer services
PPTX
Link state routing protocol
PPTX
Presentation on arp protocol
PPT
Address resolution protocol
PPTX
IPv6 DHCP
PPT
DHCP Server & Client Presentation
PPTX
Network Layer
PPTX
Csma cd and csma-ca
PPTX
Application layer protocols
PPT
Internet control message protocol
PPTX
Bgp protocol
PPT
dynamic host configuration protocol
DHCP (Dynamic Host Configuration Protocol)
DHCP Protocol
Configuration DHCP
Dhcp ppt
Unicast multicast & broadcast
Transport layer services
Link state routing protocol
Presentation on arp protocol
Address resolution protocol
IPv6 DHCP
DHCP Server & Client Presentation
Network Layer
Csma cd and csma-ca
Application layer protocols
Internet control message protocol
Bgp protocol
Ad

Similar to DHCP (20)

PPT
Wintel ppt for dhcp
PPT
Durai presentation of dhcp
PPT
zuiqui_DHC.ppt
PPTX
Dynamic Host Configuration Protocol (DHCP) is a network protocol that automat...
PPT
DHCP is stand for the Dynamic Host Configuration Protocol
PPT
Zoran - 70-216 DHCP.ppt
PPTX
DHCP.pptx
PPTX
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
PPTX
Tutorial on dhcp
PPT
PPTX
Module (8) DHCP Server.pptx
PPT
Moac291 Week02
PPT
Lession4 Dhcp
DOCX
DHCP Server Guaidlines using CISCO PACKET TRACER
ODP
Dhcpsession
PPTX
Dhcp server configuration
DOCX
Networking DHCP server Setup Reports
Wintel ppt for dhcp
Durai presentation of dhcp
zuiqui_DHC.ppt
Dynamic Host Configuration Protocol (DHCP) is a network protocol that automat...
DHCP is stand for the Dynamic Host Configuration Protocol
Zoran - 70-216 DHCP.ppt
DHCP.pptx
dhcp (dynamic host configuration protocol) very Cleare Explanation, Interview...
Tutorial on dhcp
Module (8) DHCP Server.pptx
Moac291 Week02
Lession4 Dhcp
DHCP Server Guaidlines using CISCO PACKET TRACER
Dhcpsession
Dhcp server configuration
Networking DHCP server Setup Reports
Ad

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
RMMM.pdf make it easy to upload and study
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Business Ethics Teaching Materials for college
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Pharma ospi slides which help in ospi learning
Complications of Minimal Access Surgery at WLH
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
RMMM.pdf make it easy to upload and study
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
TR - Agricultural Crops Production NC III.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
01-Introduction-to-Information-Management.pdf
Microbial disease of the cardiovascular and lymphatic systems
VCE English Exam - Section C Student Revision Booklet
Business Ethics Teaching Materials for college
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Anesthesia in Laparoscopic Surgery in India
Pharma ospi slides which help in ospi learning

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