Remember my previous T rant? Well, they’re at it again. This time, instead of fixing the customer’s DNS to reflect the new fixed IP address they inflicted upon them, they broke the ADSL authentication.
Just in case anyone needs to multihome a Linux box in a hurry, here is a 30 second recipe. Call 22.214.171.124 the gateway for the first link, 126.96.36.199 the interface address for it; 188.8.131.52 the gateway and 184.108.40.206 the interface for the additional link.
- Define two (or more) new table names in /etc/iproute2/rt_tables, this example will call them oldlink and newlink; this step is optional but adds much clarity to the rest of the process
- ip route add default via 220.127.116.11 table oldlink
- ip rule add from 18.104.22.168 table oldlink
- ip route add default via 22.214.171.124 table newlink
- ip rule add from 126.96.36.199 table newlink
Now set your default route to the link you want outbound traffic to flow through. Inbound traffic will return via the interface it arrived on. If you want simple but crude load-balancing over the links, add something like this:
- ip route add default scope global nexthop via 188.8.131.52 weight 1 nexthop via 184.108.40.206 weight 1
“Crude” means that it’s route-based, so if 90% of your traffic is to one site, that 90% will all flow through one link; also the choice of links for new routes is somewhat arbitrary (IOW, actual balancing is far from guaranteed even in ideal circumstances).