LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-11-2003, 11:37 PM   #1
Mad Merlin
Member
 
Registered: Aug 2003
Location: Approximately here.
Distribution: Mandrake 9.1
Posts: 86

Rep: Reputation: 15
How to shorten the timeout for an eth0 connection?


Ok, here's the situation. I have a laptop that won't always be plugged into a network. Currently when I boot the laptop while unconnected, bootup will pause for ~60 seconds at eth0 initialization as it looks for a network connection. Once it times out, it picks an IP for itself and everything else goes normally. What I was wondering was how would I be able to shorten this timeout for the eth0 initialization on bootup to say 5 or 10 seconds.

The laptop in question is an IBM Thinkpad T40 running Mandrake 9.1.
 
Old 08-12-2003, 03:25 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I'm not sure how your files are setup. In /etc/rc.d/rc.inet1 is a line that runs dhcpcd:

/sbin/dhcpcd ${DHCP_HOSTNAME} -d eth0

Just insert '-t 10' or whatever after '/sbin/dhcpcd'.

I just did the reverse - taking it out - because I kept timing out. My power went out tonight and I couldn't reconnect.

Maybe that doesn't apply to your system, but it's something *like* that - the -t option should do it.
 
Old 08-12-2003, 03:41 AM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
you could also choose to not activate it on boot and then run the command to activate it manually, or even have a script that runs the command wen u login.
 
Old 08-12-2003, 05:45 AM   #4
Mad Merlin
Member
 
Registered: Aug 2003
Location: Approximately here.
Distribution: Mandrake 9.1
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by digiot
I'm not sure how your files are setup. In /etc/rc.d/rc.inet1 is a line that runs dhcpcd:

/sbin/dhcpcd ${DHCP_HOSTNAME} -d eth0

Just insert '-t 10' or whatever after '/sbin/dhcpcd'.

I just did the reverse - taking it out - because I kept timing out. My power went out tonight and I couldn't reconnect.

Maybe that doesn't apply to your system, but it's something *like* that - the -t option should do it.
I don't seem to have an /etc/rc.d/rc.inet1 file or an /sbin/dhcpcd file, I searched the entire hard drive for them with no results. However this does seem to be what I'd be looking for. I guess the file names/locations are different for Mandrake.
 
Old 08-12-2003, 06:17 AM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Yeah, I was afraid of that. I did install Mandrake briefly but I didn't pick up many details. That is weird, though, that there's not even a dhcpcd - I thought that was standard, though config files aren't. Well, there's got to be a script somewhere controlling an application somewhere that's going to have options to control its timeout. And the 60 seconds you describe is dhcpcd's default timeout.

Argh. I hate SysV.

In Debian, I have an /etc/rc.whoozits that has a symlink that goes to /etc/init.d that contains an 'inetd' script. It's a different system, script, and handles a different app but maybe it's the equivalent? And maybe *that's* on Mandrake? *g* I don't know, really - but maybe if you poke around in there, you'll find something that looks right and a man page to it may have the timeout option. Or, heck, maybe there's a gui tool in Mandrake where you can just set it from a box. Sorry I couldn't be more help.

-- Just had a thought. If your eth0 is up, do a 'ps -aux | grep -i eth0'. (Not all of that's necessary, but I like to make sure I don't miss anything.) That should show some process handling your eth0. So that'll tell you what man page to check for the timeout option.

Last edited by slakmagik; 08-12-2003 at 06:21 AM.
 
Old 08-12-2003, 08:11 PM   #6
Mad Merlin
Member
 
Registered: Aug 2003
Location: Approximately here.
Distribution: Mandrake 9.1
Posts: 86

Original Poster
Rep: Reputation: 15
It looks like eth0 is being handled by /sbin/zcip (while unplugged anyways). I checked the man page for zcip and it has no settings for timeout either. Strangely, zcip man pages reference dhcpcd and pump at the bottom, but neither have man pages installed. It turns out zcip is what is called after something (presumably dhclient) fails to find a dhcp server, and then zcip picks an ip for the computer.

When eth0 is plugged in, it's handled by dhclient. I found the man pages for this, and created the /etc/dhclient.conf page that it says it gets config details from, and put timeout 10; in it, but to no avail. When I run dhclient directly, it reflects the change, but no change in the bootup or when using 'network restart'. I dug around in the network-scripts folder and most of the /etc folder but still couldn't find anything relating to the timeout.
 
Old 08-12-2003, 09:59 PM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Damn. I think that was it. Odd that it didn't work. I'm out of ideas. (Which happens a lot.) Hopefully someone more knowledgeable will come along. Or, actually, you could try the other angles Roberto suggested. I figured you wanted to do it that way for a reason but his ideas should at least eliminate the delay.
 
Old 08-12-2003, 11:47 PM   #8
Mad Merlin
Member
 
Registered: Aug 2003
Location: Approximately here.
Distribution: Mandrake 9.1
Posts: 86

Original Poster
Rep: Reputation: 15
Well I mostly wanted to just lower the timeout so that when I suspend/resume the laptop (which requires an init 4 first for the time being) I don't have to wait so long for the eth0 connection to timeout when unplugged. Strangely enough, I looked at the init settings for various init levels, and init 4 only kills the window manager, nothing to do with network, so I'm puzzled as to why it restarts the network connection also.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0: TX timeout errors Mike Davies Linux - Networking 1 09-19-2005 12:34 PM
Linux is out to get me.. eth0 timeout problem RancidWannaRiot Mandriva 1 01-21-2004 06:55 PM
timeout on eth0 trpn Linux - Hardware 3 01-17-2004 07:59 PM
eth0 timeout problem RancidWannaRiot Mandriva 8 12-18-2003 09:57 PM
eth0 / eth1 timeout value kkempter Linux - General 0 05-27-2003 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration