The DHCP Client/Server Exchange continue…

Posted by arlene

Implicitly Releasing Configuration Information

In a DHCP environment, configuration information usually is granted for a set amount of time, called a lease. When the lease expires and the client has made no attempt to renew it, the configuration information can be used for another client. This can happen if a computer is moved from one subnet to another. Eventually, the original address it had obtained on the previous subnet will expire.

A client also can choose to implicitly release the addressing information. For example, a client that is gracefully shutting down can send a DHCPRELEASE message to the DHCP server, telling it that the lease is no longer needed.

The ipconfig command can be used by Windows XP Professional/2000 Client and Windows 2003 servers to release or renew a lease obtained from a DHCP server. To release an address lease, use the following syntax:

ipconfig/releas ipconfig/renew

If more than one network adapter is installed in the system, you can also specify the name of the adapter on the command line. This command releases the bindings obtained from DHCP servers for all adapters. If you are unsure of the adapter name, use the following command to display the current IP configuration for your computer:

ipconfig /all more

The ifconfig command can be used on Unix/Linux systems to perform configuration tasks related to IP. The syntax of this command varies from one implementation of Unix to another. However, this command on a Unix system performs a wider variety of tasks than the Windows ipconfig command, so use caution when using ifconfig. This ifconfig command can be used to configure each network interface on the Unix system, including address, subnet mask, and other important parameters. A general version of the command to release an IP address leased from a DHCP server for Unix is /sbin/ifconfig interface release

Living the Web 2.0Note that not all versions of Unix use the ifconfig command to manage DHCP, either the server or the client. As always with Unix, check the printed documentation and the manual (man) pages.

For example, Red Hat Linux uses the command dhclient to obtain a lease (dhclient -1) or release an address (dhclient -r).

Reusing an Address After Reboot

When a client is rebooted, it does not have to obtain a new IP address. Instead, it can request that the address assignment made from a previous exchange with a DHCP server be used. In this case, when the client reboots it broadcasts a DHCPREQUEST packet that contains the requested IP address option. Servers that know about this configuration information should respond with a DHCPACK message to the client. However, if the information is invalid—the client is now on a new subnet, for example— the servers should respond with a DHCPNAK message to force the client into beginning the lease process again.

The client also makes its own checks, again using ARP to find out whether the address is in use by another client. If so, it sends a DHCPDECLINE message back to the server and starts the process over.

Using the DHCPINFORM Message

It is quite acceptable for the network administrator to configure some of the IP configuration information on a client and then let DHCP be used for the remaining data. For example, a client can be manually configured with an IP address and subnet mask by the administrator, and then set to get the remaining information from a DHCP server. In this case, the client will broadcast a DHCPINFORM packet that contains the manually configured information. The server then responds to this message with a DHCPACK message. However, the server should not fill in the fields telling the client what its IP address should be and should not include any lease time values. Additionally, the server should not check its own database to see whether a binding for this address already exists.

Because the DHCP server knows the client’s address, the DHCPACK message is sent as a unicast packet instead of a broadcast one.

Lease Expiration and Renewal

If a client is using a lease and the lease time expires, the client must immediately stop using the IP address granted by the lease. There are two timers that the client uses to keep track of when and how to renew a lease. These are called T1 and T2. After the time value specified by T1 expires, the client begins trying to renew the existing lease. The client makes attempts to contact the DHCP server from which the lease was obtained to get this extension. At this point, the client is said to be in the RENEWING state.

If no response is received from the DHCP server when the time stored in T2 has expired, the client enters a REBINDING state and attempts to communicate with any other DHCP server so that it can obtain a new IP address.

Obviously, T1 is a value that is less than the lease time, because a lease must be renewed before it expires. The value for T2, likewise, must be longer than that for Tl.

If a client is unable to renew or acquire a lease before the expiration of the current lease, the client must stop using the information acquired through the lease and enter into an INIT state to start the process of acquiring configuration information all over again.

After a client has successfully renewed a lease or acquired a new one, it is said to be in the BOUND state. This is the normal state at which configuration is complete and the client computer is functional on the network.

In addition, an administrator usually can renew a release manually. The Windows command ipconfig can be used for this:

ipconfig /renew

As with the / release option, you can optionally place an adapter name on the command line to specify an adapter for this operation. If none is specified and more than one adapter is installed and configured using DHCP, all adapters will undergo the renew process.

Overview of How a DHCP Server Chooses the Client’s IP Address

RFC 2131 summarizes the process that a DHCP server goes through to decide what IP address to return to a client:

In the last case, an address is selected to match the client’s subnet or the subnet of the relay agent that forwarded the DHCP request.

Possibly related posts: (automatically generated)
The DHCP Client/Server Exchange continue…

6 Responses to “The DHCP Client/Server Exchange continue…”

  1. Use our comparison tool to compare heating cover and annual boiler service plans Compare heating cover and annual boiler service plans and buy online. … Heating Cover Comparison

  2. I have gone through the standard procedure of trying different web hosting companies, and I have never been quite satisfied until I discovered your services. … Web Hosting Service

  3. Avoid the temptation to become a “banner farm.” While some affiliates claim these work, most people will not stay long at an ugly site consisting of nothing but banners for contact lenses, satellite dishes, paid long distance cards. … Distance Cards

  4. In addition, when, finally, the troubled past erupts in violent murder, Adam finds himself at the centre of a web of deception, intrigue, and unexpected moral dilemmas. … Secure Remote Management Support Authenticated

  5. One of the better features #39&I; ve seen offered with web hosting is the ability for you to create your own FTP accounts. … Web Hosting

  6. Root access gives you total control over all aspects of your dedicated server including the security and maintenance of your server. … Ecommerce Hosting

Leave a Reply

LogoAlexa CounterFeedBurner Counter