LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 11-11-2006, 08:48 AM   #1
ve1drg
Member
 
Registered: Mar 2006
Posts: 50

Rep: Reputation: 15
rc.inet1 and a DHCP address


I am wondering if there is a way to have Slackware know when it picks up its DHCP address and if not for it to try again. Or at least to keep trying until it gets one.

I have had to put a 'sleep' statement in the rc.inet1.conf file to get the system to slow down when booting up. Otherwise it goes right by / misses getting the DHCP address.

I am wondering if somehow I adjusted the rc.inet1 config file such that it would do a check to see if it actually got the address and if not to say it was trying again until it either failed or was successful. And if it failed a message to that effect would pop up.

So, is there a statement I can add to that rc.inet1 config file that would tell slackware to check to see it actually had optained the dhcp address or not?

PS: When I notice that it misses picking up the dhcp address I go and rerun the rc.inet1 file. I do ./rc.inet1 stop and than ./rc.inet1 start. That usually gets the address for me. Why can't Slackware do something like this??

 
Old 11-11-2006, 01:16 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Look at your /etc/rc.d/rc.inet1 file for this line:
Code:
/sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-60} ${DHCP_OPTIONS} ${1}
Notice the "${DHCP_TIMEOUT[$i]:-60}" entry.

Look at
Code:
# man dhcpcd
for the "-t <timeout>" option. Here's the part you probably want:

"... Setting the timeout to zero disables it: dhcp will keep trying forever to get a lease, and if the lease is lost, it will try forever to get another."

I haven't tried if it works, so it would be nice if you post back with your results.

Good luck.
 
Old 11-11-2006, 05:19 PM   #3
ve1drg
Member
 
Registered: Mar 2006
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bsdunix
Look at your /etc/rc.d/rc.inet1 file for this line:
Code:
/sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-60} ${DHCP_OPTIONS} ${1}
Notice the "${DHCP_TIMEOUT[$i]:-60}" entry.

Look at
Code:
# man dhcpcd
for the "-t <timeout>" option. Here's the part you probably want:

"... Setting the timeout to zero disables it: dhcp will keep trying forever to get a lease, and if the lease is lost, it will try forever to get another."

I haven't tried if it works, so it would be nice if you post back with your results.

Good luck.

I believe that did the trick. I amended my rc.inet1 file to show '0' for the time and rebooted the system a couple of times and in every case the system waited at the point where it was looking for a DHCP address until it received one.

I will keep an eye on this but now with no 'sleep' statements in place, the boot-up process stops at the DHCP point and moves on after it gets the ip address. Seems like this change fixes my problem.

Thanks...
 
  


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
How To know if a host configured with DHCP has obtained IP address from DHCP server? Prassanta SUSE / openSUSE 1 06-29-2006 09:48 AM
eth0 ip assigned by dhcp , how would i know the ip address of the dhcp server where.. kublador Linux - Networking 14 05-16-2006 06:33 AM
Set MAC/HW Address in /etc/rc.d/rc.inet1.conf? TotalDefiance Slackware 6 09-29-2005 07:32 AM
dhcp no ip address and netmask dont match route address pengy666 Linux - Wireless Networking 1 05-08-2005 09:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 10:58 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