0

Good morning to all,

I have installed Centos 6.7 x86 64 on a Virtual Machine. It is not the first time I'm using this virtual machine...I have already installed a Windows xp 32 bit system, and a Centos 7 with graphical interfac system, and they both connected as well. This time I can't start a connection. In the virtual machine I set the parameters on "NAT" and "Connected Cable", and here I report my inux configurations:

Configure eth0

#

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

NM_CONTROLLED="yes"

ONBOOT=yes

HWADDR=A4:BA:DB:37:F1:04

TYPE=Ethernet

BOOTPROTO=static

NAME="System eth0"

UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03

IPADDR=192.168.8.171

NETMASK=255.255.255.0

Configure Default Gateway

#

vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=centos6

GATEWAY=192.168.8.3

Restart Network Interface

#

/etc/init.d/network restart

Configure DNS Server

#

vi /etc/resolv.conf

nameserver 8.8.8.8

" I've copied this parameters from a website guide. Anyway, I tried also setting NM_CONTROLLED=no and ONBOOT=no, but nothing works.

Even if I try to pinging google by the command

ping www.google.it

it doesn't work.

Any suggestions?

Maurizio
  • 139
  • 10
  • 1
    You need to use DHCP if you've set the network to NAT in virtualbox. If you really do need to set a static IP address, you need to use the address ranges described in https://www.virtualbox.org/manual/ch09.html#changenat, the network 192.168.8.0/24 isn't going to work. – nos Mar 04 '16 at 09:25
  • I have read your link but....since I have not understood the problem I still don't understand what to do to fix it – Maurizio Mar 04 '16 at 10:02
  • Read up on how to configure DHCP on CentOS, or use 10.0.2.123 as the IP address and 10.0.2.2 as the gatway, or configure virtualbox to use a bridged network instead of NAT. – nos Mar 04 '16 at 10:04
  • what may be the advantages of setting a bridge network instead of a NAT? – Maurizio Mar 04 '16 at 10:40
  • I think you rather need to read the virtualbox documentation or some tutorials - at any rate this site is for programming related questions, not general software support, so your questions are rather off-topic. – nos Mar 04 '16 at 11:27

0 Answers0