Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
192.168.1.0    0.0.0.0          255.25.255.0  eth0
10.0.0.0       0.0.0.0          255.0.0.0     eth1
0.0.0.0        192.168.1.1      0.0.0.0       eth0
share|improve this question
    
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
add comment

2 Answers

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.

share|improve this answer
add comment
up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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