03 DHCP - Dynamic Host Control Protocol PDF

Title 03 DHCP - Dynamic Host Control Protocol
Course Computer Networks
Institution The University of Texas at Dallas
Pages 3
File Size 80.8 KB
File Type PDF
Total Downloads 47
Total Views 125

Summary

Dynamic Host Control Protocol...


Description

DHCP: Dynamic Host Configuration Protocol. DHCP provides IP Address to the clients automatically. With the IP Address it also provides other network address such as subnet mask, default gateway address, DNS server address, Lease time. The process of obtaining IP address by the DHCP client from the DHCP server is called DORA (Discover, Offer, Request, Acknowledgement) process. DHCP server- 67, DHCP client- 68. Port number can be used to identify which device is a server and which device is a host. DHCP is not just a computer, it can also be a smartphone or a router. Router acts as a DHCP server as it provides IP address to each device connected in its network. Steps: 1. When the client computer (or device) boots up or is connected to a network, a DHCPDISCOVER message is sent from the client to the server. As there is no network configuration information on the client so the message is sent with 0.0.0.0 as source address and 255.255.255.255 as destination address. If the DHCP server is on local subnet then it directly receives the message or in case it is on different subnet then a relay agent connected on client’s subnet is used to pass on the request to DHCP server. The transport protocol used for this message is UDP and the port number used is 67. The client enters the initializing stage during this step. 2. When the DHCP server receives the DHCPDISCOVER request message then it replies with a DHCPOFFER message. As already explained, this message contains all the network configuration settings required by the client. For example, the yaddr field of the message will contain the IP address to be assigned to client. Similarly the the subnet mask and gateway information is filled in the options field. Also, the server fills in the client MAC address in the chaddr field. This message is sent as a broadcast (255.255.255.255) message for the client to receive it directly or if DHCP server is in different subnet then this message is sent to the relay agent that takes care of whether the message is to be passed as unicast or broadcast. In this case also, UDP protocol is used at the transport layer with destination port as 68. The client enters selecting stage during this step. 3. The client forms a DHCPREQUEST message in reply to DHCPOFFER message and sends it to the server indicating it wants to accept the network configuration sent in the DHCPOFFER message. If there were multiple DHCP servers that received DHCPDISCOVER then client could receive multiple DHCPOFFER messages. But, the client replies to only one of the messages by populating the server identification field with the IP address of a particular DHCP server. All the messages from other DHCP servers are implicitly declined. The DHCPREQUEST message will still contain the source address as 0.0.0.0 as the client is still not allowed to use the IP address passed to it through DHCPOFFER message. The client enters requesting stage during this step. 4. Once the server receives DHCPREQUEST from the client, it sends the DHCPACK message indicating that now the client is allowed to use the IP address assigned to it. The client enters the bound state during this step. Initialising – selecting- requesting- bound- renew

Lease time is the time till the IP address can be used by the DHCP client. After the time is expired, the device sends a renew IP address request. Then DHCP server renews the IP address of that device with the same IP address. If a device does not send renew IP address request, then it is not available in the network. In this way, the DHCP server knows what devices are available in its network. In windows, cmd, use the command: “ipconfig /all” and check for IPv4 address. This is the IP address assigned by the DHCP server. Whenever we restart the computer, the IP address changes if it is configured with DHCP. This setting can be manually changed.

We can create a group of IP addresses in a network using DHCP Scope. It is used to create a group of IP Address in a computer network. You can create multiple scopes in a DHCP server and set different IP Addresses to each scope. Address reservation: This feature in DHCP is used to reserve an IP address to a particular device (MAC address) permanently. This is used for devices such as network printers for which the IP address should not be changed every time. DHCP server can also be configured in smartphone using Hotspot feature.

Operation: Request-1, Reply- 2 Hardware Type: 1 (Ethernet) Hardware Length: 6 (MAC address) Hops: Number of routers traversed. Initially it is 0 and gradually it gets incremented. XID: This is the transaction ID (random 32 bit). This is used to match the replies with the requests as both have the same XID. Secs: This is set by client as the number of seconds elapsed from the time DHCP process is started. Flags: This is broadcast flag. This can be set to 0 (DHCP server knows the IP address of the client ie., unicasts message) or 1 (DHCP server doesn’t know the IP address of the client ie., it broadcasts the message). Current IP address: For new connection requests, this is 0.0.0.0 and for renewal this will be the current IP address. Your IP address: This is filled by the DHCP server when assigning the IP address to the client. Server IP address: This is to be used in the Bootstrap process. This might be DHCP server address also. Gateway IP address: This is the IP address of the interface at which it receives the messages from the DHCP client. Client Hardware address: This maintains the MAC address of the DHCP client

Server Name and File: These can be used to carry option overloading. Options: This is of variable length. This contains information about:

Each of the message in DORA process, flows through Application layer, Transport layer, Network layer, Data link layer and Physical layer with the respective addition of headers and fields. Each router can have multiple interfaces and each interface has a different IP address. A group of devices connected to one interface forms one subnet. Thus, a router can have multiple subnets. Case 1: When DHCP server is in the same subnet. In this case, the switch broadcasts the DHCP Discover message (from DHCP client) as switch doesn’t know the IP address of DHCP server. There can be multiple DHCP servers in the network and the DHCP client can receive multiple Offer messages from the multiple DHCP servers. However, the client only considers the first message. Case 2: When DHCP is in the different subnet. In this case, the router unicasts the DHCP Discover message (from DHCP client) as router knows DHCP server IP address. Other than Discover, Offer, Request, Acknowledge, there are other DHCP messages also: Negative Acknowledgement: If the DHCP server gets to know that the IP address that is requested by the DHCP client is already allocated to other client or is moved to another subnet, then DHCP server sends Negative Acknowledgement message. In such cases, the DHCP client restarts the DORA process. Release: If the client gets disconnected or is moved to another subnet, then the client sends a message to release the IP address. Decline: If the DHCP server gets to know that the IP address allocated to a client is already allocated to another client after acknowledgement, then it declines the allocated IP address and restart the DORA process. Inform: If IP address is manually configured and if the client requests additional information, it sends Inform message. In this case, Your IP address field is blank because the IP address is configured manually...


Similar Free PDFs