FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-08-2008, 08:59 PM
Stuart Gall
 
Default ip route weight stupid question

Hello,
SO I have scoured the internet, the man pages, groups. I just cant find
a definitive answer.


weight NUMBER - is a weight for this element of a multi-
path route reflecting its relative bandwidth or quality.


So more weight = better quality = preferred ????


e.g.
ip route add default scope global nexthop via x.x.x.1 dev eth0 weight 1
nexthop via x.x.x.2 dev eth0 weight 2

Does a higher weight mean that the route will be used more or used less ?


TIA


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-08-2008, 11:09 PM
Alex Samad
 
Default ip route weight stupid question

On Tue, Apr 08, 2008 at 11:59:10PM +0300, Stuart Gall wrote:
> Hello,
> SO I have scoured the internet, the man pages, groups. I just cant find
> a definitive answer.
>
>
> weight NUMBER - is a weight for this element of a multi-
> path route reflecting its relative bandwidth or quality.
>
>
> So more weight = better quality = preferred ????
>
>
> e.g.
> ip route add default scope global nexthop via x.x.x.1 dev eth0 weight 1
> nexthop via x.x.x.2 dev eth0 weight 2
my understanding is that 2/3 will go via .2 and 1/3 will go via .1

try some thing like

for x in ($seq 1 20)
do
ip r g 1.1.2.$x
done

it should show you the route path taken and 33% should be via .1 and 66%
via .2

>
> Does a higher weight mean that the route will be used more or used less ?
>
>
> TIA
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>

--
The art of war is of vital importance
to the State. It is a matter of life and death, a road
either to safety or to ruin. Hence it is a subject of
inquiry which can on no account be neglected.
-- Sun Tzu - The Art of War
 
Old 04-09-2008, 03:34 AM
NN_il_Confusionario
 
Default 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:1Q2CWWmtUJAJsdir.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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-09-2008, 07:13 AM
Alex Samad
 
Default ip route weight stupid question

On Wed, Apr 09, 2008 at 05:34:50AM +0200, NN_il_Confusionario wrote:
> 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 ?
>
[snip]
>
> 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.
>

Further more there are some thread on the lartc mailing list that talk
about doing this with iptables and by passing julian patches. the
thought is that the iptables method give better results



> --
> 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.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>

--
"Can we win? I don't think you can win it."

- George W. Bush
08/30/2004
Today show interview
after being asked whether the war on terror was winnable
 

Thread Tools




All times are GMT. The time now is 08:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org