这里以一台centos7为例讲解,windows配置与此原理一致
- 虚拟机设置-网络适配器选择
nat
模式
网络适配器
- 配置静态ip,注意其中的网关需要与
虚拟网络编辑器
中的一致,这样才能上外网
[root@server03 ~]#cd /etc/sysconfig/network-scripts/
[root@server03 network-scripts]# vim ifcfg-ens33


- 重启网卡服务生效
[root@server03 network-scripts]# systemctl restart network

网友评论