vmbox CentOS网络配置,与宿主机共享网络

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="08:00:27:BE:80:A6"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="dhcp"

 

BOOTPROTO:设置网卡获得ip地址的方式,可能的选项为static,dhcp或bootp,分别对应静态指定的ip地址,通过dhcp协议获得的ip地址,通过bootp协议获得的ip地址。

 

service network restart 重启网络

wget www.baidu.com

 

你可能感兴趣的:(centos)