LinuxQuestions.org
Help answer threads with 0 replies.
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-14-2008, 03:40 PM   #1
sombre1
LQ Newbie
 
Registered: Jul 2005
Location: Northern Virginia
Distribution: SuSE 9.1 Personal
Posts: 21

Rep: Reputation: 0
Unhappy Cannot change ifconfig eth0 address on RHEL 5.0.


All,

ifconfig shows the wrong ip address for the eth0 adapter. The /etc/sysconfig/network-scripts/ifcfg-eth0, /etc/sysconfig/networking/profiles/ifcfg-eth0 and /etc/sysconfig/networking/default/ifcfg-eth0 files all show the correct ip address, 10.1.1.111, subnet, 255.255.255.0. route will show the correct route information. ifconfig will show an address of 10.1.1.117 and that is the address we can connect to. Threre are two network adapters and it is only the eth0 that is incorrect.

Nothing appears to be DHCP and there is apparently no DHCP server in this environment. There are some ifcfg-eth0.bak files that show DHCP.

If we do a system-config-network we see the .111 address and it is set to static. We can change it there and it will be reflected in all the other files, but not ifconfig. I have tried changing it to a completely different class A address and changing it back with no luck.

I have also set the ip address by enter the following.

ifconfig eth0 down
ifconfig eth0 10.1.1.111 up

if config will show the correct address until we reboot. Then it reverts back to the 10.1.1.117 address.

There has to be some file that I am missing.

Your assistance will be greatly appreciated.

Thanks,

sombre1
 
Old 08-14-2008, 04:26 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Check the mac (hardware) address stored in the ifcfg-eth0 file to be sure it actually goes to what you think is eth0. Also make sure the same mac address doesn't appear in any of the other ifcfg-ethX files. I once had a co-worker copy ifcfg-eth1 to ifcfg-eth0 then edit while blithely ignoring the fact both now referred to the same physical device.

Also don't keep copies of ifcfg-ethX files in /etc/sysconfig/network-scripts - only keep the current versions there. The network startup will look at all those files. I typically keep my copies in /root.
 
Old 08-14-2008, 06:42 PM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
RHEL (and Fedora) has two different systems to network control and both can't be running together, so the configuration in one system overlaps the configuration on the other.
They are /etc/init.d/network and /etc/init.d/NetworkManager, check yours:

Code:
[root@oldbit ~]# chkconfig | grep -i network
NetworkManager 	0:off	1:off	2:off	3:on	4:off	5:on	6:off
network        	0:off	1:off	2:off	3:off	4:off	5:off	6:off
[root@oldbit ~]#
 
Old 08-14-2008, 09:37 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Rep: Reputation: 34
hi marozsas

Network & NetworkManager cant be running together?

On my system they are running together. Can you cast a more light on this topic please

Thanks
 
Old 08-15-2008, 12:43 AM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
As you are using RHEL, one option would be to try using Setup. That should ensure the proper IP configuration is enforced as you are using RHEL 5.0. The command is just setup.
 
Old 08-15-2008, 07:52 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
Quote:
Originally Posted by varindersingh View Post
hi marozsas

Network & NetworkManager cant be running together?

On my system they are running together. Can you cast a more light on this topic please

Thanks
Hi !

Yes, they are incompatible, or they overlap each other.
The /etc/init.d/network is so called the "legacy" or "tradicional" network setup using ifup. It is a kind of static setup.

Network-Manager is more flexible. You can have several profiles for the same device. For instance, at work you may have eth0 setup by dhcp with a proxy. At home you may have eth0 configured with a static address and no proxy. You, as regular user, can switch profiles with a mouse click.
In the other hand, a machine with NetworkManager has network only after networkmanager is running in your graphical environment, not before ! You need to login on your computer to get it running.
This means it is not tailored for servers running in runlevel 3.

I had a lot of trouble setting up network on my fedora 9 until I realize I can't use both at the same time

This is my personal experience with fedora 9. May be others distros setup things differently.
 
Old 08-15-2008, 06:45 PM   #7
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Rep: Reputation: 34
Quote:
Network-Manager is more flexible. You can have several profiles for the same device. For instance, at work you may have eth0 setup by dhcp with a proxy. At home you may have eth0 configured with a static address and no proxy. You, as regular user, can switch profiles with a mouse click.
Thanks for explaining Network manager. Then how I can use this? I have to install it, or it is there by default ?
I have fedora core 9
Thanks again

Last edited by KinnowGrower; 08-15-2008 at 06:46 PM.
 
Old 08-16-2008, 03:58 PM   #8
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
Hi

In F9 the current package is NetworkManager-0.7.0-0.9.4.svn3675.fc9.i386. A simple "yum install NetworkManager" will install it, if it is not installed.
Stop the tradicional network (service network stop) and start NetworkManager (service NetworkManager start).
Almost immediately you will see a new icon on Gnome top bar.
If your computer is plugged on a wired connection, it will change the icon to show it is getting a IP from DHCP.
Clicking on it with the left mouse you will get a summary of the available connections. Mine has "Wired Networks", "GSM Network" and VPN connections. After you have a couple of connections configured, it just a matter of clicking on one of them to activate.
Clicking with the right mouse button you get several controls, "Enable Network", "Connection Information", and "Edit connections". The last opens a window with the several types of connections it support.
On the "wired" I have 2 connections as I told you, one using DHCP for use at work and another one to use at home with fixed address.
I think is more easy to try and explore than explain

If you like it, disable the tradicional network way with "chkconfig network off" and enable NetworkManager with "chkconfig NetworkManager on".

The only thing I dislike on NetworkManager is you need to login first to activated it. I mean, you can't just turn on the computer and expect to have network access.

cheers,

Last edited by marozsas; 08-16-2008 at 04:00 PM.
 
Old 08-16-2008, 07:30 PM   #9
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
From what I am to understand of Network manager, it's best with Wifi, if you stick to a single static connection then normal Network service would be better as you aren't switching between networks and thus don't need all the dynamic network detection and switching that Network manager is built for. From my understanding, anyways I myself mainly use CentOS on a web server so network manager would be completely unsuitable for me =P. I have my home machine dual boot but I keep that on a wired connection so no need again...
 
Old 08-16-2008, 07:54 PM   #10
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
Yes, good point. NetworkManager is only good for laptop and alike. For a desktop, a server, and any other device that always connect to just one network, the traditional way with "network" is far better than NetworkManager.
 
Old 08-16-2008, 09:07 PM   #11
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Rep: Reputation: 34
Hi

Its excellent.I got it.Thank you very much for your efforts.
 
  


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
Ubuntu: How to change MAC address with ifconfig? CJS Linux - Networking 1 06-06-2008 07:13 AM
What file to modify to change a mac address or to save eth0 configuration ikw38 Linux - Networking 2 04-26-2006 04:52 PM
ifconfig eth0 up does not 'revive' eth0 Micro420 Linux - General 2 04-22-2006 12:55 PM
eth0 removed from ifconfig after dhcpcd eth0 johnklvr Linux - Networking 3 01-15-2004 08:21 PM
Change eth0 address and WINS server Bobvvue02 Linux - Networking 0 10-02-2003 12:54 AM


All times are GMT -5. The time now is 06:18 AM.

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