Unformatted text preview:

1HOST AUTO CONFIGURATION(BOOTP, DHCP)Internet ProtocolsCSC / ECE 573Fall, 2005N. C. State Universitycopyright 2005 Douglas S. Reeves2AnnouncementsI. HW5 online today, due in 1 week!copyright 2005 Douglas S. Reeves3Today’s LectureI. Auto configurationII. BOOTPIII. DHCPAUTO CONFIGURATIONcopyright 2005 Douglas S. Reeves5Host Autoconfiguration• What are the networking parameters needed toconfigure a host?• Essential– Own IP address– subnet mask– gateway (default router) IP address– DNS server IP address• Many others would be useful, as wellcopyright 2005 Douglas S. Reeves6Host Autoconfiguration (cont’d)• Choices of configuration– static (in configuration file on the local disk)– dynamic (from a server)• How do you ask a server to send configurationinformation if you don’t have an IP address?2copyright 2005 Douglas S. Reeves7Protocol ChoicesMinimal: Reverse ARP (RARP)– requests IP address corresponding to MAC address– can only provide the client’s IP addressBetter: BOOTP– provides many other configuration parameter valuesBest: DHCP– provides limited lifetimes on configuration informationBOOTPcopyright 2005 Douglas S. Reeves9BOOTstraP Protocol (RFCs 951,1542)• Single message exchange from server to client– provides many items needed at startup, in addition tothe IP addressH1 S1H2#2 BOOTP ReplyS2#3 Memory ImageRequest#4 Memory Image• BOOTP can tell clients where to get a “memoryimage” (startup program)#1 BOOTP Requestcopyright 2005 Douglas S. Reeves10BOOTP Messages• Client (host) uses the limited broadcast IPaddress (255.255.255.255) to broadcast theBOOTP Request on the local net– source IP address = 0.0.0.0 (used only duringbootstrapping)– multi-homed hosts issue one BOOTP Request foreach interface• BOOTP server responds, may use the limitedbroadcast address as destination of the BOOTPReplycopyright 2005 Douglas S. Reeves11BOOTP Reliability• BOOTP runs over UDP– client is responsible for ensuring reliablecommunication• if no Reply after sufficient time, timeout andretransmit Request– wait “random” delay before retransmission (between 0and 4 s)– double timeout value each time (exponential backoff)copyright 2005 Douglas S. Reeves12BOOTP Message FormatTo indicate response should bebroadcast2FlagsFor prioritizing / forwarding Requests2Seconds (since bootingstarted)For matching Reply with Request4Transaction IDInitialized to 0, relays increment1# of Hops6 for Ethernet1Length of physical addresse.g., Ethernet1Hardware TypeRequest or Reply1Operation TypeInterpretation#BytesField• Length = 236 bytes + Options3236 + optionsIf client wants specific server torespond64Server HostnameName of file containing memoryimage (in Request, type of OSdesired)128Boot File Name(Discussed later)variableOptionsSo server can unicast response toclient16Client Hardware Address(Discussed later)4Relay’s IP AddressIf client wants specific server torespond4Server IP AddressIP address to use (returned byserver)4Your IP Address0 if client doesn’t know4Client IP AddressInterpretation#BytesFieldBOOTP Message Format (cont’d)copyright 2005 Douglas S. Reeves14Address Fields• Client Request– client fills in as many fields as known, zeroes otherwise– Server IP Address?– Server Host Name?– Client IP Address?• Server Reply– if server specified by client, only that server responds– fills in whatever fields were set to zeroes by clientcopyright 2005 Douglas S. Reeves15BOOTP Options Field• Encoding of each option: TLV format– T = type or tag (1 byte)– L = length (1 byte)– V = value of option (N bytes)• Examples of options– subnet mask– client host name– memory image size– time of day– gateway IP addresses– DNS server IP addressescopyright 2005 Douglas S. Reeves16BOOTP Relays• BOOTP Relay Agents permit a machine tocontact a BOOTP server on a non-local network• If a server decides to relay a Request…– it puts its own IP interface address in the Relay IPAddress field– and forwards to the BOOTP server– clients ignore the Relay IP Address field in aReplycopyright 2005 Douglas S. Reeves17BOOTP Relays (cont’d)• Destination server sends Reply message tothe relay agent (server)– all Replies received by a relay agent are intendedfor clients on its directly-connected network• A Relay Agent examines the Relay IPaddress, Your IP Address, and ClientHardware Address to deliver the Replymessage to the clientDHCP4copyright 2005 Douglas S. Reeves19Dynamic Configuration• RARP and BOOTP are designed for a relativelystatic environment• Problems– need to assign one machine different IP addresses atdifferent times– need to reuse pool of IP addresses (clients only useaddresses temporarily)• Solution: dynamic address assignmentmechanismcopyright 2005 Douglas S. Reeves20Dynamic Host Configuration Protocol(RFCs 2131, 2132)• Extends BOOTP to handle dynamic addressassignment– “leases” an address for a limited time (from 1 sec toforever)– backwards-compatible with BOOTP clients, messageformat is the samecopyright 2005 Douglas S. Reeves21DHCP (cont’d)• DHCP server– is given a set of addresses to manage– leases addresses to clients– informs client of lease period (during which it will notlease same address to another client)• At end of the lease period, the client must eitherrenew the lease, or stop using the addresscopyright 2005 Douglas S. Reeves22Cancel lease /DHCPRELEASEDHCPNACK / -DHCPNACKor leaseexpires / -DHCP Client State DiagramINITSELECTREQUESTBOUNDREBINDRENEW- / DHCPDISCOVERDHCPOFFER / -select offer /DHCPREQUESTDHCPACK (includesparameters) / -Lease reaches 50%of expiration time /DHCPREQUESTLease reaches 87.5%of expiration time /DHCPREQUESTDHCPACK / -DHCPACK / -copyright 2005 Douglas S. Reeves23Cancel lease /DHCPRELEASEDHCPNACK / -DHCPNACKor leaseexpires / -DHCP Client State DiagramINITSELECTREQUESTBOUNDREBINDRENEW- / DHCPDISCOVERDHCPOFFER / -select offer /DHCPREQUESTDHCPACK (includesparameters) / -Lease reaches 50%of expiration time,or RENEWAL time /DHCPREQUESTLease reaches 87.5%of expiration time, orREBIND time /DHCPREQUESTDHCPACK / -DHCPACK / -copyright 2005 Douglas S. Reeves24DHCP Messages• Same format at BOOTP messages• Client should set Broadcast Flag to 1 if itdoes not have a valid IP address already• DHCPOFFER message includes configurationparameters, such a Your IP Address• Same Options as BOOTP, plus some additionalones5copyright 2005 Douglas S.


View Full Document

NCSU CSC (ECE) 573 - HOST AUTO CONFIGURATION

Documents in this Course
Load more
Download HOST AUTO CONFIGURATION
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view HOST AUTO CONFIGURATION and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view HOST AUTO CONFIGURATION 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?