[plug] Another network question (IP Aliasing)
Leon Brooks
leon at brooks.fdns.net
Tue Jun 10 13:41:48 WST 2003
On Tue, 10 Jun 2003 12:51, Ryan wrote:
> Supposedly iproute2 can route via aliased IPs, is that the sort of
> thing that would fix this issue (after a lot of reading)?
Yes.
I also use iproute2 for multi-homing sites. You tag traffic inbound on
one interface to be routed through an alternate table, then set a
different default route in that table. Here's a recipe:
ip route add default via 202.181.72.53 dev eth1 \
table $ISP1 src $INTERFACE1
ip route add default via 172.31.22.178 dev ppp0 \
table $ISP2 src $INTERFACE2
ip rule del from $INTERFACE1
ip rule add from $INTERFACE1 table $ISP1 priority 1010
ip rule del from $INTERFACE2
ip rule add from $INTERFACE2 table $ISP2 priority 1000
You can even do the tagging split with weighting, like this:
route del default
ip route add default scope global \
nexthop via $GATEWAY1 dev eth1 weight 3 \
nexthop via $GATEWAY2 dev ppp0 weight 2
This sends 60% of your outbound connections through eth1 and 40% through
ppp0. I used that on a site which was committed to $ISP1 (who shall
remain nameless except to say that they bought a several other local
ISPs but aren't iiNet) for some time but they were expensive for
traffic (haggled down to 10c/mb from 14c), so they got a DSL from $ISP2
(WestNet, I'm sure they won't mind the promotion) which gives them a
swag of gigabytes for free and only charge half the rate for bytes
over. We adjusted the weights to minimise costs.
Cheers; Leon
More information about the plug
mailing list