dhcp won't start automatically on boot
For some odd reason, dhcpcd won't start up automatically anymore. This computer is being used as a server, and I set it up at my house and dhcp started just fine. But, when I set it up where I'm keeping it, I noticed that it wasn't starting on its own. I tried adding a line in rc.local with the command to start eth0(/sbin/dhcpcd eth0), but it seems like it would only try for about 2 seconds or so and then the login prompt would come up. When I start it manually it takes a little while to get the ip address. If this was my desktop computer I wouldn't mind, but since this is being used as a server, and also doesn't have a keyboard, mouse, and monitor hooked up to it, I would like to figure out a way to fix this in cause I have to resart or the power goes out. Any help would be appreciated.
|
dhcpcd should be starting from /etc/rc.d/rc.inet1, so take a look in there, and also make sure that file has execute privileges (if not then run /bin/chmod 755 /etc/rc.d/rc.inet1).
Check the configuration file. In /etc/rc.d/rc.inet1.conf, you should have a section that looks like this: Code:
# Config information for eth0: |
I use a little script which I run in cron every 5 minutes. Here it is:
Code:
#!/bin/sh |
Thanks rotvogel I didn't even thinking about making a script to run in cron.
philipacamaniac: Everything in the rc.inet1 and rc.inet1.conf file are fine. As I said, it worked before I turned it off and brought it over to my gf's to set it up. And this server isn't behind a router/gateway, it's on a school network, so it's directly connected to the internet. |
I've the same kind of problem.. but i dont know why.. before I add module to my 2.6.10 kernel, it's worked fine...
now when i boot in Slackware10 (current) dhcpcd is started (when i do a ps -aux) but i dont get any IP from my dhcp server. i must manualy do a /etc/rc.d/rc.inet1 stop and /etc/rc.d/rc.inet1 start after it's work fine... Anyone have an idead what i can do to fix it.. (if possible not a script... ) thanks ! |
Hi!
Maybe increasing the timeout would help dhcpcd to get an ip address. Look for the following lines in /etc/rc.d/rc.inet1 and change `-t 10' to e.g. `-t 30'. Code:
/sbin/dhcpcd -d -t 30 -h ${DHCP_HOSTNAME[$1]} eth${1} |
All times are GMT -5. The time now is 12:05 AM. |