Discussion:
DHCP timeout
(too old to reply)
_ale_
2008-06-17 09:32:16 UTC
Permalink
Hi,
I'm running an application on a XP machine. I cannot set a static ip address
'cause other identical machines are present on the same lan and this can
cause an ip conflict. So I set the machine with dhcp client although there's
no a dhcp server on the lan. This causes that, at startup, the system
remains blocked and no one application starts until the dhcp timeout is
reached (about 90-100 sec) after that the lan comes up with an apipa ip
address (169.254.x.y) and my application can start.
I'd like to know if there's the possibility to reduce the wait for a dhcp
server in a manner that the system and my application can start quickly.
Thanks in advance.

Ale
Geoff
2008-06-17 12:46:49 UTC
Permalink
Post by _ale_
Hi,
I'm running an application on a XP machine. I cannot set a static ip address
'cause other identical machines are present on the same lan and this can
cause an ip conflict. So I set the machine with dhcp client although there's
no a dhcp server on the lan. This causes that, at startup, the system
remains blocked and no one application starts until the dhcp timeout is
reached (about 90-100 sec) after that the lan comes up with an apipa ip
address (169.254.x.y) and my application can start.
I'd like to know if there's the possibility to reduce the wait for a dhcp
server in a manner that the system and my application can start quickly.
Thanks in advance.
Ale
It is an error to attempt to us DHCP where no DHCP server exists. You must
use static assignment in that case. The static address should be assigned
by the owner of the machine or the administrator of the LAN to avoid
conflict. Only then can your application use TCP/IP. Your application
cannot use TCP/IP until the stack is configured, as you have observed.

If TCP/IP internetworking is not needed, then install the MS Loopback
adapter and disable the real network card. Alternatively, it's a simple
matter of assigning a static address to the card and never connecting the
cable to an active network.

Another method might be to statically assign 127.0.0.2 to the network card
and 255.0.0.0 to the netmask and making 127.0.0.2 the default gateway. In
this case the packets will be routed internally and not emitted on the
wire. The 127.0.0.x addresses are all loopbacks.

You can also disable APIPA
http://support.microsoft.com/default.aspx/kb/244268/it/

http://support.microsoft.com/kb/220874

In all these cases, if the computer will be connected to a real LAN and
TCP/IP will be used for other purposes, your application should not make
any attempt to interfere with that configuration or process.
_ale_
2008-06-18 13:51:45 UTC
Permalink
Hi,
thank's for your reply.
The system is made by a number of machines connected each other on a lan via
switch. All these machines need to use the lan for communicating.
This machine, in particular, is an handless system running XP embedded. The
Operating System is installed from factory and no interventions (such as
set/change ip address) can be made on it after. The application, at startup,
sets an unique ip address for communicating with the other machines.
I chose to use DHCP for security purpose in the case of the application
doesn't start and the machine remains with 0.0.0.0 as ip address. In this
case I cannot access the machine by unique available intreface, the lan
cable. By DCHP, instead, after the wait for the timeout the ip address
169.254.x.y is set and I can access the machine.
The problem is the waiting for the DHCP timeout that, in this case, could be
reduced or totally removed so that the OS immediately set a lan interface
with APIPA address and the application could run.
Thank's again,

Ale
Post by Geoff
Post by _ale_
Hi,
I'm running an application on a XP machine. I cannot set a static ip address
'cause other identical machines are present on the same lan and this can
cause an ip conflict. So I set the machine with dhcp client although there's
no a dhcp server on the lan. This causes that, at startup, the system
remains blocked and no one application starts until the dhcp timeout is
reached (about 90-100 sec) after that the lan comes up with an apipa ip
address (169.254.x.y) and my application can start.
I'd like to know if there's the possibility to reduce the wait for a dhcp
server in a manner that the system and my application can start quickly.
Thanks in advance.
Ale
It is an error to attempt to us DHCP where no DHCP server exists. You must
use static assignment in that case. The static address should be assigned
by the owner of the machine or the administrator of the LAN to avoid
conflict. Only then can your application use TCP/IP. Your application
cannot use TCP/IP until the stack is configured, as you have observed.
If TCP/IP internetworking is not needed, then install the MS Loopback
adapter and disable the real network card. Alternatively, it's a simple
matter of assigning a static address to the card and never connecting the
cable to an active network.
Another method might be to statically assign 127.0.0.2 to the network card
and 255.0.0.0 to the netmask and making 127.0.0.2 the default gateway. In
this case the packets will be routed internally and not emitted on the
wire. The 127.0.0.x addresses are all loopbacks.
You can also disable APIPA
http://support.microsoft.com/default.aspx/kb/244268/it/
http://support.microsoft.com/kb/220874
In all these cases, if the computer will be connected to a real LAN and
TCP/IP will be used for other purposes, your application should not make
any attempt to interfere with that configuration or process.
Loading...