1 主机的控制面板,找到电脑的实际网卡,勾选,并选择VMware Network Adapter VMnet1
找到虚拟网卡VMware Virtual Ethernet Adapter for VMnet1,检查IP
2 VMware Workstation,仅主机模式
3 进入虚拟机,修改IP
查看IP地址
1
|
ip addr show |
修改虚拟机的IP地址
1
|
ip addr add dev eno16777736 192.168.137.18/24 |
检查能否ping通
1
|
ping 192.168.137.1 |
4 设置网关
1
|
ip route add default via 192.168.137.1
|
5 设置DNS
1
|
vi /etc/resolv.conf |
进入vi编辑器
1
|
nameserver 192.168.137.1 |
检查ping
1
|
ping www.google.com |