Jump to content

Microsofts APIPA


bimini07
 Share

Recommended Posts

Hi Gurus,

Whenever a DHCP client can't get an IP address from a DHCP server it resolves to a 169.XXX.XXX.XXX ip address. Is it possible to write a script that detects the current ip address assigned, and if it is an APIPA ip.. then it issues an ipconfig /renew and if not then it exits. Can this also be set on a timer or as a service so every 30 secs or so the script autoruns?

How would I go about doing this? Using netsh to get current stats? But how would I go about scripting on the basis of the first octet being 169 or not?

I guess I am looking for some direction here....

Thanks,

Link to comment
Share on other sites

So you know, APIPA continues to search for a DHCP server every five minutes after it begins using it's auto-configured IP. You don't need this script unless that five minute interval is too large, and I'm sure you could use a registry setting to modify it if you wanted.

Yes... 5 Minutes is kinda too long in our environment. These systems need to have an above 99% uptime. We have a realtime monitor that tells us that such and such machine is not connected. Since it does not lease the IP address from the DHCP server... we can't get in. I would love to know the registry setting that I can tweak to achieve the same results.

I have searched on increasing the dhcp renew timeout value with no success.

Thanks,

Link to comment
Share on other sites

Yes... 5 Minutes is kinda too long in our environment. These systems need to have an above 99% uptime. We have a realtime monitor that tells us that such and such machine is not connected. Since it does not lease the IP address from the DHCP server... we can't get in. I would love to know the registry setting that I can tweak to achieve the same results.

I have searched on increasing the dhcp renew timeout value with no success.

Thanks,

So the question is, if these systems are critical, why are they using dynamic IPs? If one's a server version of Windows, set a static IP and install DHCP on it.

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

http://support.microsoft.com/kb/220874/en-us

Edited by c0deWorm

My UDFs: ExitCodes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...