LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-23-2007, 05:25 AM   #1
jogjayr
LQ Newbie
 
Registered: Aug 2007
Posts: 10

Rep: Reputation: 0
IP Address Not Being Set Correctly At Startup ie According to sysconfig-eth0


I have set my IP address as 192.168.0.11 (Fedora 7). This change is reflected in the relevant config files. But whenever i reboot my machine and check the IP using ifconfig, it shows an IP like 169.whatever. I have to set it manually every time. The interface card configuration dialog box, however, still shows the 192. address.
Changing the address by using ifconfig eth0 only works for that session. The IP needs to be reset the next time i boot up.
What could the problem be?

Last edited by jogjayr; 08-23-2007 at 05:28 AM.
 
Old 08-23-2007, 09:37 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,837

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
Post your /etc/sysconfig/network-scripts/ifcfg-eth0 file. That's the configuration file for eth0. The gui tools just automatically edit that file. It's probably setup with dhcp enabled by mistake.
 
Old 08-26-2007, 01:01 AM   #3
jogjayr
LQ Newbie
 
Registered: Aug 2007
Posts: 10

Original Poster
Rep: Reputation: 0
I'm at home right now and I'm working on fedora 7 on a computer in college. I can't post the ifcfg-eth0 file right now (since i don't have it right now) but I had recognised that DHCP being enabled might be a prob whn i posted my question. I checked too and i believe it wasn't enabled but i'll post the file in a coupla days, just to be sure, when i go back to college. Anything else that could be wrong, assuming DHCP is disabled? Thanks for the help so far...
 
Old 08-26-2007, 01:30 AM   #4
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
Quote:
Originally Posted by jogjayr View Post
I have set my IP address as 192.168.0.11 (Fedora 7). This change is reflected in the relevant config files. But whenever i reboot my machine and check the IP using ifconfig, it shows an IP like 169.whatever. I have to set it manually every time. The interface card configuration dialog box, however, still shows the 192. address.
Changing the address by using ifconfig eth0 only works for that session. The IP needs to be reset the next time i boot up.
What could the problem be?
hello..
if you are getting IP as 169.x.x.x. means your fedora failed to get an IP this may be due to NIC malfunctioning/configuraton essue/IP conflict check the last one if you feels others two are fine and try to get iP by dhcp server.

were you able to connect after manually allocation ?
 
Old 08-29-2007, 01:21 PM   #5
jogjayr
LQ Newbie
 
Registered: Aug 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Here is the ifcfg-eth0 file....

# Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:14:85:e7:20:14
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.11
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes


Does this show that dhcp is enabled?? And in response to the other query, yes everything works fine after manual allocation. But since I'm running NFS and NIS, this isn't an acceptable solution. This problem is cropping up on the NIS client. The NIS server works perfectly fine. Its IP is set correctly at startup. Thanks a lot for all the help.
 
Old 08-29-2007, 09:34 PM   #6
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi,

change that bootproto=static ---> bootproto=dhcp
and make sure your DHCP server has enough ip address pool to distribute.

HTH.
 
Old 08-30-2007, 12:03 AM   #7
jogjayr
LQ Newbie
 
Registered: Aug 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Resolved: Thanks

I turned off dhcbd and Network Manager on both client and server. Apparently, Network Manager assigns its own IP address if left on. And dhcbd is the dhcp daemon. Thanks for all the help guys.
 
Old 08-30-2007, 02:58 AM   #8
jakykong
Member
 
Registered: Apr 2006
Location: Washington
Distribution: Debian Gnu/Linux Lenny on AMD64x2 (32-bit mode), an AMD Sempron 64 laptop, debian, 32bit
Posts: 101

Rep: Reputation: 15
Quote:
Originally Posted by soroccoheaven View Post
hello..
if you are getting IP as 169.x.x.x. means your fedora failed to get an IP this may be due to NIC malfunctioning/configuraton essue/IP conflict check the last one if you feels others two are fine and try to get iP by dhcp server.

were you able to connect after manually allocation ?
169.x.x.x is windows' APIPA "Automatic Private IP Adressing" -- basically, if no dhcp server can be reached (in this case, that translates to there is no DHCP server), then a semi-random IP address from the 169.16.0.0 network is selected (i may be wrong about the .16, but being class B, there is a second number), and a simple RARP is used to determine if it's used.

I believe the intention here is to use static IP addressing. That a static IP has been intentionally set tells me he doesn't WANT dhcp at all.

Check your startup scripts for any lines containing dhclient -- it's conceivable that some startup script is calling dhclient, since your configuration seems correct. This truly is blind speculation, but it's worth a shot -- at least we can rule that out.

Unless fedora uses a different init than the standard sysV init, startup scripts are in /etc/init.d, and /etc/rc*.d (although the rc*.d directories usually contain links, not files, it's worth scanning them anyway).

Just run something like:

grep dhclient /etc/*.d/*

and grep will tell you what file it's in.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How programatically in C do I get/set the default route or gateway address of eth0 jroberts5477 Linux - Networking 2 09-15-2006 01:11 PM
How do I set the ip address for eth0, eth1 and the default gateway? abefroman SUSE / openSUSE 5 05-19-2005 04:15 AM
How to change /etc/sysconfig/network-scripts/ifcfg-eth0 ariana Linux - Networking 1 05-01-2005 01:37 PM
Gateway ip address removed from /etc/sysconfig/network files ehedetniem Linux - Newbie 2 04-12-2005 10:29 AM
Eth0 set up for Static, obtaining DHCP address?! IndustrialGeek Linux - Networking 2 01-03-2005 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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