为什么我无法通过 ssh 或访问在 vmware 工作站 9 上运行的第二个虚拟机上的 Web 服务器?

为什么我无法通过 ssh 或访问在 vmware 工作站 9 上运行的第二个虚拟机上的 Web 服务器?

我有一台安装了 VMWare Workstation 9 的 Windows 7 笔记本电脑。我使用 Workstation 运行两个 RHEL6 VM。我可以从笔记本电脑 ssh 到我的第一个 VM,没有问题,但我 ssh 到我的第二个 VM 的唯一方法是先 ssh 到我的第一个 VM,然后 ssh 到第二个 VM。我无法直接从我的笔记本电脑 ssh 到第二个 VM。我不明白为什么。任何帮助都非常感谢。

第一个虚拟机的 IP 地址为 192.168.204.129...

[redcricket@first-vm ~]$ /sbin/ifconfig 
eth1      Link encap:Ethernet  HWaddr 00:0C:29:CD:AB:F5  
          inet addr:192.168.204.129  Bcast:192.168.204.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fecd:abf5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4426 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5626 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:623548 (608.9 KiB)  TX bytes:744029 (726.5 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:103 errors:0 dropped:0 overruns:0 frame:0
          TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:12076 (11.7 KiB)  TX bytes:12076 (11.7 KiB)

...并且我可以从 cygwin bash 顺利地 ssh 到。

第二台虚拟机的 IP 地址为 192.168.204.128...

[redcricket@second-vm ~]$ /sbin/ifconfig
eth1      Link encap:Ethernet  HWaddr 00:50:56:34:DB:0E
          inet addr:192.168.204.128  Bcast:192.168.204.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe34:db0e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1738 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3837 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:180427 (176.1 KiB)  TX bytes:623977 (609.3 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:579 errors:0 dropped:0 overruns:0 frame:0
          TX packets:579 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:49032 (47.8 KiB)  TX bytes:49032 (47.8 KiB)

...但我只能从我的第一个虚拟机访问。我无法从我的 Windows 7 笔记本电脑 ssh 到第二个虚拟机。

我可以从第一个虚拟机 ping 第二个虚拟机,像这样...

[redcricket@first-vm ~]$ ping 192.168.204.128
PING 192.168.204.128 (192.168.204.128) 56(84) bytes of data.
64 bytes from 192.168.204.128: icmp_seq=1 ttl=64 time=0.716 ms
64 bytes from 192.168.204.128: icmp_seq=2 ttl=64 time=0.480 ms
64 bytes from 192.168.204.128: icmp_seq=3 ttl=64 time=0.476 ms
64 bytes from 192.168.204.128: icmp_seq=4 ttl=64 time=0.468 ms
^C
--- 192.168.204.128 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3539ms
rtt min/avg/max/mdev = 0.468/0.535/0.716/0.104 ms

...但是我无法从我的笔记本电脑 ping 通第二台虚拟机...

redcricket@redcricket-WS ~
$ ping 192.168.204.128

Pinging 192.168.204.128 with 32 bytes of data:
Request timed out.


redcricket@redcricket-WS ~
$ ping 192.168.204.129

Pinging 192.168.204.129 with 32 bytes of data:
Reply from 192.168.204.129: bytes=32 time<1ms TTL=64
Reply from 192.168.204.129: bytes=32 time<1ms TTL=64

这是我的 Windows 7 笔记本电脑的 ipconfig 输出...

redcricket@redcricket-WS ~
$ ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection 2:

   Connection-specific DNS Suffix  . : example.com
   Link-local IPv6 Address . . . . . : fe80::709e:73cb:3d7e:9992%18
   IPv4 Address. . . . . . . . . . . : 10.21.77.85
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . : 10.21.77.86

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : hsd1.ca.comcast.net
   IPv6 Address. . . . . . . . . . . : 2601:9:2700:203:1585:d702:3be9:dae0
   Temporary IPv6 Address. . . . . . : 2601:9:2700:203:d4fe:865d:20af:3c0e
   Link-local IPv6 Address . . . . . : fe80::1585:d702:3be9:dae0%11
   IPv4 Address. . . . . . . . . . . : 192.168.1.108
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : fe80::22aa:4bff:fef7:cb59%11
                                       192.168.1.1

Ethernet adapter Local Area Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter VMware Network Adapter VMnet1:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::e4dd:925b:7620:6276%22
   IPv4 Address. . . . . . . . . . . : 192.168.40.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::843:8b09:a64b:7d09%23
   IPv4 Address. . . . . . . . . . . : 192.168.204.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Tunnel adapter isatap.{31858BE6-6593-43AA-BB05-86411AA5F684}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{19E3EFC7-E040-4FE5-9241-B8DE273669B4}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.hsd1.ca.comcast.net:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : hsd1.ca.comcast.net

Tunnel adapter isatap.example.com:

   Connection-specific DNS Suffix  . : example.com
   Link-local IPv6 Address . . . . . : fe80::5efe:10.21.77.85%29
   Default Gateway . . . . . . . . . :

相关内容