在VMware中使用Nat方式设置静态IP

在VMware中使用Nat方式设置静态IP

为了在公司和家中不改变ip,所以采用vm的NAT模式来设置静态ip

1、vm采用NAT模式联网

在VMware中使用Nat方式设置静态IP

 

2、编辑vm虚拟机设置

在VMware中使用Nat方式设置静态IP

 

3、查看该网段的网关

在VMware中使用Nat方式设置静态IP

 

可以看出网关为192.168.101.2,然后开始设置静态ip

然后查看win本机的vnet8网段:

在VMware中使用Nat方式设置静态IP

可以看出在同一网段了,于是开始为服务器设置静态ip

4、设置服务器ip

在VMware中使用Nat方式设置静态IP

5、重启网络服务:

#service network restart

在VMware中使用Nat方式设置静态IP

 

6、ssh连接服务器:

在VMware中使用Nat方式设置静态IP

在VMware中使用Nat方式设置静态IP

至此就不用担心网络改变而需要频繁修改ip了