[wplug] Dual Ethernet Ports - One routing table

Brian A. Seklecki lavalamp at spiritual-machines.org
Tue Aug 25 14:23:05 EDT 2009


On Tue, 2009-08-25 at 14:03 -0400, Weber, Lawrence A wrote:
> I have the need to interface a Linux system to two separate subnets.

Like any IP forwarding system, you can have multiple routes to the same
subnet (or multiple default routes).

Interface priority, metrics, weights, etc. will determine which is
used.  

On a GNU/Linux system, I wouldn't recommend it unless you want to
activate FIB/VIMAGE, whereby a process gets jailed into multiple routing
tables + state tables (essentially, virtualized network stack).

To keep it simple, configure your interface static IPs then add static
routes for subnet destinations reachable by each interface.

If one of the gateways on one of the interfaces happens to provide
INET4/INET6 access eventually, make that the default gateway.

For example:

eth0: 192.168.69.69/24 gw 192.168.69.1
% route add -inet 192.168.0.0/16 192.168.69.1

   ...or if 192.168.69.1 provides access to inet:

route add -inet 0.0.0.0/0 192.168.69.1

   And:

eth1: 10.24.65.5/23 gw 10.24.64.1
% route add -inet 10.0.0.0/8 10.0.64.1



More information about the wplug mailing list