title: Connection to a local Tomcat server through virtual interfaces
body: <p>I am hoping to connect to a Tomcat server on a local host from virtual machines running on VMWare Station that connects to the host with a NAT virtual network.</p>
  <p>I started a Tomcat server with port 8080 on my host PC.</p>
  <p>The host normally has the following interfaces:</p>
  <blockquote>
  <ol>
  <li><p>Loopback interface, IP: 127.0.0.1</p>
  </li>
  <li><p>An interface for the ethernet, IP: 10.10.31.194   Gateway: 10.10.31.254
  The IP and DNS values are automatically assigned.</p>
  </li>
  <li><p>A virtual interface for the virtual network VNet8, IP: 192.168.129.1  Gateway: 192.168.129.2
  The IP and DNS values are automatically assigned. (This interface appears after the VMNet 8 is setup, to reduce confusion)</p>
  </li>
  </ol>
  </blockquote>
  <p>I can connect to a webpage (say /helloProject/helloPage.html) on the Tomcat server with the following URLs:</p>
  <pre><code>   http://127.0.0.1:8080/helloProject/helloPage.html
  
     http://10.10.31.194:8080/helloProject/helloPage.html
  </code></pre>
  <p>Then I setup my VMWare Station and opened a Network Address Translation network with the following configurations:</p>
  <blockquote>
  <p>VMNet8</p>
  <p>DHCP: Enabled</p>
  <p>Subnet Address: 192.168.129.0</p>
  <p>Subnet Mask: 255.255.255.0</p>
  <p>Gateway IP: 192.168.129.2</p>
  </blockquote>
  <p>But I cannot connect to the helloPage.html webpage through:</p>
  <pre><code>http://192.168.129.1:8080/helloProject/helloPage.html
  </code></pre>
  <p>Either from the host itself with IP 192.168.129.1, or from a Linux CentOS virtual machine with IP 192.168.129.128 on the same network.</p>
  <p>However, pinging the host from the host or the Linux VM I get response:</p>
  <blockquote>
  <p>ping 192.168.129.1</p>
  <p>Reply from 192.168.129.1: bytes=32 time&lt;1ms TTL=128</p>
  <p>...</p>
  </blockquote>
  <p>Can anyone suggest something to try so as to make the connection work?</p>
  <p>In addition: VM (192.168.129.128) can reach Gateway (192.168.129.2) as well as host (192.168.129.1). But host (192.168.129.1) cannot reach Gateway (192.168.129.2), ping no response. Strange.</p>