the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

分析原因,本地主机的ip是自动获取的,关机重启后ip改变,但是虚拟机里面没有改变,所以网关ip不一致之类的。

我这里遇到这样的问题,是因为网关和网络IP没有配置对造成的,解决办法如下:

第一步:打开VM,点中要操作的虚拟机,鼠标点击左上角  编辑/虚拟网络编辑器,如下图所示:

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

第二步:若是选择自定义网关,即选择如上图的VMnet8模式,选中VMnet8,查看子网IP是否与本地Windows网关是否一致,我这里是192.168.72.0

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

此处子网ip,需要写成192.168.200.0才行,不然就无法确定 

第三步:NAT设置,这里是承接第二步,设置网关IP,我这里设置为192.168.72.1,也可以设置为192.168.72.2,如图所示

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

第四步;启动此虚拟机,登录,即可使用SSH连接成功。

注意:真正ssh连接的ip不是子网ip,具体ip是多少,需要用命令查看一下。例如:以下子网ip是192.168.200.0但ssh连接的是192.168.200.128.

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

这个方法没有试!!!

方法二:也可以在虚拟机中进行设置

第一步:打开虚拟机,登录,输入sudo  setup,不过还有输入密码,立刻进入如下界面。

 the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

第二步:选择第四个Network configuration   ,enter进入,如下所示界面。

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

第三步:选择第一个 Deservice configuration,  enter进入,显示如下界面

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

第四步:点击第一个,进入如下界面进行配置即可。

the host ‘192.168.2.100‘is unreachable,The host may be down,or there may be a problem with......解决办法

第五步:保存被退出

第六步:使用ssh登录,连接即可。