240 likes | 275 Views
Chapter 16 Host Configuration : BOOTP and DHCP. Introduction. The information that is held in each computer attached to a TCP/IP internet Its IP address Its subnet mask The IP address of a router The IP address of a name server
E N D
Introduction • The information that is held in each computer attached to a TCP/IP internet • Its IP address • Its subnet mask • The IP address of a router • The IP address of a name server • The above information is usually stored in a configuration file and accessed by the computer during the bootstrap process • In the case of a diskless computer, the operating system and networking S/W can be stored in ROM. But the above information cannot be stored in ROM
16.1 BOOTP • BOOTP(Bootstrap Protocol) is client/server protocol designed to provide the information for a diskless computer or a computer that is booted for the first time • RARP provides only the IP address and not the other information • If we use BOOTP, we do not need RARP • RARP is not implemented in most systems, it is totally removed from TCP/IP version 6
Operation • Client and server on the same network
BOOTP (cont’d) • Operation • Steps involved in use of the BOOTP protocol • BOOTP server uses UDP port 67 and waiting for a client 2) The client sends a BOOTP request message to the server. The client uses 0s as the source address and all 1s as the destination address. 3) The server replies to the client with either a broadcast or a unicast message using UDP destination port 68.
BOOTP (cont’d) • UDP Ports • BOOTP is the client’s use of the well-known port 68 instead of an ephemeral port • if two hosts with same well-known port 68 use BOOTP at the same time in case of broadcasting the reply, both hosts receive the message. • In this case, transaction ID is used • Using TFTP • If a client needs more information for booting, the client can use the pathname of a file sent by server which the client can find complete booting information. • The client can then use a TFTP message to get the rest of the needed information.
BOOTP (cont’d) • Relay agent • In case that does not include a BOOTP sever in each LAN, a remote BOOTP server may serve several LANs • If a client needs to be booted, it cannot reach the remote sever using the broadcast address because an address of all 1s has only local jurisdiction. • So, a relay agent is used to send local requests to remote severs
BOOTP (cont’d) • Client and server on two different networks
BOOTP (cont’d) Ethernet : 1 Ethernet : 6 Maximum No. of Hops that can travel
BOOTP (cont’d) • Operation code : request(1) or reply (0) • Transaction ID : set by the client and used to match a reply with the request • Number of seconds : indicating the number of seconds elapsed since the time the client started to boot • Your IP address : client address filled by server (in the client message) • Server IP address : in a reply message • Gateway IP address : IP address of a router in a reply message
BOOTP (cont’d) • Server name : the domain name of the server in a reply packet • Boot filename : the full pathname of the boot in a reply packet (128-byte) • Options : used in a reply message (64-byte) • carrying either additional information (such as the network mask or default router address) or some specific vendor information • in case of magic cookie, with 99.130.83.99, options have following options.
BOOTP (cont’d) • Option of format
BOOTP (cont’d) • Options for BOOTP
16.2 Dynamic Host Configuration Protocol (DHCP) • BOOTP is not dynamic configuration protocol. • When a client requests its IP address, the BOOTP sever looks up a table that matches the physical address of the client with its IP address. • This means that the binding between the physical address and the IP address of the client should already exist. • What if a host moves from one physical network to another ? • DHCP is extension to BOOTP and has backward compatible with BOOTP • meaning that a host running the BOOTP client can request a static configuration to a DHCP server
DHCP (Cont’d) • DHCP provides temporary IP addresses for a limited period of time • DHCP has two DBs • one for statically binding between physical address and IP address • the other one with a pool of available IP addresses • When a DHCP client requests a temporary IP addresses, the DHCP sever assigns an IP address from a pool for a negotiable period of time • When a DHCP client sends a request to a DHCP server • At first, checking its static database • If not , selecting an IP address from the available pool
DHCP (Cont’d) • Leasing • The DHCP server issues a lease for a specific period of time • When the lease expires, the client must either stop using the IP address or renew the lease • DHCP Operation • A client broadcasts a DHCPDISCOVER message using destination port 67 • Servers respond with a DHCPOFFER message including an IP address • Offering the duration of the lease - default : one hour • The server that sends a DHCPOFFER locks the offered IP address so that it is not available to any other clients
DHCP (Cont’d) • If the client receives no DHCPOFER message, it will try four more times, each with a SPAN of two seconds. • If there is no reply to any of these DHCPDISCOVERs, the client sleeps for five minutes before trying again 3. The client chooses one of the offers and sends a DHCPREQUEST message to the selected sever 4. The server responds with a DHCPACK message and creates the binding between the client physical address and its IP address 5. Before 50 percent of the lease period is reached, the client sends another DHCPREQUEST and asks for renewal
DHCP (Cont’d) 6. If the server responds with a DHCPACK, the client has a new lease agreement and can reset its timer. If the server responds with a DHCPNACK, the client must immediately stop using the IP address and find another server (step 1) 7. If the sever does not respond, the client sends another DHCPREQUEST when the lease time reaches 87.5 percent. If the client terminates the lease prematurely, the client sends a DHCPRELEASE message to the server.
DHCP (Cont’d) • DHCP Transition Diagram
DHCP (Cont’d) • Packet Format • To make DHCP backward compatible with BOOTP, it is only added a one-bit flag to the packet. • extra options have been added to the option field • Flag : • Let client specify a forced broadcast reply from the server • Option : • several options are added • Ex) the value 53 for the tag subfield is used to define the type of interaction between the client and server • MAX : 312 bytes
DHCP (Cont’d) • DHCP Options