[Voyage-linux] Does the DHCP client ever retry?
Gustin Johnson
(spam-protected)
Sun Sep 6 02:32:01 HKT 2009
Tom Billiet wrote:
> Hi,
>
> I'm not very familiar with this either, but if I'm not mistaken all the
> scripts in /etc/network/if-up.d/ are executed if an interface comes up
> (cable being connected). So adding a script for dhcp should do the trick.
>
How I have dealt with this in the past is to have a script that tests
for network connectivity, if there is connectivity it does nothing, if
there test fails it bounced the interface (ifdown ethX && ifup ethX).
The function I use is dead simple to build in bash:
CheckNet ()
{
ping -c 1 $HOST >& /dev/null ; # Checking connectivity
}
You may want to use hping to specify the interface...
CheckNet ()
{
hping3 -I ethX -c 1 $HOST >& /dev/null ; # Checking connectivity
}
$HOST is something that I define and is a host that I know will be up.
Google works great for an ICMP echo request test.
The above goes into a script that is run by cron every 5 minutes or so.
Hope this helps,
__
G
> Regards,
> Tom
>
> Robert Rawlins - Think Blue wrote:
>> Yeah Jon this is something I'd be keen to understand as well. I have
>> clients
>> that get booted without a network connection and then when we need to
>> perform maintenance we connect it to the network however at present we
>> have
>> to reboot the system as the system doesn't attempt to lease an IP when
>> the
>> cable is connected.
>>
>> I'd be interested to get this working.
>>
>> Rob
>>
>> -----Original Message-----
>> From:
>> voyage-linux-bounces+robert.rawlins=thinkbluemedia.co.uk at list.voyage.hk
>> [mailto:voyage-linux-bounces+robert.rawlins=thinkbluemedia.co.uk at list.voyage
>>
>> .hk] On Behalf Of Jon Trauntvein
>> Sent: 04 September 2009 22:37
>> To: voyage
>> Subject: [Voyage-linux] Does the DHCP client ever retry?
>>
>> I have been testing the case where the computer boots without having a
>> valid network connection which is restored at some point afterward. I
>> have noticed in this case that, after several retries, the DHCP client
>> gives up while booting is taking place. This is expected. The
>> problem is that I don't see it ever attempt to reconfigure again. Is
>> there a way to make this happen?
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20090905/6e6ff46e/attachment.pgp>
More information about the Voyage-linux
mailing list