[SOLVED] help getting eth0 to run at startup
[SOLVED] help getting eth0 to run at startup
So... after a minimal install of CentOS 6, I already love it more than OpenSuse and Ubuntu (yummm).
My only problem is that when the server is turned on, it does not start its network interface card (eth0).
I have already configured the file at [b]/etc/sysconfig/networking/ifcfg-eth0[/b] to [i]ONBOOT=yes[/i] and [i]BOOTPROTO=dhcp[/i].
All I have to do to get logged in through SSH is to do [i]ifconfig eth0 up[/i] and it works instantly.
So what i did was make this script below, and added it to startup with [i]chkconfig --add eth0-init[/i]
[b]eth0-init[/b]
[code]
#!/bin/bash
#chkconfig: 345 99 10
#description: startup ethernet interface
ifconfig eth0 up
[/code]
How can I fix this? Is there another way? I'm certain it should just start automatically.
EDIT: Looks like it actually did startup but it took like forever. Can anyone let me know what the numbers after chkconfig mean? I assume 345 are run levels.
My only problem is that when the server is turned on, it does not start its network interface card (eth0).
I have already configured the file at [b]/etc/sysconfig/networking/ifcfg-eth0[/b] to [i]ONBOOT=yes[/i] and [i]BOOTPROTO=dhcp[/i].
All I have to do to get logged in through SSH is to do [i]ifconfig eth0 up[/i] and it works instantly.
So what i did was make this script below, and added it to startup with [i]chkconfig --add eth0-init[/i]
[b]eth0-init[/b]
[code]
#!/bin/bash
#chkconfig: 345 99 10
#description: startup ethernet interface
ifconfig eth0 up
[/code]
How can I fix this? Is there another way? I'm certain it should just start automatically.
EDIT: Looks like it actually did startup but it took like forever. Can anyone let me know what the numbers after chkconfig mean? I assume 345 are run levels.
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: help getting eth0 to run at startup
Wrong approach. You should not have to add a startup script. [url=http://wiki.centos.org/FAQ/General?highlight=%28TUV%29#head-d29a2b7e61ffc544973098f9dd49fe4663efba50]TUV[/url] has decreed that networks shall be managed by NetworkManager by default. Please see [url=http://wiki.centos.org/FAQ/CentOS6#head-b67e85d98f0e9f1b599358105c551632c6ff7c90]CentOS-6 FAQ #2. Why does my Ethernet not work unless I log in and explicitly enable it?[/url]
Re: help getting eth0 to run at startup
So... are you saying that the only way I can fix my problem is to use a graphical program--NetworkManager?
I was under the impression that having a non-X server it was more secure. If I make the default run level 3 but have a gui installed is that still accomplishing the same thing?
Sorry, I've just been brainwashed that a GUI is a nono.
I was under the impression that having a non-X server it was more secure. If I make the default run level 3 but have a gui installed is that still accomplishing the same thing?
Sorry, I've just been brainwashed that a GUI is a nono.
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: help getting eth0 to run at startup
I've been brainwashed into using the GUI :-) but your opinion is widely shared. I'm certain you can manage without the GUI, but someone else could best advise you on that as I've gotten spoiled by using EL on the desktop for many years. You still should not need a startup script of your own, but just proper configuration of network and/or NetworkManager services, and setting of parameters in /etc/sysconfig/network-scripts/ifcfg-ethX.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
[SOLVED] help getting eth0 to run at startup
What's wrong with system-config-network-tui ?
Re: help getting eth0 to run at startup
[quote]
gerald_clark wrote:
What's wrong with system-config-network-tui ?[/quote]
I actually have tried that! Maybe i'll try that again without the scripts. If not then i'll install a gui.
gerald_clark wrote:
What's wrong with system-config-network-tui ?[/quote]
I actually have tried that! Maybe i'll try that again without the scripts. If not then i'll install a gui.
Re: help getting eth0 to run at startup
thanks gerald and pschaff! after installing NetworkManager and re-running system-config-network-tui it now works! thanks for alleviating this headache!
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: [SOLVED] help getting eth0 to run at startup
Thank you for reporting back with details of your success.
For posterity, and on your behalf, this thread is marked [SOLVED].
For posterity, and on your behalf, this thread is marked [SOLVED].