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

Re: ip route weight stupid question



On Tue, Apr 08, 2008 at 11:59:10PM +0300, Stuart Gall wrote:
> Does a higher weight mean that the route will be used more or used less ?

Citation from

   Linkname: Re: Loadbalancing the gat: msg#00055
        URL:
http://64.233.183.104/search?q=cache:1Q2CWWmtUJAJ:osdir.com/ml/linux.network.routing/2001-10/msg00055.html

If you want to make one route work more than the other, you can assign
weights to the routes right after each dev entry in the route statement
(i.e., "ip route ... dev eth0 weight 2 ... dev eth0 weight 1", this
would send twice as many connections out the first route as the second
route).  Remember that if you do not use the 'equalize' modifier to the
route statement, you get traffic broken up across the links on a per
session basis.  If using the 'equalize' parameter, it will be broken
across the links on a per packet basis.

Citation from

   Linkname: Routing for multiple uplinks/providers
        URL: http://lartc.org/howto/lartc.rpdb.multiple-links.html

The weight parameters can be tweaked to favor one provider over the other.

Note that balancing will not be perfect, as it is route based, and routes are cached. This
means that routes to often-used sites will always be over the same provider.

Furthermore, if you really want to do this, you probably also want to look at Julian
Anastasov's patches at http://www.ssi.bg/~ja/#routes , Julian's route patch page. They
will make things nicer to work with.

-- 
Chi usa software non libero avvelena anche te. Digli di smettere.
Informatica=arsenico: minime dosi in rari casi patologici, altrimenti letale.
Informatica=bomba: intelligente solo per gli stupidi che ci credono.


Reply to: