CentOS 7 配置网络

 

查看虚拟机配置

设置虚拟机网路为桥接模式

CentOS 7 配置网络

 

点击编辑->虚拟网络编辑器,DHCP设置

CentOS 7 配置网络

CentOS 7 配置网络

 

记一下起始IP和结束IP,和网关信息。

 

然后进入centos系统

 

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

CentOS 7 配置网络

 

 

 BOOTPROTO=static  静态ip

DNS1 =114.114.114.114 固定的国内通用

onboot=yes 开机启动

开通

systemctl restart network.service