Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-30-2012, 02:01 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2012
Location: NC
Distribution: RPM-based distros
Posts: 4
Rep: 
|
Have to restart network on restart?
Hello,
I'm running CentOS 6, and I recently did some manual network configuration to make it use a static IP. But ever since I did this, every time it boots, networking doesn't work until I do
Code:
sudo service network restart
Which, really isn't bad, and I know there are ways around it. But this a really big annoyance, as the power where I live is flaky, and it often goes out. So when the server comes back up, nobody can access it until I log in and restart the network daemon. So I'm curious as to what is causing this. Any ideas?
Last edited by sapslaj; 06-30-2012 at 02:41 PM.
|
|
|
|
06-30-2012, 02:29 AM
|
#2
|
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,591
|
Take a look at your /var/log/boot.log to see what happened when the network started. If you don't see it starting, check 'chkconfig --list' to make sure it's configured to start at the runlevel you're using.
|
|
|
|
06-30-2012, 03:10 AM
|
#3
|
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
Hi,
I can help you only with some settings on my server, for you to find if any differences:
Code:
#>chkconfig --list | grep net
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
netplugd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
this would be set with:
Code:
#>chkconfig --levels 2345 network on
Then some configuration files:
Code:
root# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
HWADDR=00:20:xx:xx:xx:xx
ONBOOT=yes
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.7
NETMASK=255.255.255.0
NETWORK=192.168.0.0
TYPE=Ethernet
# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAY=192.168.0.254
# cat /etc/resolv.conf
nameserver 127.0.0.1
nameserver 192.168.0.7
cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.7 server_name
And this is about it, it starts on boot whenever it happens to get reset or power-off.
good luck
|
|
|
1 members found this post helpful.
|
06-30-2012, 01:50 PM
|
#5
|
|
LQ Newbie
Registered: Jun 2012
Location: NC
Distribution: RPM-based distros
Posts: 4
Original Poster
Rep: 
|
Hey guys, thanks for the great responses.
Turns out, doing "chkconfig --list" turned out
Code:
network 0:off 1:off 2:off 3:off 4:off 5:off 6:off
So I did what @lithos said, and did "chkconfig --levels 2345 network on," restarted, works. Thanks for your help!
By the way, @jefro, I did tweaking to /etc/sysconfig/network-scripts/ifcfg-eth1, /etc/sysconfig/network, and /etc/resolv.conf. Also had to uninstall NetworkManager because it kept changing everything back to normal.
|
|
|
|
06-30-2012, 02:02 PM
|
#6
|
|
Guru
Registered: Mar 2008
Posts: 8,556
|
Give macemoneta a +1 then and mark it solved.  He got it.
Last edited by jefro; 06-30-2012 at 02:04 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:16 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|