I am getting ready to embark on a somewhat complex LRP deployment that I
was hoping someone could comment on before I get started. Here is the
deal:
I have two outside interfaces. A cable modem (using DHCP) and an IDSL
link. I have an internal network with some wireless ether mixed in.
Some of the machines on the network use the cable modem to the outside
and some use the IDSL link (defined as gateway at the host). This is
how I want it. I am not trying to load balance.
I currently have two separate linux boxes acting as gateway (and masq.)
for each of the outside links. I would like to take all this routing
and boil it down into a single box. Most of my concern is with
getting all the routing to work correctly with iproute2 which I have not
done much with. The following is what I propose:
The PCMCIA and wireless stuff could wait until I get
everything else working. It seems that I will need 4 NIC's to
accomplish this (unless aliasing).
eth0 = cable
eth1 = IDSL
eth2 = Lan-cable, incoming LAN traffic default route through eth0
eth3 = Lan-IDSL, incoming LAN traffic default route through eth1
Then use iproute2 to setup four custom routing tables triggered by the
following rules:
ip rule add iff eth0 table eth0_table prio 200
ip rule add iff eth1 table eth1_table prio 201
ip rule add iff eth2 table eth2_table prio 202
ip rule add iff eth3 table eth3_table prio 203
Then the custom tables get populated with the following default routes.
Is the above and below syntax correct??? I have just extrapolated from
the documentation that I could find, and have never seen actual examples
of the "iff" selector that I use above.
ip route add default via 24.27.68.3 dev eth0 table eth0_table
ip route add default via 216.34.68.12 dev eth1 table eth1_table
ip route add default via 24.27.68.3 dev eth0 table eth2_table
ip route add default via 216.34.68.12 dev eth1 table eth3_table
Now, if aliasing would work in the rule statements like below, it would
seem that I could get away with 3 NIC's?
ip rule add iff eth2:0 table eth2-0_table prio 203
ip rule add iff eth2:1 table eth2-1_table prio 203
After all that works, I'll deal with:
firewall
ip masq.
etc.
I sure hope someone can check my logic and syntax. The hard stuff is
the routing. I don't think this would have been possible before
iproute2. I think the rest of it is just mechanics.
Thanks a bunch,
Scott