DHCP client lease

5 pts.
Tags:
DHCP
Subnet
What would happen to a laptop with a lease duration of 8 days, if it was taken from its original network and placed on another subnet on day 3?

Answer Wiki

Thanks. We'll let you know when a new response is added.

It really depends on the dhcpd config of the network you’re connecting to.

In our environment, we lock down our dhcp setup so that authorized machines have their MACs mapped to static IPs in various subnets, which are defined per functional group, while unauthorized machines that plug into a physical port are assigned an address out of a general pool that is locked down by our firewall to essentially be Internet only.

If I’m interpreting your question correctly, will your laptop get another address, then answer should be yes, as soon as a physical network connection is sensed, the NIC in your laptop should do a dhcp request broadcast out to the local subnet and wait for a response. From there (assuming the local dhcpd or equivalent is accepting requests) the negotiation for a new lease should commence.

I’ll admit that my dhcp is a little rusty; if you want a definitive and thorough answer, I recommend you slog through RFC1541 (http://www.rfc-editor.org/rfc/rfc1541.txt).

Cheers

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BlankReg
    I think you are right Sonotsky, the PC should get a new IP address. It does not 'remember' this it should always start the DHCP process when it has been disconnected, and re-connected to a network as it doesn't know where it is ! If it was connected back to the original subnet, the server would issue the same IP address, as it is within the lease time, but on a different subnet, it gets a new IP which is correct for the new subnet.
    12,325 pointsBadges:
    report
  • Robert Stewart
    Yes you should recieve a new ip, unless both the original network and the subnet are getting their dhcp leases from the same dhcp server, which then you could possibly recieve the same ip depending on how your dhcp config is setup.
    1,810 pointsBadges:
    report
  • Robert Stewart
    Just clarification you will get new ip when moving to new subnet, otherwise it would not be a subnet, correct??
    1,810 pointsBadges:
    report
  • BlankReg
    Correct - the dhcp request is 'tagged' by the router if it comes from a different subnet, so the DHCP server knows what range to use for the allocated address, or it 'sees' it come directly then it knows to allocate from the same range as itself. Only if you went back onthe original subnet, would you get your original address allocated a second time, and only if you were within the 8 days. IMHO - DHCP leases should very rarely need to be more than a working day. The overhead on the network and the server is very small, so expiring the lease and re-issueing an IP address more often is not really a problem. I usually stick to leases of around 4 to 10 hours. On a high turnover network it can be as short as 30 minutes to an hour. The main issue if it is much longer, is that you can run out of pool addreses if there is a high turnover of systems attaching to the network, a shorter lease means that addresses are released more frequently.
    12,325 pointsBadges:
    report
  • Snapper70
    The only argument for a longer lease is normally to cover an outage of your DHCP server. If it goes down for some reason, and is down for 24 hours, then clients with 8-hour leases will not have an address at the end of that period. Note the way Microsoft DHCP works - the client goes through multiple stages: 1. When connected, or when rebooting, request a new lease. Typically the server will assign the same one, unless it had expired. 2. When the lease reaches 50%, the client attempts to renew the lease. So on an 8-hour lease, that will happen every 4 hours. If it can, server and client reset their counters, and the lease is valid for another 8 hours. 3. If the server is unavailable, client will continue using the lease it had. 4. IF the lease reaches something like 90%, the client will then "aggressively" look for ANY DHCP server to get a lease from, not necessarily the one it used before. "the end is coming" 5. At lease expiry, it must relinquish the IP address, and will resort to 0.0.0.0. An XP (or presumably Vista) client will then resort to the Microsoft generated IP address in the range of 169.254.x.x;, and periodically try to get a valid lease. I believe if you reboot a PC or disconnect/reconnect, the PC can't just assume it can use the address it had previously. To see this, unplug your PC and just connect it to an old hub. It has a link and will fail to renew it's lease, and within a minute will have an address of 169.254.x.x.
    920 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following