[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iproute2 load balacing


ninnig1@tin.it a écrit :
> I have doubts about the management of the multipath with iproute2.
> In particular, do not understand how is the distrubution of traffic
> between two gateways.
> Use this command
> ip route add default scope global \
>    nexthop via dev eth1 weight 1 \
>    nexthop via dev ppp0 weight 1
> Actually I see that some servers will reach from, others
> from10.64.64.64, but I do not understand the logic that uses this command.
> Can you help me understand?

iproute multipath does not distribute traffic but routing cache entries.
A routing cache entry is based on the source and destination addresses,
and is used to route all packets matching these until it expires.
It means that all communications from A to B will use the same path
because they use the same routing cache entry. The distribution
algorithm is a simple weighted round robin and does not take the amount
of traffic on each path into account.

The efficiency as a load balancing increases with the number of routing
cache entries, i.e. the number of sources and/or destinations.

Reply to: