Networking Forums

Networking Forums > Computer Networking > Linux Networking > timeout eth0 on disconnected laptop fedora core2

Reply
Thread Tools Display Modes

timeout eth0 on disconnected laptop fedora core2

 
 
Gary Smith
Guest
Posts: n/a

 
      08-24-2004, 04:48 PM
Hello,

I just upgraded my laptop to FC2 and noticed one major difference from
RH9.0. When I'm on the road booting it up FC2 waits about 60-90
seconds while initializing eth0 before it times out. I think it was
more like 15 seconds on RH9. Is there a way to change the timeout
value when detecting that there is no network? For that matter, is
there a way to tell it not to even try if there is no network cable
installed? I'm sure it's timing out looking for a DHCP server which
it shouldn't be because there's no cable.

TIA

Gary
 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      08-24-2004, 05:23 PM
On 24 Aug 2004 09:48:41 -0700, Gary Smith wrote:
> Hello,
>
> I just upgraded my laptop to FC2 and noticed one major difference from
> RH9.0. When I'm on the road booting it up FC2 waits about 60-90
> seconds while initializing eth0 before it times out. I think it was
> more like 15 seconds on RH9. Is there a way to change the timeout
> value when detecting that there is no network? For that matter, is
> there a way to tell it not to even try if there is no network cable
> installed? I'm sure it's timing out looking for a DHCP server which
> it shouldn't be because there's no cable.


You can control that boot sequence with the contents of
/etc/sysconfig/network-scripts/ifcfg-eth0

You could create a scipt to run mii-tool to test the link
and copy in a /etc/sysconfig/network-scripts/ifcfg-eth0 with
ONBOOT=yes or no depending on what you get from mii-tool

If you look at /etc/rc.d/init.d/network you will see a line like
# chkconfig: 2345 10 90
which says to bring up network with S10network for runlevels 2,3,4,5.
You would create a script, say ck_network which would be called before
S10network.

If your run the install procesure below correctly, and do a
ls -1 /etc/rc.d/rc3.d/S*network*
you would see something like
/etc/rc.d/rc3.d/S10ck_network
/etc/rc.d/rc3.d/S10network
which indicates it will run before network.


Quick untested kludge follows and if you need script knowledge
http://www.tldp.org/LDP/abs/html/index.html

-----8<-----8<-----8<- ck_network script cut below this line 8<-----8<-----8<
#! /bin/bash
#
# ck_network check networking eth0
#
# chkconfig: 2345 10 90
#
# Install procedure:
# cp ck_network /etc/rc.d/init.d/
# chmod +x /etc/rc.d/init.d/ck_network
# chkconfig --add ck_network
#
#

set $(mii-tool eth0)

if [ "$7" = ok" ] ; then
cp /some/dir/onboot_yes /etc/sysconfig/network-scripts/ifcfg-eth0
else
cp /some/dir/onboot_no /etc/sysconfig/network-scripts/ifcfg-eth0
fi

exit 0

#********** end ck_network ********************************
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      08-24-2004, 11:35 PM
(E-Mail Removed) (Gary Smith) wrote in message news:<(E-Mail Removed). com>...
> Hello,
>
> I just upgraded my laptop to FC2 and noticed one major difference from
> RH9.0. When I'm on the road booting it up FC2 waits about 60-90
> seconds while initializing eth0 before it times out. I think it was
> more like 15 seconds on RH9. Is there a way to change the timeout
> value when detecting that there is no network? For that matter, is
> there a way to tell it not to even try if there is no network cable
> installed? I'm sure it's timing out looking for a DHCP server which
> it shouldn't be because there's no cable.
>
> TIA
>
> Gary


$ man dhclient.conf

The following statements can be used to adjust the timing
behaviour of
the DHCP client if required, however:

The timeout statement

timeout time ;

The timeout statement determines the amount of time that
must pass
between the time that the client begins to try to determine its
address
and the time that it decides that it?s not going to be able to
contact
a server. By default, this timeout is sixty seconds.

Your timeout may be longer in your dhclient conf.

Alternatively, if you need to connect "on the move" you may want to
check out ifplud:
http://www.stud.uni-hamburg.de/users...jects/ifplugd/

hth,
prg
email above disabled
 
Reply With Quote
 
Gary Smith
Guest
Posts: n/a

 
      08-25-2004, 05:26 PM
I set the timeout and reboot to low values of 10 seconds each. It
seems to be working better now giving me a net 26 seconds delay on
startup. I haven't had a chance to test the other suggestion that was
offered (to completely disble eth0 if there is no cable attached).

I think DHCP/RH is missing the link between no cable connection equals
no valid IP... Anyways, thanks for the feedback.

>
> $ man dhclient.conf
>
> The following statements can be used to adjust the timing
> behaviour of
> the DHCP client if required, however:
>
> The timeout statement
>
> timeout time ;
>
> The timeout statement determines the amount of time that
> must pass
> between the time that the client begins to try to determine its
> address
> and the time that it decides that it?s not going to be able to
> contact
> a server. By default, this timeout is sixty seconds.
>
> Your timeout may be longer in your dhclient conf.
>
> Alternatively, if you need to connect "on the move" you may want to
> check out ifplud:
> http://www.stud.uni-hamburg.de/users...jects/ifplugd/
>
> hth,
> prg
> email above disabled

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      08-25-2004, 06:57 PM
Gary Smith wrote:
> I set the timeout and reboot to low values of 10 seconds each. It
> seems to be working better now giving me a net 26 seconds delay on
> startup. I haven't had a chance to test the other suggestion that was
> offered (to completely disble eth0 if there is no cable attached).
>
> I think DHCP/RH is missing the link between no cable connection equals
> no valid IP... Anyways, thanks for the feedback.
>
>
>>$ man dhclient.conf
>>
>> The following statements can be used to adjust the timing
>>behaviour of
>> the DHCP client if required, however:
>>
>> The timeout statement
>>
>> timeout time ;
>>
>> The timeout statement determines the amount of time that
>>must pass
>> between the time that the client begins to try to determine its
>>address
>> and the time that it decides that it?s not going to be able to
>>contact
>> a server. By default, this timeout is sixty seconds.
>>
>>Your timeout may be longer in your dhclient conf.
>>
>>Alternatively, if you need to connect "on the move" you may want to
>>check out ifplud:
>>http://www.stud.uni-hamburg.de/users...jects/ifplugd/
>>
>>hth,
>>prg
>>email above disabled


Maybe the solution to your original problem is the interface
plug-in daemon, ifplugd.

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      08-25-2004, 11:28 PM
(E-Mail Removed) (Gary Smith) wrote in message news:<(E-Mail Removed). com>...
> I set the timeout and reboot to low values of 10 seconds each. It
> seems to be working better now giving me a net 26 seconds delay on
> startup. I haven't had a chance to test the other suggestion that was
> offered (to completely disble eth0 if there is no cable attached).
>
> I think DHCP/RH is missing the link between no cable connection equals
> no valid IP... Anyways, thanks for the feedback.
>

[snip]

Actually, they don't test for "link state" at all -- the time outs are
strictly protocol response time oriented.

The nice thing about ifplugd (sic -- sp!) is that it _does_ test link
state before OK'ing proceeding to the dhcp (or static) request stage.
That means that _before_ going out on the wire, a viable _physical_
connection is confirmed -- just what traveling laptops need ;-)

Mandrake includes it in their ifup scripts by default, afaik. That's
another nice thing -- if the bozo does finally plug me in, I take note
and continue with ifup. If I give up waiting for a patch cord, the
interface is down, the clown can plug up and issue ifup manually and
life goes on. All this is configurable in a pretty straight forward
way.

It's worth a look ...

regards,
prg
email above disabled
 
Reply With Quote
 
Gary Smith
Guest
Posts: n/a

 
      08-26-2004, 12:46 AM
I downloaded, compiled and installed ifplugd but I didn't see any
noticable effect. The problem is that ifplugd depends on the network
in order for it's own startup (as per its own init.d script).
Anyways, it's the network startup that hanging.

I think I'll just tweak the network script accordingly.

I do see how ifplugd would help for plugging and unplugging of the
laptop (which I tested out) but it doesn't help on the primary
problem.

Thanks for the link to this anyways.

Gary

> Maybe the solution to your original problem is the interface
> plug-in daemon, ifplugd.
>
> Tauno Voipio
> tauno voipio (at) iki fi

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      08-26-2004, 01:50 PM
Gary Smith wrote:
> I downloaded, compiled and installed ifplugd but I didn't see any
> noticable effect. The problem is that ifplugd depends on the network
> in order for it's own startup (as per its own init.d script).
> Anyways, it's the network startup that hanging.
>
> I think I'll just tweak the network script accordingly.
>
> I do see how ifplugd would help for plugging and unplugging of the
> laptop (which I tested out) but it doesn't help on the primary
> problem.
>
> Thanks for the link to this anyways.
>


You have to disable the automatic start-up of the Ethernet
interface from /etc/init.d scripts. In Debian setup it means
to drop the stanza

auto eth0

from /etc/network/interfaces.

The idea is to let ifplugd to start the interface when the
net is really plugged in.

HTH

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Default Wired eth0 Config on Fedora 13 Bit Twister Linux Networking 0 10-13-2010 09:44 AM
eth0 initialisation fails after Fedora 6 upgrade Adam Lipscombe Linux Networking 3 03-15-2007 12:55 AM
Linux Fedora Core2 and VIA EPIA CL10000 network problem Jarek Mekarski Linux Networking 1 09-29-2004 01:28 PM
Fedora Core2 + Wireless Question J. Mullaney Linux Networking 1 08-29-2004 09:51 PM
Fedora 1 eth0 problem Yvan@office Linux Networking 3 08-02-2004 11:21 AM



1 2 3 4 5 6 7 8 9 10 11