LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   About Lan interface startup issue (https://www.linuxquestions.org/questions/linux-networking-3/about-lan-interface-startup-issue-792113/)

Actionscript3 02-28-2010 05:26 AM

About Lan interface startup issue
 
Hi,

In a CentOS box, there's no network cable connected with the interface, the eth0 interface do not start with bootup.

Then I 've to use ifconfig to up the interface.

How can I set it startup whenever there's real connections?

Thanks!

cdbunch 02-28-2010 01:34 PM

A couple of questions:

1. When you say that eth0 does not start up on boot do you mean that it has been configured to not start on boot by putting ONBOOT=no in /etc/sysconfig/network-scripts/ifcfg-eth0 or that it is configured to start on boot (ONBOOT=yes) but does not do so due to the cable not being plugged in?

2. Could you provide the content of your ifcfg-eth0 file?

Cameron Bunch

cdbunch 03-01-2010 09:32 AM

Actionscript3,

Also:

3. Are you using netplugd or NetworkManager? netplud is supplied by the net-tools package so that would need to be installed to use it. Both netplugd and NetworkManager should take care of automatically configuring the eth0 interface when the cable is plugged in or unplugged.

4. Is SELinux in enforcing mode and if so have you checked if putting it into permissive mode corrects the problem? If it does correct it you should troubleshoot the SELinux problem and set it back to enforcing mode to preserve the security benefits that it provides.

Cameron Bunch

cdbunch 03-01-2010 01:23 PM

I tested this out on a CentOS 5.3 box that has five Ethernet interfaces. With neither NetworkManager nor netplugd running I got what I think is the behaviour that you describe. I then started NetworkManager and was able to consistently plug and unplug to all five interfaces and get the expected connectivity and assignment of IPs as I moved the cable from one interface to another. Each interface got its own distinct IP via DHCP. I then stopped NetworkManager and started netplugd. I found that it would bring up an interface the first time I plugged in the cable and assign the IP but if I unplugged the cable, letting it drop the IP, it would not get re-assigned if I were to plug it back in again. I could plug it into another interface and get the one-time-only IP assignment to that interface but no re-assignment after dropping the connection. I did not try any configuration of either service.

So....

It looks like NetworkManager is a lot more robust and reliable. No surprise.

Cameron Bunch


All times are GMT -5. The time now is 09:07 PM.