Quantcast
Channel: Programming and Technology » GNU/Linux
Viewing all articles
Browse latest Browse all 55

Network not running in a CentOS VirtualBox machine

$
0
0

Be sure that your network options in VirtualBox are configured like this:

virtualbox-network

  • Attached to: Bridget Adapter
  • Name: (your network device)
  • Promiscuous Mode: Deny
  • Cable Connected: Check

Then inside the CentoOS virtual machine edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file so the eth0 device is loaded on boot and it’s fully controlled by the /etc/sysconfig/network-scripts/ scripts instead of the NetworkManager daemon:

ONBOOT=yes
NM_CONTROLLED=no

Then restart the network:

service network restart

Now you should have an eth0 adapter up and running:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:08:CA:1C:18:5A
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.224
          inet6 addr: fe80::20b:cdff:fe1c:185a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2341604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2217673 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:293460932 (279.8 MiB)  TX bytes:1042006549 (993.7 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5019066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5019066 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:816 (816.0 b)  TX bytes:816 (816.0 b)

Viewing all articles
Browse latest Browse all 55

Trending Articles