From: "Paa.listas" Date: Wed, 21 Nov 2007 14:29:05 +0000 Subject: [LARTC] Load Balancing with secondary tables (not main as in the Message-Id: <474440b8.0c86460a.71b8.0bd4@mx.google.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1920967831==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============1920967831== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0241_01C82C31.BAE94AD0" This is a multi-part message in MIME format. ------=_NextPart_000_0241_01C82C31.BAE94AD0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, We have 3 DSL connections connected to eth3 and another interface with a dedicated link in eth0 (main table) We want to balance selected traffic (using fwmark and iptables) through our 3 DSL connections in a secondary table named DSL (without using the dedicated link in eth0), but the next command is not accepted, and gives us the following error: # ip route add default scope global nexthop via 10.0.1.1 dev eth3 weight 1 nexthop via 10.0.2.1 dev eth3 weight 3 nexthop via 10.0.3.1 dev eth3 weight 2 table DSL Error: "nexthop" or end of line is expected instead of "table" That because the syntax rules of ip: # ip route add help Usage: ip route { add | del | change | append | replace | monitor } ROUTE SELECTOR := [ root PREFIX ] [ match PREFIX ] [ exact PREFIX ] [ table TABLE_ID ] [ proto RTPROTO ] [ type TYPE ] [ scope SCOPE ] ROUTE := NODE_SPEC [ INFO_SPEC ] NODE_SPEC := [ TYPE ] PREFIX [ tos TOS ] [ table TABLE_ID ] [ proto RTPROTO ] [ scope SCOPE ] [ metric METRIC ] INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]... NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS The question is, can I add load balancing over a secondary table in any other way? Why ip route add doesn't allow this? Thanks in advance. Note: - Architecture: Linux box ---- eth3 --------------- | ----- ADSL1 (IP: 10.0.1.1) | | ----- ADSL2 (IP: 10.0.2.1) | | ----- ADSL3 (IP: 10.0.3.1) eth0 # ip addr show dev eth3 5: eth3: mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:16:17:9d:3d:b2 brd ff:ff:ff:ff:ff:ff inet 10.0.1.2/24 brd 10.255.255.255 scope global eth3 inet 10.0.2.2/24 brd 10.255.255.255 scope global eth3:1 inet 10.0.3.2/24 brd 10.255.255.255 scope global eth3:2 ------=_NextPart_000_0241_01C82C31.BAE94AD0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

      We have 3 DSL connections connected to eth3 and another interface with a dedicated link in eth0 (main table)

 

We want to balance = selected traffic (using fwmark and iptables) through our 3 DSL connections in a = secondary table named DSL (without using the dedicated link in eth0), but the next command is not accepted, and gives us the following = error:

 

 

# ip route add = default scope global nexthop via 10.0.1.1 dev eth3 weight 1 nexthop via 10.0.2.1 dev = eth3 weight 3 nexthop via 10.0.3.1 dev eth3 weight 2 table = DSL

Error: = "nexthop" or end of line is expected instead of = "table"

 

 

 

That because the = syntax rules of ip:

 

# ip route add = help

Usage:

       ip route { add | del | change | append | replace | monitor } = ROUTE

SELECTOR :=3D [ = root PREFIX ] [ match PREFIX ] [ exact PREFIX ]

            [ table TABLE_ID ] [ = proto RTPROTO ]

            [ type TYPE ] [ scope SCOPE ]

ROUTE :=3D = NODE_SPEC [ INFO_SPEC ]

NODE_SPEC :=3D [ = TYPE ] PREFIX [ tos TOS ]

           &= nbsp; [ table TABLE_ID ] [ proto RTPROTO ]

           &= nbsp; [ scope SCOPE ] [ metric METRIC ]

INFO_SPEC :=3D NH = OPTIONS FLAGS [ nexthop NH = ]...

NH :=3D [ via = ADDRESS ] [ dev STRING ] [ weight NUMBER = ] NHFLAGS

 

 

The question is, = can I add load balancing over a secondary table in any other way? Why ip route add doesn’t allow this?

 

Thanks in = advance.

 

 

Note: =

 

- = Architecture:

 

     

        Linux box ---- eth3 --------------- | ----- ADSL1 (IP: = 10.0.1.1)

            |               &= nbsp;           &n= bsp;   | ----- ADSL2 (IP: 10.0.2.1)

|               &= nbsp;           &n= bsp;   | ----- ADSL3 (IP: 10.0.3.1)

     eth0

     

 

 

# ip addr show dev = eth3

5: eth3: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen = 1000

    link/ether 00:16:17:9d:3d:b2 brd = ff:ff:ff:ff:ff:ff

    = inet 10.0.1.2/24 brd 10.255.255.255 scope global = eth3

    = inet 10.0.2.2/24 brd 10.255.255.255 scope global = eth3:1

    = inet 10.0.3.2/24 brd 10.255.255.255 scope global = eth3:2

 

 

 

 

 

 

------=_NextPart_000_0241_01C82C31.BAE94AD0-- --===============1920967831== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1920967831==--