All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] howto equalize two uplink?
@ 2003-03-26 10:04 Kertész Viktor
  2003-03-26 11:03 ` Kim Jensen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kertész Viktor @ 2003-03-26 10:04 UTC (permalink / raw)
  To: lartc

Hi all,

I've read all howtos at lartc.org but I still don't know how to share
packets between two uplinks. I used iptables/ROUTE target which works on
router box. In this case I can't use that because this box do masquerading
and i can't match destination ip at the prerouting chain in mangle table. Is
there a solution to specify two gateway to a destination?
             problem
                  |
                 V
---if1--linux gw---if2-----switch--router1-----link1----  10.5.0.0/16
clients
                                             \----router2-----link2----/
if2: 10.0.1.1
router1: 10.0.1.6
router2: 10.0.1.8

I tried these but I think I don't really understand iproute.

ip add 10.5.0.0/16 via 10.0.1.6 via 10.0.1.8 equalize
nor
ip add 10.5.0.0/16 nexthop 10.0.1.6 weight 1 nexthop 10.0.1.8 weight 1
equalize (i know, this is syntax error)

I hope I don't have to recompile my kernel... :) Thanks in advance!

Viktor

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
@ 2003-03-26 11:03 ` Kim Jensen
  2003-03-26 13:00 ` Kertész Viktor
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kim Jensen @ 2003-03-26 11:03 UTC (permalink / raw)
  To: lartc

Hi Kertész,

Read this doc:

http://www.ssi.bg/~ja/nano.txt

/Kim

On Wednesday 26 March 2003 11:04, Kertész Viktor wrote:
> Hi all,
>
> I've read all howtos at lartc.org but I still don't know how to share
> packets between two uplinks. I used iptables/ROUTE target which works on
> router box. In this case I can't use that because this box do masquerading
> and i can't match destination ip at the prerouting chain in mangle table.
> Is there a solution to specify two gateway to a destination?
>              problem
>
>                  V
> ---if1--linux gw---if2-----switch--router1-----link1----  10.5.0.0/16
> clients
>                                              \----router2-----link2----/
> if2: 10.0.1.1
> router1: 10.0.1.6
> router2: 10.0.1.8
>
> I tried these but I think I don't really understand iproute.
>
> ip add 10.5.0.0/16 via 10.0.1.6 via 10.0.1.8 equalize
> nor
> ip add 10.5.0.0/16 nexthop 10.0.1.6 weight 1 nexthop 10.0.1.8 weight 1
> equalize (i know, this is syntax error)
>
> I hope I don't have to recompile my kernel... :) Thanks in advance!
>
> Viktor
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
  2003-03-26 11:03 ` Kim Jensen
@ 2003-03-26 13:00 ` Kertész Viktor
  2003-03-26 13:16 ` Kim Jensen
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kertész Viktor @ 2003-03-26 13:00 UTC (permalink / raw)
  To: lartc

Hi Kim,
>
> Read this doc:
>
> http://www.ssi.bg/~ja/nano.txt

Thanks. I had successfully set up that each connection is estabilished on
other line but it's not an optimal solution for me. Is there a way I can
route 50% of traffic put on 1 line? It would be good for me if every second
packet would go on the second line.
Thanks!

Viktor


> > I've read all howtos at lartc.org but I still don't know how to share
> > packets between two uplinks. I used iptables/ROUTE target which works on
> > router box. In this case I can't use that because this box do
masquerading
> > and i can't match destination ip at the prerouting chain in mangle
table.
> > Is there a solution to specify two gateway to a destination?
> >              problem
> >
> >                  V
> > ---if1--linux gw---if2-----switch--router1-----link1----  10.5.0.0/16
> > clients
> >                                              \----router2-----link2----/
> > if2: 10.0.1.1
> > router1: 10.0.1.6
> > router2: 10.0.1.8
> >

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
  2003-03-26 11:03 ` Kim Jensen
  2003-03-26 13:00 ` Kertész Viktor
@ 2003-03-26 13:16 ` Kim Jensen
  2003-03-26 13:39 ` Kertész Viktor
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kim Jensen @ 2003-03-26 13:16 UTC (permalink / raw)
  To: lartc

On Wednesday 26 March 2003 14:00, Kertész Viktor wrote:
> Hi Kim,
>
> > Read this doc:
> >
> > http://www.ssi.bg/~ja/nano.txt
>
> Thanks. I had successfully set up that each connection is estabilished on
> other line but it's not an optimal solution for me. Is there a way I can
> route 50% of traffic put on 1 line? It would be good for me if every second
> packet would go on the second line.
> Thanks!
>
If you use the weight, then the kernel will split traffic according to the 
weight. I.e. If you choose weight 5-1, then you will on an average (over a 
longer period of time) see 5 times more traffic on one line than on the 
other. Ensuring that packets are divided over the lines equally, you will 
need the patch for the kernel, which is mentioned on the nano-howto I gave 
you the link to.

Under all circumstanses - if you are using the weight, then the kernel will 
over a longer period give you what you ask it to do.

/Kim

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
                   ` (2 preceding siblings ...)
  2003-03-26 13:16 ` Kim Jensen
@ 2003-03-26 13:39 ` Kertész Viktor
  2003-03-27  1:42 ` William L. Thomson Jr.
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kertész Viktor @ 2003-03-26 13:39 UTC (permalink / raw)
  To: lartc

May I ask you something?
What is the difference between these:
10.5.0.0/16  proto static
        nexthop via 10.0.1.6  dev eth1 weight 1
        nexthop via 10.0.1.8  dev eth1 weight 1

AND

10.5.0.0/16
        nexthop via 10.0.1.6  dev eth1 weight 1
        nexthop via 10.0.1.8  dev eth1 weight 1

Thanks for your answers. Now it's working but I want to make these settings
permanent and I haven't found answers to the above problem.

Viktor

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
                   ` (3 preceding siblings ...)
  2003-03-26 13:39 ` Kertész Viktor
@ 2003-03-27  1:42 ` William L. Thomson Jr.
  2003-03-27  7:41 ` Kertész Viktor
  2003-03-28 18:40 ` William L. Thomson Jr.
  6 siblings, 0 replies; 8+ messages in thread
From: William L. Thomson Jr. @ 2003-03-27  1:42 UTC (permalink / raw)
  To: lartc

To the best of my knowledge or understanding of this topic.

On Wed, 2003-03-26 at 08:39, Kertész Viktor wrote:
> May I ask you something?
> What is the difference between these:
> 10.5.0.0/16  proto static
>         nexthop via 10.0.1.6  dev eth1 weight 1
>         nexthop via 10.0.1.8  dev eth1 weight 1
> 

With the patches proto static is supposed to keep the routes in the
routing table regardless of the routes existence.

> 
> 10.5.0.0/16
>         nexthop via 10.0.1.6  dev eth1 weight 1
>         nexthop via 10.0.1.8  dev eth1 weight 1

Without proto static if one of the gateways is a PPP connection or PPPOE
then that gateway will be removed if the connection goes down.

In the event that you are using routers like I was, where it's rare the
connection between router and network (LAN) will be interrupted it's
more of a mood issue.

With PPP or PPPOE connections it can be a must if you want to routes to
remain until the connection is restored.

However this can cause a further problem as it tries to send packets via
a dead gateway.

I would look further into the dead gateway detection for more info on
this. I am pretty sure it pertains more to that than the concept of
having multiple uplinks/internet providers.

I could be wrong, and if I am please someone set me straight.

Thanks

Otherwise that should be the explanation you are seeking?

-- 
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios, Inc.
3548 Jamestown Ln.
Jacksonville, FL 32223
Phone/Fax  904.260.2445
http://www.obsidian-studios.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
                   ` (4 preceding siblings ...)
  2003-03-27  1:42 ` William L. Thomson Jr.
@ 2003-03-27  7:41 ` Kertész Viktor
  2003-03-28 18:40 ` William L. Thomson Jr.
  6 siblings, 0 replies; 8+ messages in thread
From: Kertész Viktor @ 2003-03-27  7:41 UTC (permalink / raw)
  To: lartc

> Without proto static if one of the gateways is a PPP connection or PPPOE
> then that gateway will be removed if the connection goes down.
I haven't patched the kernel with dead gateway detector patches. Links
are stable. I can manually modify config if a line drops.
 
> With PPP or PPPOE connections it can be a must if you want to routes to
> remain until the connection is restored.
I see. But what are the advantages/disadvantages?
My problem is that the connections are not shared as i expected. Traffic
on line one is 3 times greater than on line two (after a day testing). I
think i made a mistake. Or there is something with this proto static.

> Otherwise that should be the explanation you are seeking?
Thanks, I looked for something like yours :)

Viktor

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [LARTC] howto equalize two uplink?
  2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
                   ` (5 preceding siblings ...)
  2003-03-27  7:41 ` Kertész Viktor
@ 2003-03-28 18:40 ` William L. Thomson Jr.
  6 siblings, 0 replies; 8+ messages in thread
From: William L. Thomson Jr. @ 2003-03-28 18:40 UTC (permalink / raw)
  To: lartc

On Thu, 2003-03-27 at 02:41, Kertész Viktor wrote:
> > Without proto static if one of the gateways is a PPP connection or PPPOE
> > then that gateway will be removed if the connection goes down.
> I haven't patched the kernel with dead gateway detector patches. Links
> are stable. I can manually modify config if a line drops.

I think Julian's other patches for multipath routing also address the
proto static issue. I could be wrong.

> > With PPP or PPPOE connections it can be a must if you want to routes to
> > remain until the connection is restored.
> I see. But what are the advantages/disadvantages?

Good question. That someone else will have to answer. I did not work
with PPP or PPPOE connections directly. My routers took care of that
before the Linux router.

> My problem is that the connections are not shared as i expected. Traffic
> on line one is 3 times greater than on line two (after a day testing). I
> think i made a mistake. Or there is something with this proto static.

I do not think it has to do with proto static. In fact if I remember
things correctly. Without the patches proto static does not work
properly. Meaning proto static is the same as not having proto static.

As for the load not being balanced. Are you using the equalize flag
along with the weights?  I would try that and see what you get.

FYI, it's very hard to tell if the multipath thing is working with a
single machine, single user. Usually you will need multiple users, and
multiple machines to see things working the way you expect them to.

It is possible the Linux router is doing it's job. It is also possible
the router is not doing it's job.

Sometimes it can be hard to tell. Although once you get things dialed in
you will know.

-- 
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios, Inc.
3548 Jamestown Ln.
Jacksonville, FL 32223
Phone/Fax  904.260.2445
http://www.obsidian-studios.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-03-28 18:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-26 10:04 [LARTC] howto equalize two uplink? Kertész Viktor
2003-03-26 11:03 ` Kim Jensen
2003-03-26 13:00 ` Kertész Viktor
2003-03-26 13:16 ` Kim Jensen
2003-03-26 13:39 ` Kertész Viktor
2003-03-27  1:42 ` William L. Thomson Jr.
2003-03-27  7:41 ` Kertész Viktor
2003-03-28 18:40 ` William L. Thomson Jr.

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.