From: Marek Kierdelewicz <marek@piasta.pl>
To: lartc@vger.kernel.org
Subject: Re: Re: [LARTC] 2 ISP connection sharing problem
Date: Sun, 02 Sep 2007 11:33:11 +0000 [thread overview]
Message-ID: <20070902133311.2ec2abf6@catlap> (raw)
In-Reply-To: <13c1e7670709011401r7b9961f8w8ee1122e0a7e5973@mail.gmail.com>
Hi,
>Thats fine but primary problem is that only one connection is used at a
>time but I want to utilize both at the same time. Please guide
You have iptables based options to solve this problem:
1) You can use u32 module to mark and then route packets based on the
destination address
example use of u32:
$IPT -t mangle -A FORWARD -m u32 --u32 "16&0x0001=0x0000" -j MARK
--set-mark 0x10
(packets to addresses with last bit UNSET will be marked with 0x10
value)
$IPT -t mangle -A FORWARD -m u32 --u32 "16&0x0001=0x0001" -j MARK
--set-mark 0x11
(packets to addresses with last bit SET will be marked with 0x10
value)
Then you add routing policy rules:
ip ru add fwmark 0x10 table T1 prio 100
ip ru add fwmark 0x11 table T2 prio 100
2) You can use statistics and connmark module to balance connections
between two links
Sorry, no fish here, only fishing rod. I don't have a working config
similar to what you need and making something up would be to time
consuming.
connmark module: http://home.regit.org/?page_id=7
statistic module: it's poorly documented, but you can use it like
that...
"-m statistic --mode random --probability PERCENT"
Basic idea is to mark some percent of NEW connection with mark 0x10
and rest with 0x11. Then you add policy routes like in example above.
Good luck.
Cheers,
Marek Kierdelewicz
KoBa ISP
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2007-09-02 11:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-01 21:01 [LARTC] 2 ISP connection sharing problem Arman
2007-09-01 23:33 ` Jorge Evangelista
2007-09-02 10:25 ` Arman
2007-09-02 11:33 ` Marek Kierdelewicz [this message]
2007-09-02 14:24 ` Arman
2007-09-02 20:04 ` Alex Samad
2007-09-03 8:35 ` Arman
2007-09-03 17:57 ` Arman
2007-09-03 18:09 ` Martin A. Brown
2007-09-03 18:12 ` Marek Kierdelewicz
2007-09-03 18:15 ` Pan'ko Alexander
2007-09-03 18:17 ` Jorge Evangelista
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070902133311.2ec2abf6@catlap \
--to=marek@piasta.pl \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.