Sunday, June 30, 2013

CentOS - No Internet After Initial Install in VirtualBox Guest (SOLVED)

# cd /etc/sysconfig/network-scripts
# ls -l 

Look for a file called "ifcfg-eth0". Change eth0 to match your interface (in my case, it is "en0"):
# cp -v ifcfg-eth0 ifcfg-en0

Edit this new file according to your setup (this is for a DHCP setup):
# vi ifcfg-en0
It should resemble this:
#DEVICE=eth0
DEVICE=en0
HWADDR=08:00:27:6F:F3:D0
TYPE=Ethernet
UUID=cdf1abab-c942-47ca-a975-45e7d6247afd
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
[root@vm13 network-scripts]# cat ifcfg-en0
#DEVICE=eth0
DEVICE=en0
TYPE=Ethernet
UUID=cdf1abab-c942-47ca-a975-45e7d6247afd
ONBOOT=yes
#ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_INIT=no
NAME="System eth0"
HWADDR=08:00:27:6F:F3:D0
PEERDNS=yes
PEERROUTES=yes

Reboot
# shutdown -r now

Verification:
# ifconfig -a

Interface "en0" should now be showing an IP address (the type of IP address is based on your configuration).

No comments:

Post a Comment