Hi, I am new in LARTC list. I had intermediate skills in networking.<br><br>What I tried to do: Use 2 links with loadsharing + falt toletant (to add bandwitdh)<br><br>ok ! I am use Debian Etch in router/fw With kernel debian default +
routes-2.6.17-12.diff patch<br><br>The Problem: <br><br> The iproute2 just route thought the last gateway of nexthop rule.<br> I was running tcpdump in 2 terminals, <br><br> tcpdump -nni eth0 ...<br> tcpdump -nni eth1 ...
<br><br> When the mark rule is set to --set-mark 0x1 they use eth0<br> When the mark rule is set to --set-mark 0x2 they use eth1<br> When the mark rule is set to --set-mark 0x3 they use the last gateway in rule with nexthop.
<br><br> exemple1: <br><br>default proto static <br> nexthop via <a href="http://200.253.10.129">200.253.10.129</a> dev eth1 weight 1<br> nexthop via <a href="http://201.49.17.1">201.49.17.1</a> dev eth0 weight 1
<br><br>connections was sending through <a href="http://201.49.17.1">201.49.17.1</a> eth0<br><br> exemple2:<br><br>default proto static <br>
nexthop via <a href="http://201.49.17.1">201.49.17.1</a> dev eth0 weight 1<br> nexthop via <a href="http://200.253.10.129">200.253.10.129</a> dev eth1 weight 1<br><br>connections was sending through <a href="http://200.253.10.129">
200.253.10.129</a> eth1<br><br>But dont use both at the same time. Someone can help with this thread?<br><br>My conf was based in <a href="http://www.ssi.bg/~ja/nano.txt">http://www.ssi.bg/~ja/nano.txt</a> article<br><br>
CSD0101LNX00F:~# uname -a<br>Linux CSD0101LNX00F 2.6.17-2006-12-08 #1 Fri Dec 8 14:09:37 BRT 2006 i686 GNU/Linux<br><br>CSD0101LNX00F:~# cat /etc/iproute2/rt_tables <br>255 local<br>254 main<br>253 default<br>0 unspec<br>
200 router1<br>201 router2<br>202 router3<br><br>CSD0101LNX00F:~# ip route<br><a href="http://200.253.10.128/26">200.253.10.128/26</a> dev eth1 proto kernel scope link src <a href="http://200.253.10.137">200.253.10.137
</a> <br><a href="http://201.49.17.0/25">201.49.17.0/25</a> dev eth0 proto kernel scope link src <a href="http://201.49.17.50">201.49.17.50</a> <br><a href="http://10.0.0.0/22">10.0.0.0/22</a> dev eth3 proto kernel scope link src
<a href="http://10.0.0.1">10.0.0.1</a> <br><a href="http://172.31.0.0/22">172.31.0.0/22</a> dev eth2 proto kernel scope link src <a href="http://172.31.0.175">172.31.0.175</a> <br><br>CSD0101LNX00F:~# ip route show table router1
<br><a href="http://201.49.17.50">201.49.17.50</a> via <a href="http://201.49.17.1">201.49.17.1</a> dev eth0 <br><a href="http://200.253.10.128/26">200.253.10.128/26</a> dev eth1 proto kernel scope link src <a href="http://200.253.10.137">
200.253.10.137</a> <br><a href="http://201.49.17.0/25">201.49.17.0/25</a> dev eth0 proto kernel scope link src <a href="http://201.49.17.50">201.49.17.50</a> <br><a href="http://10.0.0.0/22">10.0.0.0/22</a> dev eth3 proto kernel scope link src
<a href="http://10.0.0.1">10.0.0.1</a> <br><a href="http://172.31.0.0/22">172.31.0.0/22</a> dev eth2 proto kernel scope link src <a href="http://172.31.0.175">172.31.0.175</a> <br>default via <a href="http://201.49.17.1">
201.49.17.1</a> dev eth0 <br><br>CSD0101LNX00F:~# ip route show table router2<br><a href="http://200.253.10.137">200.253.10.137</a> via <a href="http://200.253.10.129">200.253.10.129</a> dev eth1 <br><a href="http://200.253.10.128/26">
200.253.10.128/26</a> dev eth1 proto kernel scope link src <a href="http://200.253.10.137">200.253.10.137</a> <br><a href="http://201.49.17.0/25">201.49.17.0/25</a> dev eth0 proto kernel scope link src <a href="http://201.49.17.50">
201.49.17.50</a> <br><a href="http://10.0.0.0/22">10.0.0.0/22</a> dev eth3 proto kernel scope link src <a href="http://10.0.0.1">10.0.0.1</a> <br><a href="http://172.31.0.0/22">172.31.0.0/22</a> dev eth2 proto kernel scope link src
<a href="http://172.31.0.175">172.31.0.175</a> <br>default via <a href="http://200.253.10.129">200.253.10.129</a> dev eth1 <br><br>CSD0101LNX00F:~# ip route show table router3<br>default proto static <br> nexthop via
<a href="http://200.253.10.129">200.253.10.129</a> dev eth1 weight 1<br> nexthop via <a href="http://201.49.17.1">201.49.17.1</a> dev eth0 weight 1<br><br>CSD0101LNX00F:~# ip rule<br>0: from all lookup 255 <br>
25: from all fwmark 0x3 lookup router3 <br>26: from <a href="http://201.49.17.50">201.49.17.50</a> lookup router1 <br>27: from <a href="http://200.253.10.137">200.253.10.137</a> lookup router2 <br>29: from all fwmark 0x1 lookup router1
<br>30: from all fwmark 0x2 lookup router2 <br>32766: from all lookup main <br>32767: from all lookup default <br><br>Iptables Mark rule:<br><br>CSD0101LNX00F:~# iptables-save |grep MARK<br>-A PREROUTING -i eth2 -j MARK --set-mark 0x3
<br><br>Iptables NAT rules:<br><br>CSD0101LNX00F:~# iptables-save |grep POSTROUTING<br>:POSTROUTING ACCEPT [55:4157]<br>-A POSTROUTING -s <a href="http://172.31.0.0/255.255.252.0">172.31.0.0/255.255.252.0</a> -o eth0 -j MASQUERADE
<br>-A POSTROUTING -s <a href="http://172.31.0.0/255.255.252.0">172.31.0.0/255.255.252.0</a> -o eth1 -j SNAT --to-source <a href="http://200.253.10.137">200.253.10.137</a> <br><br>