?
Solved

A computer loses its DHCP IP address if a DHCP server is not available

Posted on 2016-07-14
11
Medium Priority
?
479 Views
Last Modified: 2016-07-24
Hi,
I have a wide spread network, which has unreliable connections.

For management purposes, a centralised DHCP server is used.
This is to monitor the PCs that are on the network and to use a DHCP DENY method of controlling rogue devices.

When a remote PC is rebooted and the local gateway is unavailable, the DORA method in Windows means that the PC will look for a new lease regardless of how long the lease has left.

From a tech article i read:
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
,

Now the issue i have is that sometimes the gateway will not respond.
So the PC's restart the DORA process and get a 169.xxx address.
But i want the local subnet to continue to have the same IP, so they can print, access local resources etc.

I could setup an Alternate Configuration IP Address, but there is a few hundred machines that this could affect over multiple subnets, so that doesnt scale out.

An alternate solution Ive found is from a Microsoft Support Article (Article ID: 958336)

To resolve this issue, add a registry value to force the client to keep its DHCP IP address, even if a DHCP server is not available. To add this value, follow these steps:
1.Start Registry Editor. To do this, click Start, type regedit in the Start Search box, and then press Enter.
2.To activate the setting for all adapters, locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
(Windows Vista only) To activate this setting for a specific adapter, locate the adapter-specific registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<Adapter>
3.On the Edit menu, point to New, and then click DWORD Value.
4.Type DontPingGateway, and then press Enter.
5.On the Edit menu, click Modify.
6.In the Value data box, type 1, and then click OK.
7.Exit Registry Editor.
8.Restart the computer.
This procedure forces the client to keep its DHCP IP address even if a DHCP server is not available. If you use the Alternate Configuration tab to modify the IP address for an adapter, this IP address is assigned to the adapter.
Note In Windows 7, the new registry value is not obeyed if you try to set it for a specific adapter in the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<Adapter>


Which again will resolve the issue. But changing the registry manually doesnt scale out.

The solution is to use Group Policy to force the "DontPingGateway" registry key to all the remote PCs.

However, i cant see how i can get the ADAPTER setting which is a different GUID for each adapter.
Potentially, i would need to adjust both wired and wireless adapters.
The majority of PCs are Windows 10, but there are some Windows 7 machines as well.


So i would like to see how I can get a Group Policy to allow the addition of DontPingGateway=1 registry setting on all active network adapters.


I guess I also need to understand if this would have any other effects that I dont know about.
0
Comment
Question by:HBS-Mach
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 19

Expert Comment

by:Mal Osborne
ID: 41711737
Bit of as tangent I know, but you wouldn't have any switches with spanning tree protocol enabled by any chance? Standard STP blocks traffic for a while when a connected machine starts, often causing the problem you describe. Sometimes even if a DHCP server is up, clients fail to get a lease at boot time.

Try configuring RSTP or disabling it altogether.
0
 
LVL 1

Author Comment

by:HBS-Mach
ID: 41711746
Thanks Malmensa.
The issue is repeatable when we deliberately turn off the Gateway at the remote site and reboot a PC.
The PC then gets a 169.xxx address.
As soon as we turn the remote gateway back on, DHCP works as expected.
So I dont think STP is the problem.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Kane - TechSoEasy earned 1600 total points
ID: 41711760
You can add the registry key to apply to ALL Adapters if you instead create it on this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Then you won't have to know the specific interface.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 70

Assisted Solution

by:Qlemo
Qlemo earned 400 total points
ID: 41711781
... and as the cited text tells, the adapter-specific setting doesn't work anyway with W7 (and probably W10 either).
The setting might result in issues with WLAN on mobile devices changing their network location often. Something like the WLAN interface not detecting location changes properly, and keeping wrong IP addresses.
0
 
LVL 1

Author Comment

by:HBS-Mach
ID: 41716125
@Jeffery,
Thanks, I will give this a go.
Its been the weekend, so will have to wait until people come into the remote office.
0
 
LVL 1

Author Comment

by:HBS-Mach
ID: 41720012
The addition of the registry key has worked for all adapters when using the key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
The PCs in question keep their IP Address.

However the NAS Box (a Netgear Ready NAS Duo RND2000) immediately drops off the network and is unaccessible when the gateway device is offline.
0
 
LVL 70

Expert Comment

by:Qlemo
ID: 41720311
The NetGear NAS is a different cup of tea, because it (probably) runs a Linux. But it sounds very strange that the NAS should loose its IP, unless it is rebooted each day.
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 41721967
Maybe you are looking at correcting this issue the wrong way.  What are you using for your DHCP Server, and why does the local gateway keep going offline?
0
 
LVL 1

Author Comment

by:HBS-Mach
ID: 41722041
We are using a central windows DHCP server.
The local gateway relays the DHCP requests to it.
The gateway goes offline due to power issues (its run via a Generator) as well as the wifi radio link from one site (where the PC and NAS box is) to the other locally (where the gateway is) sometimes fails.

The Netgear NAS has a DHCP address, with a reservation.
We dont know its username/password and its been changed from default.

The Lease duration is set to 16 days, so the NAS box shouldnt need to renew its IP for 8 days.
I dont believe that the NAS box is being turned off.
0
 
LVL 74

Assisted Solution

by:Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy earned 1600 total points
ID: 41724244
If your gateway device goes offline, then everything will be inaccessible on your network.  That's the nature of what a Gateway does.

If you can't access the NAS to change it to a static IP, then you should follow this article to to reset the Admin password to get access:
http://kb.netgear.com/app/answers/detail/a_id/22784/~/how-do-i-recover-a-lost-administrator-password-on-my-readynas-os-6-storage
0
 
LVL 1

Author Closing Comment

by:HBS-Mach
ID: 41726848
Thanks for the help.
The Registry setting allows the PCs to ensure that dont try to get a new IP everytime they boot.
The Netgear password issue will need to be resolved via the OS Re-Install method of password recovery.
Although it says you wont lose data, I will be ensuring there is a good backup beforehand!
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question