Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two ISP at the time, connected to the same machine. I added both of them in the routing table as default. However, only one connection is used.

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    303    0        0 eth0         UG    303    0        0 eth1   U     303    0        0 eth0   U     303    0        0 eth1

How can I balance the traffic load between the two ISP?

share|improve this question

The Linux Advanced Routing & Traffic Control HOWTO has a section describing to solve the problem.

The key step to balance traffic between the two routes is to give them both a weight.

ip route add default scope global \
    nexthop via dev eth1 weight 1 \
    nexthop via dev eth0 weight 1
share|improve this answer
The two endpoints of those routes are obviously using NAT. If he balances the traffic between the routes, it will break horribly as each gateway receives traffic for NAT entries it does not know or understand. – David Schwartz Nov 3 '11 at 0:05
from what I understand, the routes are cached, requests for e.g. www.google.com will always go through the same endpoint. – bbaja42 Nov 3 '11 at 8:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.