VMware 虚拟机固定 IP

VMware IP DNS About 555 words

编辑网卡

  • 本机网卡eth0,可能是eth33或其他,可使用ip addr命令查看。
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0
  • 修改BOOTPROTO=staticONBOOT=yes
  • 添加以下内容:
IPADDR=192.168.153.200
NETMASK=255.255.255.0
GATEWAY=192.168.153.2
DNS1=114.114.114.114

完整配置如下:

DEVICE=eth0
HWADDR=00:0C:29:C3:67:FE
TYPE=Ethernet
UUID=c1dd81f2-0a2f-4100-90af-991437cf9e8e
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static

IPADDR=192.168.153.200
NETMASK=255.255.255.0
GATEWAY=192.168.153.2
DNS1=114.114.114.114

配置 DNS

sudo vi /etc/resolv.conf

添加:

nameserver 114.114.114.114

重启网络

service network restart
Views: 2,621 · Posted: 2019-09-06

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh