Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcp problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
chrism
Guru
Guru


Joined: 15 Jul 2004
Posts: 526

PostPosted: Thu Nov 04, 2004 7:08 pm    Post subject: dhcp problem Reply with quote

Hi,

I have the following problem: When I boot my Laptop, my Networkcard receives its IP address from the router. The Problem is, when I am not connected to my router it also tries to receive an IP address, that takes a long time.

My question is, if there's a way to either receive the IP manually or to set down the time the Laptop waits untill it tells me that dhcp failed.

Thanks,

Chris
Back to top
View user's profile Send private message
barran
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 142
Location: Århus, DK

PostPosted: Thu Nov 04, 2004 8:11 pm    Post subject: Reply with quote

emerge ifplugd
Back to top
View user's profile Send private message
trond
n00b
n00b


Joined: 31 May 2004
Posts: 26

PostPosted: Thu Nov 04, 2004 10:04 pm    Post subject: Reply with quote

Either remove net.eth0 from your default runlevel (rc-update del net.eth0 default) and start it manually when your connected (/etc/init.d/net.eth0 start). Or you can change the timeout for dhcpcd; in /etc/conf.d/net try adding dhcpcd_eth0="-t 5"
Back to top
View user's profile Send private message
barran
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 142
Location: Århus, DK

PostPosted: Thu Nov 04, 2004 10:18 pm    Post subject: Reply with quote

or use ifplugd which starts net.ethX when a cable is plugged or an AP is found, and stops it when the cable is unplugged again.
Very handy for laptops.
Back to top
View user's profile Send private message
chrism
Guru
Guru


Joined: 15 Jul 2004
Posts: 526

PostPosted: Fri Nov 05, 2004 1:34 am    Post subject: Reply with quote

barran wrote:
or use ifplugd which starts net.ethX when a cable is plugged or an AP is found, and stops it when the cable is unplugged again.
Very handy for laptops.


No didn't work. Here's my error log. It looks like ifplugd is started too late.

Nov 5 02:21:08 [dhcpcd] timed out waiting for a valid DHCP server response_
Nov 5 02:21:08 [rc-scripts] ERROR: Problem starting needed services.
Nov 5 02:21:08 [rc-scripts] "portmap" was not started.
Nov 5 02:21:08 [rc-scripts] ERROR: Problem starting needed services.
Nov 5 02:21:08 [rc-scripts] "famd" was not started.
Nov 5 02:21:10 [ifplugd] Warning: Could not get interface address.
Nov 5 02:21:10 [kernel] eth0: link down
Nov 5 02:21:10 [ifplugd] Using interface eth0/00:00:F0:7F:ED:8F with driver 8139too 0.9.27
Nov 5 02:21:10 [ifplugd] ifplugd 0.13 successfully initialized, link beat not detected.
Nov 5 02:21:10 [rc-scripts] ERROR: Problem starting needed services.
Nov 5 02:21:10 [rc-scripts] "netmount" was not started.

Thanks a lot,

Chris
Back to top
View user's profile Send private message
trond
n00b
n00b


Joined: 31 May 2004
Posts: 26

PostPosted: Fri Nov 05, 2004 6:25 am    Post subject: Reply with quote

Remove the net.ethX-script from your default runlevel. Ifplugd will start it if the networkcable is connected
Back to top
View user's profile Send private message
barran
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 142
Location: Århus, DK

PostPosted: Fri Nov 05, 2004 11:09 am    Post subject: Reply with quote

Yes thats right. Ifplugd totally takes over the contol of the net. init scripts, so they have to be removed.
I didnt think of mentioning that, because I thought I didnt need to, but I guess not all people examine what they use or install. I just assumed that. My bad. I apologize.

Here is what to do
Install the program (ok you already did that).
Edit /etc/conf.d/ifplugd
I have:
Quote:

INTERFACES="eth0 eth1"
ARGS="-f -u0 -d20 -b"

Remove all net.xxx scripts from runlevels that are listed in INTERFACES ie:
Code:

rc-update del net.eth0
rc-update del net.eth1


You may have to edit /etc/init.d/net.eth0 or /etc/init.d/net.lo because it makes wrong assumptions. See bug 34484. I dont know if the latest version of baselayout has this fixed.

Now edit /etc/sbin/ifplugd.action if fx. you want your pc to beep every time something is connected or reverse. (See emerge -s ^beep$)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum