DHCP Dynamic Host Configuration Protocol
Information management 2 Groep T Leuven – Information department 2/18 Agenda Introduction BOOTP Packet Format DHCP
Information management 3 Groep T Leuven – Information department 3/18 Introduction – RARP is limited RARP only returns IP address Does not cross routers Difficult to program Need for mask Need for default gateway Need for DNS server Need for...
Information management 4 Groep T Leuven – Information department 4/18 BOOTP Packet Format IP Header IP Header UDP Header UDP Header BOOTP request/reply UDP datagram IP datagram 20 bytes8 bytes300 bytes
Information management 5 Groep T Leuven – Information department 5/18 BOOTP Header Opcode (1=request, 2=reply) Hardware type 1=Ethernet Hop count Transaction ID Number of seconds (Unused) Client IP address Your IP address Server IP address Hardware Address length Gateway IP address Client hardware address Server hostname Boot filename Vendor specific information 300 bytes
Information management 6 Groep T Leuven – Information department 6/18 UDP Port numbers Client uses port 68 Server uses port 67
Information management 7 Groep T Leuven – Information department 7/18 DHCP – Dynamic host configuration protocol Extension of BOOTP Provides TCP/IP configuration parameters RFC 2131
Information management 8 Groep T Leuven – Information department 8/18 DHCP – DHCP Discover The Client is looking for available DHCP servers DHCP DISCOVER Broadcast DHCP DISCOVER Broadcast Source IP Address = Destination IP Address = UDP port 67 Client IP Address = Hardware Address = DHCP SERVER Client
Information management 9 Groep T Leuven – Information department 9/18 DHCP – DHCP Offer The servers response to the clients DHCP OFFER Destination IP Address = UDP Port 68 Your IP Address = Hardware Address = Subnet mask Default gateway Lease time Renewal time DNS server WINS server DHCP SERVER 22 DHCP OFFER Broadcast DHCP OFFER Broadcast Client
Information management 10 Groep T Leuven – Information department 10/18 DHCP – DHCP REQUEST Intends to accept the parameters DHCP REQUEST Broadcast DHCP REQUEST Broadcast 33 DHCP SERVER Source IP Address = Destination IP Address = UDP port 67 Client IP Address = Server IP Address = Hardware Address = Subnet mask Default gateway Lease time Renewal time DNS server WINS server Client
Information management 11 Groep T Leuven – Information department 11/18 The servers confirms the DHCP REQUEST + updates his database The servers confirms the DHCP REQUEST + updates his database UDP Port 68 IP Address = Hardware Address = Subnet mask Default gateway Lease time Renewal time DNS server WINS server DHCP SERVER 44 DHCP ACK Broadcast DHCP ACK Broadcast Client DHCP – DHCP ACK DHCP Table
Information management 12 Groep T Leuven – Information department 12/18 DHCP – Gratuitous ARP Client checks for unique IP address ARP REQUEST Broadcast ARP REQUEST Broadcast 55 IP Address = Hardware Address = Client
Information management 13 Groep T Leuven – Information department 13/18 DHCP – Renewing the Lease After T1 (= 0,5 x LT) the client will renew the lease By issuing a DHCP REQUEST After T1 (= 0,5 x LT) the client will renew the lease By issuing a DHCP REQUEST DHCP REQUEST DHCP REQUEST DHCP SERVER Source IP Address = Destination IP Address = UDP port 67 Client IP Address = Server IP Address = Hardware Address = Subnet mask Default gateway Lease time Renewal time DNS server WINS server Client
Information management 14 Groep T Leuven – Information department 14/18 After REBOOT the client will renew the lease By issuing a DHCP REQUEST After REBOOT the client will renew the lease By issuing a DHCP REQUEST DHCP REQUEST Broadcast DHCP REQUEST Broadcast DHCP SERVER Source IP Address = Destination IP Address = UDP port 67 Client IP Address = Server IP Address = Hardware Address = Subnet mask Default gateway Lease time Renewal time DNS server WINS server Client DHCP – Renewing the Lease after REBOOT
Information management 15 Groep T Leuven – Information department 15/18 DHCP on a routed network Broadcast does not cross routers ! Client AB BOOTP/DHCP RELAY AGENT BOOTP/DHCP RELAY AGENT DHCP Server DHCP Server DHCP DISCOVER Broadcast DHCP DISCOVER Broadcast DHCP DISCOVER unicast DHCP DISCOVER unicast 1122 Gateway IP address = IP helper address =
Information management 16 Groep T Leuven – Information department 16/18 DHCP on a routed network Broadcast does not cross routers ! Client AB BOOTP/DHCP RELAY AGENT BOOTP/DHCP RELAY AGENT DHCP Server DHCP Server DHCP OFFER Broadcast DHCP OFFER Broadcast DHCP OFFER unicast DHCP OFFER unicast IP helper address = Destination IP Address = UDP Port 67 Your IP Address = Server IP Address = Gateway IP Address = Hardware Address = Subnet mask Default gateway Lease time...
Information management 17 Groep T Leuven – Information department 17/18 DHCP Commands WIN NT/2K –ipconfig /release –ipconfig /renew WIN95 –winipcfg
Information management 18 Groep T Leuven – Information department 18/18 DHCP DHCPNACK The server.to.client communication, refusing the request for configuration parameter. DHCPDECLINE The client.to.server communication, indicating that the network address is already in use. (arp) DHCPRELEASE The client.to.server communication, relinquishing network address and canceling remaining lease.