After I installed the CentOS 6.8 minimal.iso with VBox, there was no network configuration and I needed to configure the network manually.
1. In the VBox centos configuration, select Network mode. I choose the bridge mode, select the bridge mode, the network interface and the network interface of your host, can be configured to the same network segment, so that your host and virtual machine can be freely accessible, and other hosts within the LAN can also communicate with the virtual machine.
2. Start the CentOS virtual machine and execute
ls/etc/sysconfig/network-scripts/ifcfg-*
You can see that there is a/etc/sysconfig/network-scripts/ifcfg-eth0 file, eth0 is a network interface, but the interface does not start when it is just installed. Starting mode:
A. Modify/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0hwaddr=08:00:27:8a:e8:99type=ethernetuuid=cb09fdd1-897f-4d48-a1f8-e1d44499a02bonboot=yes # Open Nm_ at system startup CONTROLLED=YESBOOTPROTO=DHCP # DHCP
After restarting Shutdown-r now, CentOS will be able to obtain IP via DHCP after booting.
If you do not have DHCP in your LAN or want to configure a static IP, you can include it in the configuration file above:
If the LAN is 192.168.0.0/24 and you want to configure an interface IP of 192.168.0.100, add the configuration:
Bootproto=static # changed from DHCP to staticbroadcast=192.168.0.255 #子网广播地址IPADDR =12.168.0.100 #ipNETMASK =255.255.255.0 # Mask network=192.168.0.0 #网络段
After you restart CentOS.
If you configure a static IP, you also need to configure the DNS server, routing information, and so on, not here.
This article is from the "Chhquan" blog, make sure to keep this source http://chhquan.blog.51cto.com/1346841/1790748
CentOS Virtual machine post-installation network configuration