0

I have a Win7 host machine with Vmware Workstation. In the workstation I have 3 Ubuntu installed. All 3 Ubuntu guests have a Nat network - to access the internet without asking the router for a local address - and a Host-only network - to connect all Ubuntu quests and the host in a private network for internal communication, without touching the router.

When I try to make any of the Ubuntu quests to get data from the internet - assuming that they would figure out that the Nat-ed interface can access the requested data - they fail and report that there is no route to my query.

If I disconnect the 2nd interface on the Ubuntu guests with the Host-only network and restart networking, they start to know the route to the internet.

Odd, during the installation of the guests they asked which of the 2 given interfaces - with Nat and Host-only config - should be used to get updates during installation and they oddly managed to get the updates. Not so after the installation has finished and rebooted.

I have checked the Virtual Network Editor that the Nat interface should use my real network card to access the net, so there should be no problem.

I wish not to use the router's dhcp service to give the Ubuntu quests an address, and also I don't want the guests to be accessable from the local network directly, but only by the host - that's the Host-only network is for.

Any suggestions?

Edit: 192.168.189.0 is the Nat interface and 192.168.7.0 is the Host-only.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.7.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.189.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.189.2   0.0.0.0         UG    100    0        0 eth0
Ikon
  • 145
  • 1
  • 7

2 Answers2

0

Run a route -n

where does the route for 0.0.0.0 go in both instances?

I have found that bringing up a second nic can change the default gateway

Hope this helps:

http://www.comptechdoc.org/os/linux/usersguide/linux_ugrouting.html

pablo
  • 3,040
  • 1
  • 19
  • 23
0

I have managed to cope with the situation. As the routing seemed O.K., I tryed to ping 8.8.8.8 (Google public DNS server No.1) and it replied. So, the problem was not in the routing but in the clients resolv.conf setting, which was misstakenly defaulted to the Host-only network. Therefore I have updated manualy the /etc/dhcp3/dhclient.conf file's prepend domain-name-servers configuration and voila! All works! :) I hope this will help someone else too in finding a so lame misstake.

Ikon
  • 145
  • 1
  • 7