Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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:
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.
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.
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.
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.