VMware下设置 host-only 方式上网

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
#BROADCAST=192.168.75.255
HWADDR=00:0C:29:0A:CA:E4
#IPADDR=192.168.75.51
#NETMASK=255.255.255.0
#NETWORK=192.168.75.0
ONBOOT=yes

IPADDR=192.168.4.2
NETMASK=255.255.255.0
NETWORK=192.168.4.0
GATEWAY=192.168.4.1
DNS1=192.168.4.1

重启网络服务 service network restart或/etc/init.d/network restart

注意
1. 虚拟机设置 => 网络适配器 => 仅主机模式
2. vi /etc/sysconfig/network-scripts/ifcfg-eth0 重启网络服务 service network restart
3. VMware Virtual Nework Editor => 选中VMnet1=> Host-only => DHCP Settings 修改 Start IP address 和 End IP address

REF
1. linux下使用命令修改IP地址
https://jingyan.baidu.com/article/ca2d939d2cf1aceb6c31ce0a.html

2. VMware虚拟机中如何配置静态IP
https://www.cnblogs.com/weizaiyes/p/9905730.html

3. vmware下设置host-only方式上网
https://www.jianshu.com/p/6339bc46ea11
https://jingyan.baidu.com/article/d8072ac497452aec95cefda5.html

你可能感兴趣的:(Other)