1、查看ens33网卡的mac地址: ip a ls (00:00:00:00:00:00)
2、在/etc/sysconfig/network-scripts/ifcfg-ens33的网卡配置文件配置为一致,若没有mac地址则加
BOOTPROTO=STATIC
HWADDR=“00:00:00:00:00:00”(ping不通时,考虑将宿主机器的mac加入到网卡配置中)
IPADDR=192.168.0.172(下面四个根据实际需要进行配置)
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
DNS1=114.114.114.114
3、重启network服务: service network restart;
4、重启网卡ifdown eth0 ifup eth0
5、(1)和(2)中的名字不一致时修改文件名:mv fileA fileB 修改fileA的文件名为fileB
6、VIM桥接模式,自动桥接,或者选定指定网卡也行
service iptables status 检查防火墙状态
service iptables start 开启防火墙
service iptables stop 关闭防火墙