Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed centos 6.4 and when I installed I set the network config. But somehow centos did not save them. Now I forced server to use dhcp but it is taking wrong IP address and it is not able to connect to internet.

I'm also not able to set network settings because system-network-config is not working.

Also I'm not able to yum install system-network-config because I can't connect to internet.

Vmware network adapter setting is NAT.

When I do ifconfig the IP is but the IP range is

how can I fix this problem? Thanks.

share|improve this question
up vote 11 down vote accepted

When you install CentOS with the GUI installer, is very easy to miss the configuration part where you make able the network interface to be bringed up when the system boots.

You have to edit /etc/sysconfig/network-scripts/ifcfg-YOUR_NIC_NAME, and specifically this:


next time you will boot the server, the NIC should be up.

share|improve this answer
  1. You cannot easily copy/paste out of the Virtual Machine if i'm not mistaken so make screenshots and crop just the Virtual Machine's window.
  2. Upload those to some free image hosting and post the urls here.

You will need to login as root

$ su -

Please provide the output of the following commands:

# cat /etc/sysconfig/network-scripts/ifcfg-*
# ip r
# ip a

It's advisable that you disable and stop network manager and restart basic the network service.

# service NetworkManager stop
# service NetworkManager disable
# service network restart

In worst case scenario you can try manually to bring up eth0:

# killall -9 dhclient
# ifconfig eth0 up

and please provide the output of:

# dhclient -v eth0
share|improve this answer

Your Answer


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.