在virtualBox上安装centos6.9

0.  操作

3.0 在virtualBox上安装centos6.9

3.1 关闭os

3.2 在vb上设置network
nat, bridge,host-only

3.3 启动os

3.4 在虚拟机中执行ifconfig
记录ip等信息
默认:
eth0: adp1 nat
eth1: adp2 bridge
eth2: adp3 host-only 192.168.56.*

3.5 在虚拟机中查看网络
eth1 默认是dhcp,不需要修改
用来连接互联网的

3.6 在虚拟机中设置网络
eth2 默认是dhcp
改称static
ip: 192.168.56.109
mask: 255.255.255.0
broad: 192.168.56.255

作用: 虚拟机之间通信、虚拟机与主机之间通信

1. VirtualBox中的网络连接方式详解

https://blog.csdn.net/yushupan/article/details/78404395

2. Linux中ping域名出现unknown host问题怎么解决

https://blog.csdn.net/qq_32575047/article/details/78975707
原文地址:https://www.cnblogs.com/pascal1000/p/13032607.html