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 06-30-2012, 02:01 AM   #1
sapslaj
LQ Newbie
 
Registered: Jun 2012
Location: NC
Distribution: RPM-based distros
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 06-30-2012, 02:29 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
Old 06-30-2012, 03:10 AM   #3
lithos
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

Rep: Reputation: 217Reputation: 217Reputation: 217
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.
Old 06-30-2012, 08:45 AM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,937

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
This link should still be a good example. http://www.unixmen.com/change-from-d...fedora-centos/

What exactly did you change?
 
1 members found this post helpful.
Old 06-30-2012, 01:50 PM   #5
sapslaj
LQ Newbie
 
Registered: Jun 2012
Location: NC
Distribution: RPM-based distros
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 06-30-2012, 02:02 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,937

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
Give macemoneta a +1 then and mark it solved. He got it.

Last edited by jefro; 06-30-2012 at 02:04 PM.
 
  


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
NETWORK transmit errors - assuming offline / NETWORK restart failed, could not find gcan Linux - Networking 3 11-13-2009 07:01 PM
In FC6 network interface doesn't come up if 'service network restart' command is run rajat Linux - Networking 2 05-02-2007 11:53 PM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
[SOLVED] Network restart Linux.tar.gz Slackware 8 05-10-2004 08:55 PM
Network Restart vofkid Linux - Newbie 1 03-14-2002 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration