NETWORK STRATEGIES LECTURE 4 BOOTP DHCP Dr Naveed
NETWORK STRATEGIES LECTURE 4 BOOTP & DHCP Dr. Naveed Ahmad Assistant Professor Department of Computer Science University of Peshawar
Motivation for IP Addresses � Each computer that uses the TCP/IP protocol suite needs to know its IP address. Most computers today need two other pieces of information: the address of a default router to be able to communicate with other networks and the address of a name server to be able to use names instead of addresses.
BOOTP � The Bootstrap Protocol (BOOTP) is a client/server protocol that configures a diskless computer or a computer that is booted for the first time. BOOTP provides the • IP address net mask the address of a default router the address of a name server. • • • � BOOTP is static. When a client workstation asks for the above info, it is retrieved from a fixed table. Every time the client asks for the info, it gets the same results.
Client and server on the same network
Client and server on two different networks
Uses of UDP port
Dynamic Host Configuration Protocol (DHCP) � � � DHCP builds on the BOOTP protocol. Probably best known for its IP address leasing capability. Configured as: � DHCP Client � DHCP Server � BOOTP Relay Agent � Binding
IP Addresses Allocation � � � Automatic Allocation: permanently assigns an IP address to a station. Dynamic Allocation: assigns an IP address to a requesting station for specified amount of time. Manual Allocation: preconfigure the server to give the requesting station the same IP address every time it requests it.
DHCP Messages � � � � DHCPDISCOVER DHCPOFFER DHCPREQUEST DHCPACK DHCPNAK DHCPDECLINE DHCPRELEASE DHCPINFORM
DHCP transition diagram
DHCP Exchange Messages Discover: client tries to find out what servers are out there. Offer: those servers that can provide this service respond Request: client selects one offer and makes a request ACK: server acks the request When 50% of the lease period is expired, client asks for a renewal. If ACK received, reset timer. If NAK, go back to initializing state.
Lease Duration � The length of time that a client has sole use of an IP address is known as a lease. � Lease duration is negotiated between the client and the server during the Request/Offer protocol. � � � There is no synchronization of timers between the server and a client: � A server may grant a smaller time than requested to the client, but write the original time in its database. To extend the lease, the client must request this of the server: � If there is not an extension request, the lease expires. Times are based on a 32 -bit integer: � Different implementations allow for different maximum lengths.
DHCP Packet format
DHCP conversation table � Below is a summary table of the conversation between client and server, which is followed by a packet-level description of the process:
� The client sends a DHCPDISCOVER packet. The following is an excerpt from a network monitor capture showing the IP and DHCP portions of a DHCPDISCOVER packet. In the IP section, you can see the Destination address is 255 and the Source address is 0. 0. The DHCP section identifies the packet as a Discover packet and identifies the client in two places using the physical address of the network card. Note the values in the CHADDR field and the DHCP: Client Identifier field are identical.
� The DHCP server responds by sending a DHCPOFFER packet. In the IP section of the capture excerpt below, the Source address is now the DHCP server IP address, and the Destination address is the broadcast address 255. The DHCP section identifies the packet as an Offer. The YIADDR field is populated with the IP address the server is offering the client. Note the CHADDR field still contains the physical address of the requesting client. Also, we see in the DHCP Option Field section the various options being sent by the server along with the IP address. In this case the server is sending the Subnet Mask, Default Gateway (Router), Lease Time, WINS server address (Net. BIOS Name Service), and the Net. BIOS Node Type.
� The client responds to the DHCPOFFER by sending a DHCPREQUEST. In the IP section of the capture below, the Source address of the client is still 0. 0 and the Destination for the packet is still 255. The client retains 0. 0 because the client hasn't received verification from the server that it's okay to start using the address offered. The Destination is still broadcast, because more than one DHCP server may have responded and may be holding a reservation for an Offer made to the client. This lets those other DHCP servers know they can release their offered addresses and return them to their available pools. The DHCP section identifies the packet as a Request and verifies the offered address using the DHCP: Requested Address field. The DHCP: Server Identifier field shows the IP address of the DHCP server offering the lease.
� The DHCP server responds to the DHCPREQUEST with a DHCPACK, thus completing the initialization cycle. The Source address is the DHCP server IP address, and the Destination address is still 255. The YIADDR field contains the client's address, and the CHADDR and DHCP: Client Identifier fields are the physical address of the network card in the requesting client. The DHCP Option section identifies the packet as an ACK. s
Renewal/Rebinding-1
Renewal/Rebinding-2 � � (1) Renewal Timer (T 1) Expires The renewal timer, T 1, is set by default to 50% of the length of the lease. When the timer goes off, the client transitions from the BOUND state to the RENEWING state. (2) Client Sends DHCPREQUEST Renewal Message Unicast, to known server. (3) Server Receives and Processes DHCPREQUEST Message and Creates Reply (A) Server Agrees To Renew Client Lease (B) Server Refuses To Renew Client Lease (4) Server Sends Reply
Renewal/Rebinding-3 � � (5) Client Receives and Processes Server Reply (A) Positive Acknowledgment- resets the T 1 and T 2 timers, and transitions back to the BOUND state (B) Negative Acknowledgment- INIT state to get new release (6) Rebinding Timer (T 2) Expires (if 5(B) happens) This will cause the client to transition to the REBINDING state, the T 2 timer is set to 87. 5% of the length of the lease. (7). Client Sends DHCPREQUEST Rebinding Message Broadcast and put its previous leased IP address. (A) POSITIVEACK (B) NEGATIVEACK (8). Server sends reply
- Slides: 25