1

I have several Windows 7 machines on a small network in our testing lab. There is a DHCP server in our environment. All the client machines have obtained valid DCHP IP addresses.

When a machine is rebooted, I have noticed that upon startup, the network interface has a 169.x IP address for a period of time (maybe 10-15 seconds after the adapter comes up) before it gets a valid address again.

Is there a mechanism (maybe in the registry) to prevent one of these automatic IP addresses from being assigned?

1
  • Most of the timme in windows 8/8.1 this is due to ip conflict. It will silently switch to APIPA without giving you any messages just like in previous windows versions.. You have to resolve conflict manually by assigning a free ip address in the pool and see the all workarounds windowstechinfo.com/2013/07/…
    – Aravinda
    May 26, 2015 at 7:03

3 Answers 3

4

You aren't experiencing an error or failure. The IP address assigned to the interface is because of automatic private IP addressing (APIPA). It's used because the DHCP process did not receive a valid usable IP address.

Microsoft offers guidance on automatic IP addressing without DHCP:

How to use automatic TCP/IP addressing without a DHCP server

And from a related bulletin (using APIPA on multiple adapters/routing not working):

Disable APIPA on the Entire Computer

Use Registry Editor to create the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Add the following value to this key:

Value name: IPAutoconfigurationEnabled Value type: REG_DWORD Value in hexadecimal: 0 (A value of 0 disables APIPA support on this computer)

NOTE: If the IPAutoconfigurationEnabled entry is not present, a default value of 1 is assumed, which indicates that APIPA is enabled.

After you make this change, restart your computer.

Disable APIPA on All but One Network Adapter

Use Registry Editor to create the following registry key, where adapter name is the name of the Dynamic Host Configuration Protocol (DHCP) configured adapter where you want to disable APIPA:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\Interfaces\adapter name

Add the following value to this key:

Value name: IPAutoconfigurationEnabled Value type: REG_DWORD Value in hexadecimal: 0 (A value of 0 disables APIPA support on this adapter)

NOTE: If the IPAutoconfigurationEnabled entry is not present, a default value of 1 is assumed, which indicates that APIPA is enabled.

After you make this change, restart your computer.

4
  • This did disable the APIPA, great! Unfortunately on startup, I now get no IP at all for the 10-15 seconds rather than an automatic IP. Why am I losing my IP for a period of time at startup? Oct 2, 2012 at 18:06
  • @user1073928 You're not "losing" the IP, the system doesn't have one at all until it gets a response from the DHCP server. When the system starts up, it's taking 10-15 seconds for the windows system to receive a DHCP response from your DHCP server. Oct 2, 2012 at 18:34
  • check the switches in your lab. make sure spanning-tree is set to portfast
    – BroScience
    Oct 2, 2012 at 20:49
  • IPAutoconfigurationEnabled for the whole PC scope no longer appears to have any effect, at least in my experiments with Windows Server 2016.
    – Sander
    Jun 13, 2017 at 11:55
1

My experience with this is:

  1. Ran out of IP addresses. DHCP server has issued them all out and has no more available.
  2. Default gateway settings being sent out by router is missing, wrong, etc... Basically the clients cannot find the default gateway which means it cannot access the DHCP server.

When someone tells you to assign static you must manually put the gateway and mask in, so then it all of the sudden works. Also, if another client on the network is using that IP address from the DHCP and you set yours to static with the same IP address you will sometimes boot that client's dhcp lease, yours will work and theirs will go down.

If this is the case, check your default gateway broadcast settings on your router. I have had mine set to 0.0.0.0 when I made a change to the DHCP scope. Didn't realize it, so the router was telling all clients that were connecting that their gateway was 0.0.0.0

We have 57 computers on our network and about 100 devices. we have reached the limits of our 255.255.255.0 mask. I saw some weird stuff happen with PCs when IP address start running out and especially when the gateway is being broadcast as 0.0.0.0. I even had a few computers blue screen trying to connect to network.

0

yes you can disable APIPA on windows.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

create D-Word IPAutoconfigurationEnabled should be 0 for disabled 1 for enabled.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.