Francis Brosnan Blazquez
2007-Feb-08 14:47 UTC
Configuring several route tables for the same network interface
Hi, I''ve been following documentation provided at [1] in order to setup a firewall to use two internet connections with different providers. While instructions found in [1] are pretty clear, I''m not able to install new route tables (apart from the main and local), always getting: RTNETLINK answers: File exists Here is the situation: [INET] -- [Provider Router 1] -- [10.0.0.1] -- Linux Box 10.0.0.0/29 \ eth1 |- [10.0.0.4] 10.0.1.0/29 / [10.0.1.4] [INET] -- [Provider Router 2] -- [10.0.1.1] -- What I''m trying to do is to have two routing tables, one for each different gateway, and using "ip rule from" to instruct the linux box to use one table or another according to the source address (either: 10.0.0.4 or 10.0.1.4). The set of instruction I''ve used are exactly the same as [1] but with one difference: our linux box only have one NIC adapter (with two IPs configured) as opposed to the example, which has two NIC adapters. So, the question would be: it is possible to have several route tables, or it is only allowed to have one routing table for each NIC. Supposing this context, is there any way to make traffic coming through "Provider Router 2" to be replied by the linux box using the same router, avoiding to always use the "Provider Router 1" which is the default via installed in the "main" route table? Thanks for your attention! [1] http://lartc.org/howto/lartc.rpdb.multiple-links.html -- Francis Brosnan Blazquez <francis@aspl.es> Advanced Software Production Line, S.L.