Linux routing

Soldato
Joined
9 Dec 2004
Posts
5,700
Location
Dorset
I have 2 virtual machines that I would now like to give access to the internet. I currently have a Speedtouch 585 ADSL wireless router. My host machine (running OpenSuSE 10.2) connects to this through a wireless-ethernet bridge and my two virtual machines are configured on vmnet1. Something like this;

ADSL Router - - - - - - -eth0 on Host - - - - - - - virtual switch (vmnet1) - - - - - virtual machines

I've enabled ipforwarding on the host, so from a virtual machine I can now ping eth0 on the host, as well as the vmnet1 interface. I have also configured DNS on the host so from a virtual machine I can now do an nslookup to anything and that works beautifully.

My question is, how would I configure my routing with quagga and ripd? Do I even need to use routing, can I use a 'route add' command to link up between the eth0 interface and my ADSL router?

A bit confused here to be honest :(

Thanks.
 
I can't imagine why you'd need a dynamic routing daemon to do the job. If your ADSL router has a DHCP server, you could just bridge eth0 and vmnet1 so that the virtual machines can get DHCP leases and your ADSL router will do necessary grudge work (NAT?) - you can do the same by putting them on vmnet0 - automatically bridged.

If you want your virtual machines to have addresses on a seperate subnet then how do you wish them to connect to the internet via your ADSL? Do you have multiple IP addresses on your ADSL or a single address? If you have a single address you'd have to put a iptables postrouting rule on eth0 matching the source address of the vmnet1 subnet to snat/masqerade them to the eth0 IP before the ADSL router sees them.
 
Last edited:
Back
Top Bottom