HOWTO Gentoo Router for 2 ISP, load balancing, switch traffic if link is down/up
From Gentoo Linux Wiki
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article
Now days internet is wide available, affordable and cheap. Unfortunately, due to various reasons the connection to your ISP (Internet Service Provider) could die. In this situation, if you want to achieve hight availability of your services, a backup connection, one or more is essential.
The Problem: How to use services from 2 or more ISP connected to your router. How to transfer traffic from one ISP to another, if a connection fails and how to redirect it back when connection restores.
1) Installation of GENTOO and basic configuration - Gentoo handbook 2) Methods
- divide traffic based on static routes - similar to 1 connection guide. Could be used this guide: HOWTO setup a home-server - divide traffic by examples at www.lartc.org- problem when a link is down. It is easy, but not reliable. - divide traffic by applying kernel patches - http://www.ssi.bg/~ja/#routes. This method occupies nice functionalities, but resources out of portage are needed. - use of quagga (used in some ISP and complex network infrastructures) - Uses Zebra (GNU routing software), Border Gateway Protocol (BGP) and others.
Any suggestions how quagga could be configured for 2 ISP ? Please, include your experience here!
Possible monitoring via Nagios (HOWTO Install Nagios)
What about:
ip route add default eth1 metric 100
For the backup link? And:
ip route add default nexthop dev eth0 nexthop dev eth1
if you want to load balance ?
Related resources:
