I have vmware workstation installed on a windows 7 host. I have two guests setup, both of them are Ubuntu Server 10.04.1 64 bit. One guest is connected to my host via the bridged network option. This guest also has a second virtual interface that is connected to a virtual switch. The second guest has a single virtual nic connected to the same virtual switch. What I am trying to do is to configure the first guest to be a router and configure the second guest to use the first guest as it's gateway. So what I want is a virtual LAN where the guests get internet access through the single guest that is bridged to the host.

In this configuration, the bridged guest does have internet access until I add the configuration for the second interface to the /etc/network/interfaces file. Once I add that interface and do /etc/init.d/networking restart the bridged guest can no longer ping any external hosts.

Content of interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

Output of route -n

Kernel IP routing table
Destination    Gateway          Genmask       Iface  eth0     eth1       eth0
  • That the virtual network the host and guests are connected to provides ip addresses via DHCP. – lfoulkrod Apr 18 '11 at 15:15
  • Please post output of the "ifconfig -a" command from the bridged guest, and also the output of the "ipconfig /a" command from the windows host. What command do you use to test that "the bridged guest does have internet access" ? – Beel Apr 18 '11 at 20:03

Make sure that the first guest still has its default gateway set to use the path to the outside world. In other words, in the setup of the interface from the first guest to the switch, do NOT specify a default gateway.

Post the interface configs (I expect they use the "private" address ranges) on the first guest. Also the routes from that first guest.


I ended up fixing my own problem by giving the eth1 interface a static configuration instead of allowing it to be configured by DHCP. I'm not sure exactly why this worked but after I configured it with a static IP I was able to connect the first guest to the internet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.