Difference between revisions of "Load balancing between two gateways"

From Notes_Wiki
(Created page with "=Load balancing between two gateways= For load balancing between two gateways use: <pre> ip route del default ip route add default scope global nexthop via <gateway_1> ...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>IP routing 2 configuration|IP routing 2</yambe:breadcrumb>
=Load balancing between two gateways=
=Load balancing between two gateways=



Revision as of 11:54, 2 December 2012

<yambe:breadcrumb>IP routing 2 configuration|IP routing 2</yambe:breadcrumb>

Load balancing between two gateways

For load balancing between two gateways use:

ip route del default
ip route add default scope global nexthop via <gateway_1> dev <interface of gateway 1> weight 1 \
     nexthop via <gateway_2> dev <interface of gateway 2> weight 1

Here weights can be changed to make one route more preferable to other.

We can use 'ip route show' command to verify that routes got added properly.

For more information refer http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN298