LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 04-05-2002, 09:22 AM   #1
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Rep: Reputation: 15
Obtain IP when DHCP is down


Hope someone can help.

When a DHCP server is down, is it possible for a client machine to bypass the LONG delay in waiting for an IP and carry on and boot up. It currently takes about 2-3 minutes for it to work out that the DHCP server is not available.

I have a PC that has a DHCP server running that I sometimes don't want to turn on (it's upstairs), but just want to just go into my PC downstairs.

Sorry if this doesn't make sense, its a bit hard to explain.
 
Old 04-05-2002, 10:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
well it naturally depends which dhcp client you are using. if you're on pump, you should edit (or create) an /etc/pump.conf containing a suitable timeout= line. check the manpage for more info. I've been trying to suss out quickly how to do it with dhcpcd, but the manpage doesn't mention a config file to edit. you can specify a timeout on a command line iwth the -t option. you might want to look at the /sbin/ifup script to find out what's going on. (the dhcp client will be called from inside there. in there there are options to use the dhcpcd timeout from a preset environment varible, but i'm not really sure where that's meant to have come from. you could always just hardcode the value inside that script, or i guess you could add it to /etc/rc.sysinit or something...
 
Old 04-05-2002, 08:48 PM   #3
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
Whats funny is by default Windows does a better job at downed DHCP servers by giving out it s -->RESERVED!<-- ip address 169.x.x.x

Strange ehh.
 
Old 04-06-2002, 05:27 AM   #4
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
Yeah, but the DOS based windows have to be rebooted to configure it with a static as its not really compliant with the RFC for dhcp, but really runs off of BOOTP. Also, you might want to change your /etc/sysconfig/network-scripts/ifcg-eth0 file and take it off dhcp. You can invoke the client from the command line easily enough with dhcpcd, or put that in rc.local, which runs last, and if you check the man page on dhcpcd, I'm pretty certain there's an option you can pass it to shorten the time-out wait period to something reasonable like 10 seconds instead of the default... 60 I think?

Cheers,

Finegan
 
Old 04-06-2002, 06:00 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
i guess that'd be where the DHCP_TIMEOUT values go then, that are checked for by ifup.
 
Old 04-06-2002, 06:05 AM   #6
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
Quote:
Originally posted by acid_kewpie
i guess that'd be where the DHCP_TIMEOUT values go then, that are checked for by ifup.
<Begin Homer Slap>
Doh!
</End Homer Slap>

I knew there was a cute /etc/sysconfig script for it. I always duck using those. I gotta stop posting mixtures of the two.

Cheers,

Finegan
 
Old 04-12-2002, 10:46 AM   #7
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
sorry, been away this week.

thanks everyone ... i'll try tinkering with a few settings this weekend (if i get chance) and let you know.
 
Old 04-15-2002, 06:50 AM   #8
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
I first tried putting DHCP_TIMEOUT=10 in the ifcfg.eth0 file, but it had no effect.

I then had a browse at the /etc/rc.sysinit file (which I think is similar to the autoexec.bat / config.sys files), and I noticed a section dealing with DHCP. One line seemed to have options that are passed to the called DHCPCD command, so I added:

-t 10

to set a time-out of 10 seconds, and hey-presto it worked !!
Cool.

One quick ?, is there a similar command like WINIPCFG or IPCONFIG that I can run to check out the IP address in RHLinux?

Once again, thanks for all your help.
Andy
 
Old 04-15-2002, 07:02 AM   #9
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
Try ifconfig.

If you want to see all the information retrieved by the dhcpc then there should be a file in the /etc/dhcpc directory called dhcpcd-<interface>.info
The name depends on how things are configured but just look around and I'm sure you'll find it.
 
Old 04-15-2002, 07:04 AM   #10
L33t_H4x0R
LQ Newbie
 
Registered: Apr 2002
Distribution: Mandrake 9.0 (at the moment)
Posts: 28

Rep: Reputation: 15
ifconfig does a similar job to WINIPCFG or IPCONFIG on windows.

You can normally only run it as root though, and it does a load more stuff than either of the windows utils - so be careful!

Running it without command line arguments should be safe enough - it brings up a list of all your network adaptors, so on a typical machine it would bring up eth0, ppp0 (if you're dialed up to the net) and lo0 (the loopback adaptor) - and along with the list - you get all the info about each adaptor, including the IP address.

Enjoy!

Bry
 
Old 04-16-2002, 03:25 AM   #11
joadoor
Member
 
Registered: Apr 2002
Location: Clevedon, UK
Distribution: SUSE 8.2, 9.2, 10.0 OSS
Posts: 57

Original Poster
Rep: Reputation: 15
Cheers guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot obtain IP through dhcp? chy1013m1 Linux - Networking 4 06-24-2005 06:24 AM
Cannot obtain DHCP lease TroelsSmit Linux - Newbie 24 06-18-2005 03:32 AM
redhat 9.0 Can't obtain IP from dhcp serve berndmkiii Linux - Newbie 6 05-16-2004 05:01 PM
CAN'T obtain a IP from DHCP neo_aj Linux - Networking 0 02-17-2004 04:05 PM
Can't obtain ip using dhcp + linksys router OatBran Linux - Networking 0 11-14-2001 10:15 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration