DHCP Polling Time

  • Thread starter Thread starter Steve Lin
  • Start date Start date
S

Steve Lin

When configured to use DHCP, and there's no DHCP server available at
boot time, my XPe devices uses APIPA to obtain their IP addresses, and
continue to search for a DHCP server.

The issue is that they seem to check for a DHCP server only every 5-6
minutes. So if the DHCP server suddenly appears on the network, some
of the XPe devices will pick up their new addresses right away (if
they were just about to poll for DHCP when the server appeared) and
others will not pick up their new address for 6 minutes (if they had
polled just prior to the server becoming available).

Is there any way (registry setting, etc.) to force the XPe box to
check for DHCP server more frequently, like every 15 seconds, rather
than once every 5 or 6 minutes?

Thanks,
Steve Lin
 
Steve,
You might try using a script that updates DHCP every X number of seconds.
Maybe something like this:
* this runs for just a couple of iterations at 1 second intervals

dim i
Do While ( i < 7)
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where DHCPEnabled =
True")
For each objNetAdapter in colNetAdapters
errRenew = objNetAdapter.RenewDHCPLease
If errRenew = 0 Then
Wscript.Echo "DHCP lease renewed."
Else
Wscript.Echo "DHCP lease could not be renewed."
End If
Next
Wscript.Sleep 1000
i= i + 1
loop

Obviously do the same thing with an application program.

Regards,

Sean Gahan
 
Back
Top