虚拟机固定ip
2020-09-24 本文已影响0人
我想放假休息
参考: https://blog.csdn.net/u014466635/article/details/80284792
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static" //这里改成static
HWADDR="00:0C:29:F4:7E:C9"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="2a76c2f8-cd47-44af-936d-11559b3a498d"
//这里设置成自己想要的ip 注意要符合网关等要求
IPADDR="192.168.73.100"
NETMASK="255.255.255.0"
GATEWAY="192.168.73.1"