Re: Re: 2 ISP connection sharing problem

Linux Advanced Routing and Traffic Control

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

 



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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux