Question:
dhcp server?
1970-01-01 00:00:00 UTC
dhcp server?
Three answers:
forfree442000
2007-11-05 09:38:38 UTC
When a DHCP client is first switched on, it sends a broadcast packet on the network with a DHCP request. This is picked up by a DHCP server, which allocates an IP address to the PC, from one of the scopes (the pools of addresses) it has available.



Each DHCP scope is used for a different TCP/ IP network segment. On networks with routers that support DHCP, extra information is added to the request by the router to tell the server which network the request came from. The DHCP server uses this information to pick an address from the correct scope. The server replies to the client, allocating it the TCP/ IP address and settings required.



However, DHCP doesn’t allocate the address permanently. It tells the client that it has “leased” the address to it for a specific time period, which you as administrator can control. By default DHCP is installed with a three day lease period. When the lease expires, the client can ask the server to renew the lease. If the DHCP server doesn’t hear from the client beyond the expiry of the lease period, it will put that address back in the pool ready to be re- used.



When the DHCP client obtains a lease on an address, it knows how long the lease period is. So it knows that it can use the address without reference to the DHCP server until the lease expires. When it does expire, it can request a renewal. The implication of this is that changing DHCP settings on the server won’t instantly change all your DHCP client PCs, as they won’t find out about the changes until they ask the server to renew their lease. This is one factor you need to consider when you decide your lease period.
2007-11-05 09:36:29 UTC
you might wanna check with micro soft for this one..
HotRod
2007-11-05 09:37:28 UTC
The DHCP servers and DHCP clients communicate through a series of DHCP messages. To obtain a lease, the DHCP client initiates a conversation with a DHCP server using a series of these DHCP messages. You can watch the process with a network monitor.



DHCP Messages:

There are eight types of messages that can be sent between DHCP clients and servers.



DHCPDiscover - Broadcast by a DHCP client when it first attempts to connect to the network. The DHCPDiscover message requests IP address information from a DHCP server.



DHCPOffer - Broadcast by each DHCP server that receives the client DHCPDiscover message and has an IP address configuration to offer to the client. The DHCPOffer message contains an unleased IP address and additional TCP/IP configuration information, such as the subnet mask and default gateway. More than one DHCP server can respond with a DHCPOffer message. The client accepts the best offer, which for a Windows DHCP client is the first DHCPOffer message that it receives.



DHCPRequest - Broadcast by a DHCP client after it selects a DHCPOffer. The DHCPRequest message contains the IP address from the DHCPOffer that it selected. If the client is renewing or rebinding to a previous lease, this packet might be unicast directly to the server.



DHCPAck - Broadcast by a DHCP server to a DHCP client acknowledging the DHCPRequest message. At this time, the server also forwards any options. Upon receipt of the DHCPAck, the client can use the leased IP address to participate in the TCP/IP network and complete its system startup. This message is typically broadcast, because the DHCP client does not officially have an IP address that it can use at this point. If the DHCPAck is in response to a DHCPInform, then the message is unicast directly to the host that sent the DHCPInform message.



DHCPNack - Broadcast by a DHCP server to a DHCP client denying the client’s DHCPRequest message. This might occur if the requested address is incorrect because the client moved to a new subnet or because the DHCP client’s lease has expired and cannot be renewed.



DHCPDecline - Broadcast by a DHCP client to a DHCP server, informing the server that the offered IP address is declined because it appears to be in use by another computer.



DHCPRelease - Sent by a DHCP client to a DHCP server, relinquishing an IP address and canceling the remaining lease. This is unicast to the server that provided the lease.



DHCPInform - Sent from a DHCP client to a DHCP server, asking only for additional local configuration parameters; the client already has a configured IP address. This message type is also used by DHCP servers running Windows Server 2003 to detect unauthorized DHCP servers.



Here's the DHCP Lease Process:



A DHCP-enabled client obtains a lease for an IP address from a DHCP server. Before the lease expires, the DHCP client must renew the lease or obtain a new lease. Leases are retained in the DHCP server database for a period of time after expiration. By default, this period is four hours and cleanup occurs once an hour for a DHCP server running Windows Server 2003. This protects a client’s lease in case the client and server are in different time zones, the internal clocks of the client and server computers are not synchronized, or the client is off the network when the lease expires.



Obtaining a New Lease:



A DHCP client initiates a conversation with a DHCP server when it is seeking a new lease, renewing a lease, rebinding, or restarting. The DHCP conversation consists of a series of DHCP messages passed between the DHCP client and DHCP servers.

Here’s the DHCP process:



1. The DHCP client requests an IP address by broadcasting a DHCPDiscover message to the local subnet.



2. The client is offered an address when a DHCP server responds with a DHCPOffer message containing an IP address and configuration information for lease to the client. If no DHCP server responds to the client request, the client sends DHCPDiscover messages at intervals of 0, 4, 8, 16, and 32 seconds, plus a random interval of between -1 second and 1 second. If there is no response from a DHCP server after one minute, the client can proceed in one of two ways:



o If the client is using the Automatic Private IP Addressing (APIPA) alternate configuration, the client self-configures an IP address for its interface.

o If the client does not support alternate configuration, such as APIPA, or if IP auto-configuration has been disabled, the client network initialization fails.



In both cases, the client begins a new cycle of DHCPDiscover messages in the background every five minutes, using the same intervals as before (0, 4, 8, 16, and 32 seconds), until it receives a DHCPOffer message from a DHCP server.



3. The client indicates acceptance of the offer by selecting the offered address and broadcasting a DHCPRequest message in response.



4. The client is assigned the address and the DHCP server broadcasts a DHCPAck message in response, finalizing the terms of the lease.



When the client receives acknowledgment, it configures its TCP/IP properties by using the DHCP option information in the reply, and completes its initialization of TCP/IP.



In some rare cases, a DHCP server might return a negative acknowledgment to the client. This can happen if a client requests an invalid or duplicate address. If a client receives a negative acknowledgment (DHCPNack), the client must begin the entire lease process again.



When the DHCP client and the DHCP server are on the same IP broadcast subnet, the DHCPDiscover, DHCPOffer, DHCPRequest, and DHCPAck messages are sent to identify clients by means of IP-level broadcasts sent to the limited broadcast address and the media access control (MAC) broadcast address.



When the DHCP server and DHCP client are not on the same subnet either a router or a host on the DHCP client’s subnet must act as a DHCP relay agent to support the forwarding of DHCP messages between the DHCP client and the DHCP server.

Here’s what happens when it’s time to Renew a Lease:

The DHCP client first attempts to renew its lease when 50 percent of the original lease time, known as T1, has passed. At this point the DHCP client sends a unicast DHCPRequest message to the DHCP server that originally granted its lease. If the server is available, and the lease is still available, the server responds with a unicast DHCPAck message and the lease is renewed.

If the original DHCP server is available, but the client’s current lease is no longer available, the DHCP server responds with a DHCPNack message, and the client immediately starts the process to obtain a new lease. This can happen if the client has changed subnets or if the DHCP server cannot fulfill the lease request for some other reason.



If there is no response from the DHCP server, the client waits until 87.5 percent of the lease time has passed (known as T2). At T2, the client enters the rebinding state, and broadcasts a DHCPRequest message to attempt to renew the lease from any available DHCP server. If no DHCP server is available by the time the lease expires, the client immediately unbinds itself from the existing lease and starts the process to obtain a new lease, beginning with a DHCPDiscover message.



Hope this helps.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...