Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Cent OS 6.4 inside my virtualbox with two ethernet devices. One is connected to the internet with NAT, the other is connected to the internal network.

here is my eth2 config file

cat /etc/sysconfig/network-scripts/ifcfg-eth2 
DEVICE=eth2 
BOOTPROTO=none 
NM_CONTROLLED=no
ONBOOT=yes 
NAME='internal network'
NETWORK=10.0.1.0 
NETMASK=255.255.255.0 
IPADDR=10.0.1.27 
USERCTL=no

if I run

/etc/init.d/network restart

the interface gets set up and everything works, but I have to run that after each reboot.

How can I have that network configured after a reboot too. I thought ONBOOT was the only flag I needed.

Edit: I had run

# chkconfig network on
# chkconfig | grep network
  network           0:off   1:off   2:on    3:on    4:on    5:on    6:off

Edit2:

The problem vas that NetworkManager was on and the settings got overriden. Solved it with:

chkconfig NetworkManager off
share|improve this question
    
Maybe the network service itself isn't started in your default runlevel. Try chkconfig --level $(who -r|awk '{print $2}') network on as root. –  Joseph R. Oct 7 '13 at 8:29
    
I have also checked that and it's network 0:off 1:off 2:on 3:on 4:on 5:on 6:off –  zidarsk8 Oct 7 '13 at 8:40
    
@JosephR. It could be possible that something else is messing up my config files. –  zidarsk8 Oct 7 '13 at 11:57
    
I wouldn't know. I haven't stuck with any RPM-based distro long enough to figure out how the network scripts worked. Maybe check the logs for errors/failures... –  Joseph R. Oct 7 '13 at 17:51
    
If your problem was solved, please consider answering your own question. –  Joseph R. Oct 10 '13 at 11:15
show 1 more comment

1 Answer

chkconfig --level 3 5 network on
share|improve this answer
    
The OP edited the question to reflect that the network service is started in runlevels 3 and 5. –  Joseph R. Oct 7 '13 at 17:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.