LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
Search this Thread
Old 05-31-2007, 12:28 PM   #1
Zylar
LQ Newbie
 
Registered: May 2007
Distribution: CentOS/RHEL
Posts: 11

Rep: Reputation: 0
DHCP Fallback IP?


Distro=Centos4.4

Is there a simple way have the IP set to something specific if a DHCP request fails? I've looked into zcip and zeroconf a bit, but can't seem to figure them out. I want to use DHCP, but also want to know the IP if DHCP fails.

Thanks.
 
Old 05-31-2007, 01:52 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
I believe some RFC document out of there assigns the network 169.254.0.0/16 for this purpose.
I am not sure, but this is a good start point to discuss or to google.
 
Old 05-31-2007, 02:12 PM   #3
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Rep: Reputation: 15
Lightbulb

Marozsas is right, this is the ip you will get, but i'm unsure if it's only in the case of a failed dhcp request. You will get the same ip if there is NO dhcp on the network too. Do you want to assign an ip in the case the host making the request is NOT in the dhcp config ?
 
Old 06-01-2007, 08:23 AM   #4
Zylar
LQ Newbie
 
Registered: May 2007
Distribution: CentOS/RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks Mar, I was pretty sure that was the case too. I'd like it to be a 192.168.1.X address though.

Yeah Ves, headless NAS device, destination environment unknown. I'd like it to be available via local DNS if possible (using DHCP) or if no local DNS/DHCP, I'd like to know what the address is.
 
Old 06-01-2007, 09:36 AM   #5
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Rep: Reputation: 15
If you know all the hosts that will connect to your server, you can identify them in the dhcpd.conf file using the "host" option and assign a different ip to all other host trying to connect to your server. If that fits your need, i can post a sample dhcpd.conf file.
 
Old 06-01-2007, 10:52 AM   #6
Zylar
LQ Newbie
 
Registered: May 2007
Distribution: CentOS/RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
I believe (maybe incorrectly) that CentOS uses dhclient.conf for dhcp configuration.

According to 'man dhclient.conf' "The configuration file can also be preinitialized with addresses to use on networks that don’t have DHCP servers.". Unfortunately, I can't seem to find dhclient.conf, maybe it's being renamed/redirected/? via init scripts, I don't know.

I'll keep looking, thanks though.

Edit: Interesting link. Too bad it doesn't apply to 4.4

Last edited by Zylar; 06-01-2007 at 11:10 AM.
 
Old 06-01-2007, 12:30 PM   #7
Zylar
LQ Newbie
 
Registered: May 2007
Distribution: CentOS/RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, created '/etc/sysconfig/network-scripts/ifcfg-eth0:0' :

Code:
DEVICE=eth0:0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.222.0
NETMASK=255.255.255.0
IPADDR=192.168.222.22
USERCTL=no
This just binds a 2nd static ip to the nic, using an alias. Not really what I wanted, but will work until I figure out the dhclient.conf stuff.
 
  


Reply

Tags
alternate, dhcp


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP Problems -- fallback solution ? introuble Debian 1 03-26-2006 09:55 PM
Grub - fallback option? coralsaw Debian 9 12-21-2005 08:07 AM
grub fallback configuration monkeypop Red Hat 2 06-17-2005 05:00 PM
wired to wireless fallback blackrose Linux - Wireless Networking 0 07-08-2003 11:01 AM
procmail fallback mazzo Linux - Newbie 3 06-09-2003 08:52 AM


All times are GMT -5. The time now is 04:10 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration