LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 07-07-2005, 05:21 PM   #1
eccles23
Member
 
Registered: Jun 2003
Location: Australia
Distribution: Gentoo/kernel 2.6.2
Posts: 45

Rep: Reputation: 15
RH9 ignoring /etc/.../.../ifcfg-eth0


Hi There,
I am having a weird problem - never seen it before.

my file
Code:
/etc/sysconfig/network-scripts/ifcfg-eth0
is being *ignored* by RH9.

when I do a reboot, or a
Code:
/etc/init.d/network restart
When I first set up the system I gave it the address
Code:
192.168.1.20
and that IP address has *remained* across reboots and network restarts, despite the aforementioned file containing:
Code:
[root@localhost network-scripts]# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
does anyone have any ideas why this might be or how to fix it? if it just happened at reboot I might have thought there was something stupid appended to a startup script that changes it back each time but it also happens after network restarts, as I said.

many thanks
eccles
 
Old 07-07-2005, 09:05 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

well it surpirses me too,i have used this file extensively for seting up the network

what u can do is
run
setup
in a shell then set ur ip adresss from there and see if that works
also check the permissions for the ifcfg-eth0 file

regards
 
Old 07-07-2005, 10:28 PM   #3
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
The file "/etc/sysconfig/network-scripts/ifcfg-eth0" is used by the RH network setup script to setup your network and remember the original settings. It is used by "/usr/bin/system-config-network" to setup your network. The file may be called a differnet name in RH9 but it would be very similar. Probably start with rh*
 
Old 07-07-2005, 11:13 PM   #4
eccles23
Member
 
Registered: Jun 2003
Location: Australia
Distribution: Gentoo/kernel 2.6.2
Posts: 45

Original Poster
Rep: Reputation: 15
Hi there,
thanks for your replies. I'd already tried running the 'setup' program - and all that does is rewrite the ifcfg-eth0 file... which the network system then proceeds to take no notice of when I restart the network (or even restart the server). Any other ideas? I mean where might the thing be reading its config from if not from there anyway? :/
 
Old 07-07-2005, 11:19 PM   #5
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
Definitely no DHCP service running anywhere?
 
Old 07-07-2005, 11:49 PM   #6
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
well i had faced the same problem on redhat 9.I also failed many times but last i gao a solution

#rpm -e redhat-config-network --nodeps ---to delete this rpm package
#rpm -e netconfig --nodeps ------ " " "

now again install those rpm 's .If it is redhat9 then it must be in 1st or 2nd installation cd.

# rpm -ivh netconfig-xxx.rpm
#rpm -ivh redhat-config-network-xxx.rpm

Hope this helps
 
Old 07-07-2005, 11:49 PM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
what about the permisions and in what run level are u booting

run
service network restart
and see what u get in
/var/log/messages

regards
 
Old 07-08-2005, 12:00 AM   #8
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
Check the following file
/etc/conf.d/net
the startup scripts read this to setup network interface.
 
Old 07-15-2005, 09:30 PM   #9
heybrakywacky
LQ Newbie
 
Registered: Jul 2005
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by Michael Johnson
Definitely no DHCP service running anywhere?
So I've been following this thread, and I have the same problem, but there is a DHCP server running on my network; I just don't want this computer to use it. However, the DHCP address aquisition seems automatic, and I can't figure out how to make it stop doing it. This is what my /etc/sysconfig/network-scripts/ifcfg-eth0 looks like:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.8.15
NETMASK=255.255.255.0
GATEWAY=192.168.8.1

Are there configuration options I'm missing? I've created this file both manually and with the 'setup' utility, rebooted, reset the network, all to no avail. /var/log/messages happily reports that it's finding a DHCP server and using it to configure my interface. What gives?

Oh, I forgot to mention, I did try re-installing the redhat-network RPMs as suggested, but that didn't do the trick. I feel like I'm probably missing some simple configuration step....

Last edited by heybrakywacky; 07-15-2005 at 09:53 PM.
 
Old 07-16-2005, 02:45 AM   #10
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
Do you use a broadband connection? If you do you can set the modem up to be a DHCP server and then use DHCP to setup your IP address and gateway server.
 
Old 07-16-2005, 03:24 AM   #11
heybrakywacky
LQ Newbie
 
Registered: Jul 2005
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by Michael Johnson
Do you use a broadband connection? If you do you can set the modem up to be a DHCP server and then use DHCP to setup your IP address and gateway server.
I'm afraid I don't understand how that benefits me. I have a DHCP server on my network, and the RedHat box sees it and configures to it properly, if that was a working paradigm for me. But this box will be functioning as a server, and as such needs to have a static IP address. I could probably work around it by either setting a ridiculously long lease expiration, or reserve an address at the DHCP server, etc. I just figured there must be a more straightforward way to configure a static IP address, and take the DHCP service out of the mix entirely for that particular network interface, since it's not necessary (or really desired, for that matter ).

Anyway, thanks for the response. I'll keep poking around to see what I can find.

Cheers,
Kevin
 
Old 07-16-2005, 03:53 AM   #12
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
I was wondering why you are setting a static IP instead of using DHCP.
The network setup tool should have set this to read the data from this file at startup. I am not sure it why it doesn't. More thought needed.
 
Old 07-16-2005, 02:14 PM   #13
heybrakywacky
LQ Newbie
 
Registered: Jul 2005
Posts: 3

Rep: Reputation: 0
I got a hand from the good people over at linux.redhat.misc and comp.os.linux.networking.

# find /etc/sysconfig -name ifcfg-eth0 -print | xargs ls -l
-rw-r--r-- 2 root root 102 Jul 16 11:45 /etc/sysconfig/networking/devices/ifcfg-eth0
-rw-r--r-- 2 root root 102 Jul 16 11:45 /etc/sysconfig/networking/profiles/default/ifcfg-eth0
-rw-r--r-- 1 root root 102 Jul 16 00:33 /etc/sysconfig/network-scripts/ifcfg-eth0

The last two had the proper settings for the static IP address, but the first one was still pointing to DHCP. I changed the networking/devices/ifcfg-eth0 file to mirror the other two, and restarting the network updated my interface properly. All's well that ends well, I suppose.

Kevin
 
  


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
fedora/redhat: ifcfg-eth0 and ifcfg-eth1 Shaun2222 Linux - Networking 9 01-23-2008 03:25 PM
editing ifcfg-eth0 nkeever Linux - Newbie 4 05-05-2005 02:46 PM
Diff b/w 'network' and 'ifcfg-eth0' files linuxistan Linux - Networking 2 10-18-2004 05:30 AM
ifcfg-eth0 configuration problem shyam Linux - Networking 2 08-06-2003 06:25 AM
ifcfg-eth0:X alias problem dgenne Linux - Networking 1 03-17-2002 01:43 AM

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

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