PART XXII
BOOTSTRAP AND AUTOCONFIGURATION(DHCP)
Internetworking With TCP/IP vol 1 -- Part 22 1 2005
System Startup
d To keep protocol software general
IP stack designed with many parameters
Values lled in when system starts
d Two possible sources of information
Local storage device (e.g., disk)
Server on the network
Internetworking With TCP/IP vol 1 -- Part 22 2 2005
Bootstrapping
d BOOTstrap Protocol (BOOTP)
Early alternative to RARP
Provided more than just an IP address
Obtained conguration parameters from a server
Used UDP
d Dynamic Host Conguration Protocol (DHCP)
Replaces and extends BOOTP
Provides dynamic address assignment
Internetworking With TCP/IP vol 1 -- Part 22 3 2005
Apparent Contradiction
d DHCP used to obtain parameters for an IP stack
d DHCP uses IP and UDP to obtain the parameters
d Stack must be initialized before being initialized
Internetworking With TCP/IP vol 1 -- Part 22 4 2005
Solving The Apparent Contradiction
d DHCP runs as application
d Only needs basic facilities
d In particular:
An application program can use the limited broadcast IPaddress to force IP to broadcast a datagram on the localnetwork before IP has discovered the IP address of the localnetwork or the machines IP address.
d Note: server cannot use ARP when replying to clientbecause client does not know its own IP address
Internetworking With TCP/IP vol 1 -- Part 22 5 2005
DHCP Retransmission
d Client handles retransmission
d Initial timeout selected at random
d Timeout for successive retransmissions doubled
Internetworking With TCP/IP vol 1 -- Part 22 6 2005
Two-Step Bootstrap
d DHCP provides information, not data
d Client receives
Name of le that contains boot image
Address of server
d Client must use another means to obtain the image to run(typically TFTP)
Internetworking With TCP/IP vol 1 -- Part 22 7 2005
Dynamic Address Assignment
d Needed by ISPs
Client obtains an IP address and uses temporarily
When client nishes, address is available for anotherclient
d Also used on many corporate networks
Internetworking With TCP/IP vol 1 -- Part 22 8 2005
DHCP Address Assignment
d Backward compatible with BOOTP
d Can assign addresses in three ways
Manual (manager species binding as in BOOTP)
Automatic (address assigned by server, and machineretains same address)
Dynamic (address assigned by server, but machine mayobtain new address for successive request)
d Manager chooses type of assignment for each address
Internetworking With TCP/IP vol 1 -- Part 22 9 2005
DHCP Support For Autoconguration
Because it allows a host to obtain all the parameters needed forcommunication without manual intervention, DHCP permitsautoconfiguration. Autoconfiguration is, of course, subject toadministrative constraints.
Internetworking With TCP/IP vol 1 -- Part 22 10 2005
Dynamic Address Assignment
d Client is granted a lease on an address
d Server species length of lease
d At end of lease, client must renew lease or stop usingaddress
d Actions controlled by nite state machine
Internetworking With TCP/IP vol 1 -- Part 22 11 2005
Server Contact
To use DHCP, a host becomes a client by broadcasting amessage to all servers on the local network. The host thencollects offers from servers, selects one of the offers, andverifies acceptance with the server.
Internetworking With TCP/IP vol 1 -- Part 22 12 2005
DHCP Finite State Machine
REBIND
INITIALIZE
BOUND
RENEW
SELECT
REQUEST
/ DHCPDISCOVER
Select Offer /DHCPREQUEST
DHCPOFFER
DHCPACK
DHCPACK
DHCPACK
DHCPNACKDHCPNACKor
Lease Expires
Lease Reaches50% Expiration /DHCPREQUEST
Lease Reaches87.5% Expiration /DHCPREQUEST
Host Boots
Cancel Lease / DHCPRELEASE
Internetworking With TCP/IP vol 1 -- Part 22 13 2005
DHCP Message Format
0 8 16 24 31
OP HTYPE HLEN HOPS
TRANSACTION ID
SECONDS FLAGS
CLIENT IP ADDRESS
YOUR IP ADDRESS
SERVER IP ADDRESS
ROUTER IP ADDRESS
CLIENT HARDWARE ADDRESS (16 OCTETS)...
SERVER HOST NAME (64 OCTETS)...
BOOT FILE NAME (128 OCTETS)...
OPTIONS (VARIABLE)...
Internetworking With TCP/IP vol 1 -- Part 22 14 2005
Message Type Field
0 8 16 23
CODE (53) LENGTH (1) TYPE (1 - 7)
TYPE FIELD Corresponding DHCP Message Type
1 DHCPDISCOVER2 DHCPOFFER3 DHCPREQUEST4 DHCPDECLINE5 DHCPACK6 DHCPNACK7 DHCPRELEASE8 DHCPINFORM
Internetworking With TCP/IP vol 1 -- Part 22 15 2005
Questions For Discussion
d Explain the relationship between DHCP and DNS
d What basic facility is needed? Why?
Internetworking With TCP/IP vol 1 -- Part 22 16 2005
Summary
d Two protocols available for bootstrapping
BOOTP (static binding of IP address to computer)
DHCP (extension of BOOTP that adds dynamic bindingof IP addresses)
d DHCP
Server grants lease for an address
Lease species length of time
Host must renew lease or stop using address when leaseexpires
Actions controlled by nite state machine
Internetworking With TCP/IP vol 1 -- Part 22 17 2005
Questions?
Top Related