Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, February 9, 2011 11:20 PM
Hi all,
I was simulating an outage of a DC to a collegue and I came across some unexpected DHCP behaviour.
The lab is setup as follows:
AD SiteA: Servername ADC01 (W2K8R2) - AD, DNS DHCP for SiteA
AD SiteB: Servername ADC02 (W2K8R2) - AD, DNS DHCP for SiteB
The server ADC02 was disconnected from the network (to simulate DC outage). Clients in SiteB logoff/logon and continue working as expected by using ADC01 for DNS and AD authentication = CORRECT BEHAVIOUR .
However when a Client in SiteB is rebooted, it does not hold onto the DHCP address that it had prior to ADC02 being disconnected from the network.
Why is this happening? The clients IP address lease is 8days, so the loss of ADC02 should not cause the client (WinXP btw) to lose it's leased IP address?
Any ideas?
All replies (17)
Tuesday, February 15, 2011 7:12 AM ✅Answered
Hi All,
I have consulted with some of my colleagues and the conclusion is :
“If the DHCP Server is unreachable and the DHCP Client machine goes in the Rebinding State, it will not lose the IP till the lease expires; however, if we reboot the client machine or disable and enable the NIC it will lose the IP and goes in a discover stage.”
In this case it seems to be an expected behavior of Microsoft Windows XP client machine.
Thanks.
Tiger Li
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected]
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Tuesday, February 15, 2011 9:56 AM ✅Answered
Hi All,
I'd also like to share an article which discuss a way to solve this issue:
Windows Vista does not keep its DHCP IP address if a DHCP server is not available
http://support.microsoft.com/kb/958336
Hope it will be helpful
Tiger Li
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Tuesday, February 15, 2011 4:32 PM ✅Answered
Yes, thank you Tiger!
I tried to summarize this thread for anyone that happens to search and need info on this behavior:
==================================================================
DHCP Client Restart
with a Windows Vista and older DHCP client upon a restart, and I assume Windows 2008 DHCP clients are included, if the DHCP Server service is not available, the client will not maintain its previous lease prior to the restart. With
Windows 7 DHCP clients, and I assume Windows 2008 R2, it will attempt to keep the lease using a process to ping the gateway to see if it is still on the same network as it was prior to the restart.
It appears with Windows 7 & 2008 R2 (and I'm assuming 2008 R2), are different with the gateway ping process on reboot of a DHCP client. I guess that was one of the new features added with the NLA (Network Location Awareness)
feature. I’m finding new things on this everyday!
More info and specifics:
DHCP Sequences:
New Request: DORA - Discover, Offer, Request, Ack
Renewal: RA - Request & Ack
===
Restarting a Windows Vista, XP, 2003 and previous DHCP client:
"If the DHCP Server is unreachable and the DHCP Client machine goes in the Rebinding State, it will not lose the IP till the lease expires; however, if we reboot the client machine or disable and enable the NIC it will lose the IP and goes in a discover stage.”
Related links for Windows Vista, 2008, XP, 2003 and older:
“If the DHCP Server is unreachable and the DHCP Client machine goes in the Rebinding State, it will not lose the IP till the lease expires; however, if we reboot the client machine or disable and enable the NIC it will lose the IP and goes in a discover stage.”
Windows Vista does not keep its DHCP IP address if a DHCP server is not available
http://support.microsoft.com/kb/958336
===
Restarting a Windows 7 or 2008 R2 DHCP client:
If the client had a current lease prior to the restart, upon restart, it will attempt the RA sequence. If a DHCP server doesn't respond with an ACK, it then attempts to ping the gateway address from it's previous configuration to see if the IP config it previously had is on the same network.
If the gateway responds, it will keep it's current lease for the remainder of the lease and continues on with the 50% and the 87.5% rule of the RA sequence.
If the gateway doesn't respond, the RA sequence kicks in, it releases its current configuration, and starts a fresh DORA sequence,
Related links for Windows 7 & 2008 R2:
DHCP Client States in the Lease Process (Vista, 7, 2008 & 2008 R2 and newer): Good link with a process flowchart.
http://technet.microsoft.com/en-us/library/cc958935.aspx
Restarting a DHCP Client http://technet.microsoft.com/en-us/library/cc958945.aspx
==================================================================
Ace
Ace Fekay
MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
This posting is provided AS-IS with no warranties or guarantees and confers no rights.
Wednesday, February 9, 2011 11:47 PM
Seems to me like a problem with specific machine, you can try to reset TCP/IP stack using following commands on XP machine
Reset WINSOCK: netsh winsock reset
Reset TCP/IP stack: netsh int ip reset
With kind regards
Krystian Zieja
http://www.projectnenvision.com
Follow me on twitter
My Blog
Thursday, February 10, 2011 6:30 AM
Hi,
Thanks for posting here.
According your description that I this the situation you are enouncing new is normal .
Because according DHCP leasing process ,client will broadcasts a DHCPRequest message instead of a DHCPDiscover message after it restarted, however DHCP server in that site is disconnected , this mean client will never acquire a respond form server to continue leasing process.
Please refer to the articles below to get a better understanding :
Restarting a DHCP Client
http://technet.microsoft.com/en-us/library/cc958945.aspx
DHCP Client States in the Lease Process
http://technet.microsoft.com/en-us/library/cc958935.aspx
I’d suggest you may consider deploying DHCP relay (if both sites in different IP segments)and setting delay in this scenario , so that the DHCP server where in SiteA will take over the DHCP service for SiteB when SiteB DHCP server down .And also this is a good way to implement DHCP failover:
DHCP Relay Agent
http://technet.microsoft.com/en-us/library/cc783103(WS.10).aspx
DHCP Step-by-Step Guide: Demonstrate DHCP Split Scope with Delay on a Secondary Server in a Test Lab
http://technet.microsoft.com/en-us/library/ee405264(WS.10).aspx
Finally , we’d not suggest setting DHCP service and domain controller on same physical server if in production environment.
Thanks.
Tiger Li
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected]
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Thursday, February 10, 2011 10:04 AM
Hello - thanks for the replies.
In your first article it states:
"If the client fails to locate a DHCP server during the renewal process, it attempts to ping the default gateway listed in the current lease, with the following results:
If a ping of the default gateway succeeds, the DHCP client assumes it is still located on the same network where it obtained its current lease, and the client continues to use the current lease. By default, the client attempts, in the background, to renew its current lease when 50 percent of its assigned lease time has expired.
If a ping of the default gateway fails, the DHCP client assumes that it has been moved to a different network, where DHCP services are not available (such as a home network). By default, the client auto-configures its IP address as described previously, and continues (every five minutes in the background) trying to locate a DHCP server and obtain a lease."
In my case, the first scenario should be happening - i.e. the gateway IP address is available and should be pingable....therefore the client should keep using the IP address it has already leased?
Thursday, February 10, 2011 9:17 PM
Hi,
I believe what you have described is true for a DHCP renewal request while the client is running - i.e. that is what happens if you do not reboot the client.
With a reboot the client performs a DHCP discover, gets no reply and uses APIPA.
Cheers
Paul
Friday, February 11, 2011 2:18 AM
I would have thought that too, Paul, but it contradicts what the Technet article indicates (quoted by GeekierThanYou).
I would suggest for GeekierThanYou to do some captures on SiteB with two different workstations and see if they are actually trying to ping the gateway upon a restart.
If this behavior is not happening at SiteA, which after re-reading the original post it wasn't indicated if it's also occuring wtih a rebooted workstation at SiteA, I would look at the workstation if there are any issues, as Krystian mentioned, as well as try it with a different workstation.
Ace
Ace Fekay
MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
This posting is provided AS-IS with no warranties or guarantees and confers no rights.
Friday, February 11, 2011 9:45 AM
Hi All,
I'm quite intrigued, (and apparently wrong!)
The following article states "If the IP address of the client was known (that is, the computer restarted and is trying to lease its previous address), the broadcast is looked at by all of the DHCP servers. The DHCP server that can lease the requested IP address responds with either a successful acknowledgment (DHCPAck) or an unsuccessful acknowledgment (DHCPNak). The DHCPNak message occurs when the IP address requested is not available or the client has been physically moved to a different subnet that requires a different IP address. After receiving a DHCPNak message, the client returns to the Initializing state and begins the lease process again."
DHCP Client States in the Lease Process
http://technet.microsoft.com/en-us/library/cc958935.aspx
This is the behavior GeekierThanYou is expecting but not receiving - I'd be interested to know the outcome of a network capture!
Cheers
Paul
Friday, February 11, 2011 3:31 PM
To summarize DHCP what normally happens:
- New Request: DORA - Discover, Offer, Request, Ack
- Renewal: RA - Request & Ack
Based on that article, upon a restart, and the client had a current lease, we should be seeing the RA portion, but if no DHCP server doesn't respond to get the Ack, it pings the gate. If the gate responds, it keeps it for the remainder of the lease and continues on with teh 50% and the 87.5% rule. If the gate doesn't respond, it releases it and starts fresh.
So besides a capture, which would be nice, maybe pings are disabled on the gateway (firewall or router)?
Ace
Ace Fekay
MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
This posting is provided AS-IS with no warranties or guarantees and confers no rights.
Monday, February 14, 2011 2:18 AM
Hi GeekierThanYou,
Hi,
If there is any update on this issue, please feel free to let us know.
We are looking forward to your reply.
Thanks.
Tiger Li
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected]
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Monday, February 14, 2011 2:46 AM
Hi guys,
Sorry for the late reply.
HEre is the further testing I have done.
#1) As suggested, I exapnded my test group to include 2 workstations from SiteB - the original XPSP3 workstation and a new Windows 7 Ent workstation
#2) I ran the same test as before....
- ADC02 was disconnected from the network.
- Both XP and W7 workstations can ping the gateway fine (as expected.
- Both XP and W7 workstations have DHCP leases that expire on 23rd Feb and 22nd Feb repectively
- Both XP and W7 workstationswere restarted.
- Result: The XP workstation has lost it's leased IP address, however the W7 workstation retained the IP address as expected.
I have not done any further troubleshooting unfortunately - but happy to carry out any other suggestions.
IS this behaviour typical of XP workstations? I have a feeling it isn't as previously even XP workstation retained their leased IP address following a reboot.
Thanks everyone for your help!
Monday, February 14, 2011 3:41 AM
So it's only on Windows XP. At least that narrows it down.
It may well be that XP loses its lease upon restart. If I remember correctly in the past, if a machine reboots and no DHCP server is available, it won't get a lease, nor will it keep it's old one prior to reboot even if within the lease period. I may have remembered it wrong, too.
If my memory does serve correct, then maybe the article is referring to Vista and newer operating systems? I couldn't find anything specific regarding this.
I posted this to a private mail list to see if anyone is familiar with this. Maybe hopefully Tiger can find more info on his end, as well? (Thanks, Tiger!)
Ace
Ace Fekay
MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
This posting is provided AS-IS with no warranties or guarantees and confers no rights.
Tuesday, February 15, 2011 7:39 AM
Thanks for looking into that, Tiger!
Cheers!
Ace
Ace Fekay
MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
This posting is provided AS-IS with no warranties or guarantees and confers no rights.
Tuesday, February 15, 2011 10:54 AM
Thanks Tiger - Good to know!
Cheers
Paul
Wednesday, February 16, 2011 1:51 AM
Hi GeekierThanYou,
Please feel free to let us know if the information was helpful to you.
Thanks,
Tiger Li
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected]
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Friday, June 24, 2011 7:38 AM
Hi everybody,
while simulating an adsl connection outage we ran into the same issue today.
In our case we noticed that Windows 7 Enterprise SP1 doesn't keep the previously leased DHCP address also.
Applying the "dontpinggateway" fix to the Windows 7 machine did resolve the issue though.
Cheers