Re: [Hampshire] Multiple gateways, multiple interfaces...

Top Page

Reply to this message
Author: James Courtier-Dutton
Date:  
To: lug, Hampshire LUG Discussion List
Subject: Re: [Hampshire] Multiple gateways, multiple interfaces...
On 19 October 2012 15:48, Vic <lug@???> wrote:
>
> Hi All.
>
> I've got a network problem I don't know how to solve. Hopefully, one of
> the gurus here knows the answer...
>
> I've got two network interfaces (one is actually virtual, but I don't
> think that matters). I want to have two IP addresses (one on each i/f),
> and have each interface be associated with itsown gateway.
>
> In other words, I want traffic originating from my address 1 to go via
> gateway 1, and traffic from my address 2 to go via gateway 2.
>
> I'm not clear on how to do this; source-based routing seems to be the
> idea, but I've not managed to make it work yet.
>
> Has anyone done this?
>


Where the packet goes depends on its destination IP address and the
local routing tables.
If there is IP address overlap on the networks attached to each
interface, you will need to implement virtual routing tables on the
local Linux host. I.e. Have one routing table for each interface and
not one shared between them. It is then not possible to route packets
from one interface to the other interface.

--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------