****DRAFT
****Please note this article is not finished!
The Internet Engineering Task Force (IETF) introduced the Request for Comments (RFC) for Dynamic Host Configuration (RFC 1531) in October 1993. The purpose of this working group was the formulation of a protocol that would allocate IP addresses and provide client configuration information. RFC 1531 has been superceded by RFC 2131 and 2132 in March 1997. Since 1997 various other RFCs have also updated different aspects of DHC. More information may be obtained on the internet at the IETF Dynamic Host Configuration Chater website, http://www.ietf.org/html.charters/dhc-charter.html.
Is DHCP for my organization? DHCP provides 2 useful functions. It allocates IP addresses which all computers need to be able to communicate on the internet. It also allows for dynamic configuration of various option such as gateway router, domain name server, printers and many more.
The fundamental business consideration here revolves around the issue of whether or not it is more cost effective for support personnel to spend time changing host configuration options and the man hours of lost productivity due to employees not being able to access the internet / corporate network on there computers.
A formula for determing the cost effectiveness of DHCP would look something like this:
Personnel Cost of Allocating IP Addresses and Configuring Host Computers in $/hr + Cost of Lost Productivity in $/hr => or =< Cost of Implementing DHCP
Obviously, in a SOHO or small business environment, having a DHCP server is probably not necessary. But, in a larger environment the reduction in the loss of productivity and lower amount of time spent configuring network parameters is usually reduced by implementing a DHCP server(s).
The DHCP communication stream consists of 4 separate steps; Discovery, Offer, Request, Acknowledgement. The communciation endpoints for this stream are specified by the Internet Assigned Numbers Authority (IANA). The specific port numbers for DHCP communication are:
bootps 67/tcp Bootstrap Protocol Server bootps 67/udp Bootstrap Protocol Server bootpc 68/tcp Bootstrap Protocol Client bootpc 68/udp Bootstrap Protocol Client
The client sends out a broadcast to it's subnet. If the network administrator has set it up this broadcast can be forwarded by a router or dhcp relay agent to a server on another subnet. The broadcast is sent from the source 0.0.0.0:68 to 255.255.255.255:67. Below is a packet capture from Wireshark of a DHCP discovery packet. The client computer used to send this packet has the options set to request a previous IP Address issued by the DHCP server.
No. Time Source Destination Protocol Info
72 1.815217 0.0.0.0 255.255.255.255 DHCP DHCP Discover - Transaction ID 0x88aece2
Frame 72 (342 bytes on wire, 342 bytes captured)
Arrival Time: Aug 7, 2007 20:26:43.492921000
[Time delta from previous packet: 0.191773000 seconds]
[Time since reference or first frame: 1.815217000 seconds]
Frame Number: 72
Packet Length: 342 bytes
Capture Length: 342 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:bootp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: AbitComp_b3:41:20 (00:50:8d:b3:41:20), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x088aece2
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Discover
Option: (53) DHCP Message Type
Length: 1
Value: 01
Option: (t=116,l=1) DHCP Auto-Configuration
Option: (116) DHCP Auto-Configuration
Length: 1
Value: 01
Option: (t=61,l=7) Client identifier
Option: (61) Client identifier
Length: 7
Value: 0100508DE74230
Hardware type: Ethernet
Client MAC address: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Option: (t=50,l=4) Requested IP Address = 21.3.121.43
Option: (50) Requested IP Address
Length: 4
Value: 18056732
Option: (t=12,l=4) Host Name = "client"
Option: (12) Host Name
Length: 4
Value: 45646765
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
Option: (60) Vendor class identifier
Length: 8
Value: 4D53465420352E30
Option: (t=55,l=11) Parameter Request List
Option: (55) Parameter Request List
Length: 11
Value: 010F03062C2E2F1F21F92B
1 = Subnet Mask
15 = Domain Name
3 = Router
6 = Domain Name Server
44 = NetBIOS over TCP/IP Name Server
46 = NetBIOS over TCP/IP Node Type
47 = NetBIOS over TCP/IP Scope
31 = Perform Router Discover
33 = Static Route
249 = Classless static routes
43 = Vendor-Specific Information
End Option
Padding
The server then responds with a DHCP offer.
No. Time Source Destination Protocol Info
90 2.136961 73.121.144.1 21.3.121.43 DHCP DHCP Offer - Transaction ID 0x88aece2
Frame 90 (346 bytes on wire, 346 bytes captured)
Arrival Time: Aug 7, 2007 20:26:43.814665000
[Time delta from previous packet: 0.009278000 seconds]
[Time since reference or first frame: 2.136961000 seconds]
Frame Number: 90
Packet Length: 346 bytes
Capture Length: 346 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:bootp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Cadant_23:38:c2 (00:01:5c:23:38:c2), Dst: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Internet Protocol, Src: 73.121.144.1 (73.121.144.1), Dst: 21.3.121.43 (21.3.121.43)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x088aece2
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 21.3.121.43 (21.3.121.43)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 73.121.144.1 (73.121.144.1)
Client MAC address: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (53) DHCP Message Type
Length: 1
Value: 02
Option: (t=54,l=4) Server Identifier = 68.87.76.23
Option: (54) Server Identifier
Length: 4
Value: 44574C17
Option: (t=51,l=4) IP Address Lease Time = 1 hour
Option: (51) IP Address Lease Time
Length: 4
Value: 00000E10
Option: (t=1,l=4) Subnet Mask = 255.255.240.0
Option: (1) Subnet Mask
Length: 4
Value: FFFFF000
Option: (t=15,l=20) Domain Name = "client.comcast.net."
Option: (15) Domain Name
Length: 20
Value: 687364312E63612E636F6D636173742E6E65742E
Option: (t=3,l=4) Router = 21.3.121.43
Option: (3) Router
Length: 4
Value: 18056001
Option: (t=6,l=8) Domain Name Server
Option: (6) Domain Name Server
Length: 8
Value: 44574CB244574E82
IP Address: 68.87.76.178
IP Address: 68.87.78.130
Option: (t=31,l=1) Perform Router Discover = Enabled
Option: (31) Perform Router Discover
Length: 1
Value: 01
End Option
Padding
The preceding packet provided the client with it's configuration information. In this particular instance the server is auto-configuring IP Address Lease Time, Subnet Mask, Domain Name, Router, Domain Name Server, and Router Discovery.
No. Time Source Destination Protocol Info
91 2.137207 0.0.0.0 255.255.255.255 DHCP DHCP Request - Transaction ID 0x88aece2
Frame 91 (346 bytes on wire, 346 bytes captured)
Arrival Time: Aug 7, 2007 20:26:43.814911000
[Time delta from previous packet: 0.000246000 seconds]
[Time since reference or first frame: 2.137207000 seconds]
Frame Number: 91
Packet Length: 346 bytes
Capture Length: 346 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:bootp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: AbitComp_b3:41:20 (00:50:8d:b3:41:20), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Source port: bootpc (68)
Destination port: bootps (67)
Length: 312
Checksum: 0x1bbb [correct]
Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x088aece2
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Request
Option: (53) DHCP Message Type
Length: 1
Value: 03
Option: (t=61,l=7) Client identifier
Option: (61) Client identifier
Length: 7
Value: 0100508DE74230
Hardware type: Ethernet
Client MAC address: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Option: (t=50,l=4) Requested IP Address = 21.3.121.43
Option: (50) Requested IP Address
Length: 4
Value: 18056732
Option: (t=54,l=4) Server Identifier = 68.87.76.23
Option: (54) Server Identifier
Length: 4
Value: 44574C17
Option: (t=12,l=4) Host Name = "client"
Option: (12) Host Name
Length: 4
Value: 45646765
Option: (t=81,l=8) Client Fully Qualified Domain Name
Option: (81) Client Fully Qualified Domain Name
Length: 8
Value: 000000456467652E
Flags: 0x00
0000 .... = Reserved flags: 0x00
.... 0... = Server DDNS: Some server updates
.... .0.. = Encoding: ASCII encoding
.... ..0. = Server overrides: No override
.... ...0 = Server: Client
A-RR result: 0
PTR-RR result: 0
Client name: client.
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
Option: (60) Vendor class identifier
Length: 8
Value: 4D53465420352E30
Option: (t=55,l=11) Parameter Request List
Option: (55) Parameter Request List
Length: 11
Value: 010F03062C2E2F1F21F92B
1 = Subnet Mask
15 = Domain Name
3 = Router
6 = Domain Name Server
44 = NetBIOS over TCP/IP Name Server
46 = NetBIOS over TCP/IP Node Type
47 = NetBIOS over TCP/IP Scope
31 = Perform Router Discover
33 = Static Route
249 = Classless static routes
43 = Vendor-Specific Information
End Option
No. Time Source Destination Protocol Info
106 2.180518 73.121.144.1 21.3.121.43 DHCP DHCP ACK - Transaction ID 0x88aece2
Frame 106 (346 bytes on wire, 346 bytes captured)
Arrival Time: Aug 7, 2007 20:26:43.858222000
[Time delta from previous packet: 0.043311000 seconds]
[Time since reference or first frame: 2.180518000 seconds]
Frame Number: 106
Packet Length: 346 bytes
Capture Length: 346 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:bootp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Cadant_23:38:c2 (00:01:5c:23:38:c2), Dst: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Internet Protocol, Src: 73.121.144.1 (73.121.144.1), Dst: 21.3.121.43 (21.3.121.43)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
Source port: bootps (67)
Destination port: bootpc (68)
Length: 312
Checksum: 0xb822 [correct]
Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x088aece2
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 21.3.121.43 (21.3.121.43)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 73.121.144.1 (73.121.144.1)
Client MAC address: AbitComp_b3:41:20 (00:50:8d:b3:41:20)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP ACK
Option: (53) DHCP Message Type
Length: 1
Value: 05
Option: (t=54,l=4) Server Identifier = 68.87.76.23
Option: (54) Server Identifier
Length: 4
Value: 44574C17
Option: (t=51,l=4) IP Address Lease Time = 1 hour
Option: (51) IP Address Lease Time
Length: 4
Value: 00000E10
Option: (t=1,l=4) Subnet Mask = 255.255.240.0
Option: (1) Subnet Mask
Length: 4
Value: FFFFF000
Option: (t=15,l=20) Domain Name = "hsd1.ca.comcast.net."
Option: (15) Domain Name
Length: 20
Value: 687364312E63612E636F6D636173742E6E65742E
Option: (t=3,l=4) Router = 24.5.96.1
Option: (3) Router
Length: 4
Value: 18056001
Option: (t=6,l=8) Domain Name Server
Option: (6) Domain Name Server
Length: 8
Value: 44574CB244574E82
IP Address: 68.87.76.178
IP Address: 68.87.78.130
Option: (t=31,l=1) Perform Router Discover = Enabled
Option: (31) Perform Router Discover
Length: 1
Value: 01
End Option
Padding