Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

1 Answer 1

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. 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.