LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Client acquires IP on boot, but lacks it when done (https://www.linuxquestions.org/questions/slackware-14/client-acquires-ip-on-boot-but-lacks-it-when-done-893616/)

Wed 07-25-2011 06:57 AM

Client acquires IP on boot, but lacks it when done
 
I just installed 13.37 on a client. All went well and I was happy. After reboot, I usually try to keep up with the boot messages to get a glimpse of the IP given it by the gateway.

Ok, it was a bit hesitant, but finally was given 192.168.0.154.

Thusly I enabled a mirror for the first update. But the network was unreachable. Ifconfig gives no valid IP.

So far I have tried to reboot (it's important that I know that the network comes up on powerfailure). And I have given:
Code:

ifconfig eth0 up
In an attempt to start the network manually.

During the boot sequence, the dhcpcd section ends with a time out, after getting the IP. Does that matter much?

saavedra29 07-25-2011 10:51 AM

I think you don't need to reboot the machine to get an ip. You can run
Code:

/etc/rc.d/rc.inet1 restart
This runs dhcpd and gives an ip. Dhcpd is not a daemon (at least there is not an rc.dhcpd file in the /etc/rc.d folder). So if saying time out you mean that the dhcpd is not running but you have the ip then it seems to me ok..

Wed 07-25-2011 11:24 AM

Yes! That got the network going. Thanks a lot! Ok, I used start instead of restart ... Still, it works.

Now, I am just curious as to why the IP acquired at boot (the very same one I might add) is not present once the machine is fully booted. I need to be able to rely on the computer to be reachable over the network every time there is a hiccup on the powerline. There have been a few too many lately.

The answer isn't really to add the command a few times after the initial boot is done right?

vulcan59 07-25-2011 12:01 PM

After I upgraded to 13.37 I found that the default dhcp timeout value was not long enough for me to reliably get an IP address. Try increasing DHCP_TIMEOUT in /etc/rc.d/rc.inet1.conf. That worked for me and removed the timeout message you referred to. I never did work out why the process of getting an IP seems to be slower in 13.37 than it was in 12.2.

Wed 07-25-2011 12:47 PM

Thanks for the tip. I have yet to reboot the machine in order to try it out. There were no such parameter, so I added a new line under the eth0 segment:
Code:

DHCP_TIMEOUT[0]="10"
What I did notice running the command above was that it ended with
Quote:

dhcpcd[18240]: forked to background, child pid 18269
, instead of as before with a timeout.

Wed 07-25-2011 12:58 PM

Yep. It worked like a charm. 10s was not enough though, but 30s is.


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