1 )网卡vmnet8的编辑
在上图中,子网IP (即网段)的地址可以自行设置,而不受影响。
检查并记住网关,如下图所示
2 )编辑NIC文件vim/etc/sys config/network-scripts/if CFG-ens 32
3 )要修改resolv.conf文件vim /etc/reslov.conf,可不通过在NIC文件中添加以下行来修改文件DNS1=网关ip
4 )重新启动network,然后单击[ root @ localhost (] # systemctlrestartnetwork [ root @ localhost ] ] 测试ping www.Baidu.compingww.a.shost )的bytesofdata.64 bytes from 61.135.169.125 (61.135.169.125 ) 3360英寸2 TTL=128 time=9.44 ms ^ c---- www.a.shifen.compingstatistics----2packets transmitted,2 received time 1002 msrt TMS