1、虚拟机网络配置设置为桥接模式
2、设置配置文件: vi /etc/sysconfig/network-scripts/ifcfg-ens33
DEVICE=ens33 HWADDR=00:0c:29:c3:7b:e6 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static BROADCAST=192.168.1.255 DNS1=192.168.1.1 IPADDR=192.168.1.171 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes
3、重置网络: service network restart
原文地址:https://www.cnblogs.com/raorao1994/p/9637184.html
时间: 2024-10-11 14:33:15