MutliWAN: How it works

Essentially the machine needs to be configured to use N routing tables (N is your number of connections). Each routing table then needs to be populated with routes that control where packets go. When a packet enters the router the packet manager, using the RPDB, determines which routing table to use and then processes the packet appropriately. This is called Source Based Routing.

However, normally Ubuntu uses the ifconfig and route tools to configure network devices. These tools are fine for a machine with a single routing table, but not for multiple routing tables. To get around this we use the iproute2 tool. You can read about the history of iproute2 and see some other examples here, here and here.

If you are using a recent version of Ubuntu you will have the iproute2 package installed. If not install it.

You now need to create an extra routing table. Edit the file /etc/iproute2/rt_tables and add:
100 MyTable
The number is just an index between 0 and 255; the name is abritrary but you will need to use it in the scripts later so pick something you think appropriately describes the use of this extra table.

You will see that 253, 254 and 255 are for default, main and local routing. In this tutorial we are only adding one extra routing table for a secondary purpose. Your primary (i.e. main) routing table should be configured as the other routing table on your router. This means you should set your router up to correctly use your primary internet connection. Do this before going any futher.

When I set this up I actually created two new routing tables: one for voice and one for data. In hindsight that is over complicating the setup. If you have two routing tables that do exactly the same thing then you only need one routing table.

Here is a diagram of how the network works:
Network Layout Diagram

<- What you need | Networking ->

Return to Summary Page