Load-banancing. two ip's from one isp

Linux Advanced Routing and Traffic Control

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

 



--------------eth0---80.48.56.70----------    -------------80.48.56.65  ISP 
|    my	|										   router1
|		|										   	
|    linux	|										   
|		|										   router2
 ------------eth1---192.168.200.10-----    ----------------192.168.1.1 ISP

I've two ip from my isp one public and one internal. ISP have two routers router1 is gw for public ip and router2 is gw for internal ip's and do nat of connections. I'm trying to set up load-balanicng. I have only on box and I don't do any nat on my computer

I was trying many scripts and how-to's
http://lartc.org/howto/lartc.rpdb.multiple-links.html
http://www.ssi.bg/~ja/nano.txt

I alsow try to patch kernel 
http://www.ssi.bg/~ja/patch-2.6.14-ja1.diff

but I can't set up it propertly. This is my script:

#         ip route replace 192.168.0.0/16 proto static dev eth1 src 192.168.200.10 table wew
         ip route replace default via 192.168.1.1 dev eth1 src 192.168.200.10 proto static table wew
         ip route append prohibit default table wew metric 1 proto static

#         ip route replace 80.48.56.64/26 proto static dev eth0 src 80.48.56.70 table zew
         ip route replace default via 80.48.56.65 dev eth0 src 80.48.56.70 proto static table zew
         ip route append prohibit default table zew metric 1 proto static

        ip rule add prio 10 table main
        ip rule add prio 100 table brama
         ip rule add prio 50 from 80.48.56.64/26 table zew
         ip rule add prio 60 from 192.168.0.0/16 table wew

ip route del default table main
ip route replace default table brama scope global nexthop via 192.168.1.1 dev eth1 nexthop via 80.48.56.65 dev eth0
ip route flush cache

rp_filter is set to 0
forward is set to 1

I've trayed other configurations but always I have thesame problem:
some packets are sent with wrong src ip via interface
via eth0 with 192.168.200.10
via eht1 with  80.48.56.70
but as I know they souldn't

I make simple test:

 lucy linux # ip ro ge 80.48.56.3
80.48.56.3 via 80.48.56.65 dev eth0  src 192.168.200.10
    cache  mtu 1500 advmss 1460 metric 10 128

lucy linux # ip ro ge 80.48.56.2
80.48.56.2 via 80.48.56.65 dev eth0  src 80.48.56.70
    cache  mtu 1500 advmss 1460 metric 10 128

lucy linux # ip ro ge 80.48.56.1
80.48.56.1 via 80.48.56.65 dev eth0  src 192.168.200.10
    cache  mtu 1500 advmss 1460 metric 10 128

lucy linux # ip ro ge 80.48.56.4
80.48.56.4 via 80.48.56.65 dev eth0  src 80.48.56.70
    cache  mtu 1500 advmss 1460 metric 10 128

As you can see the load-balancing don't work. Only src ip is changing.. I suppose that the gw should alsow change in each "hop" just like src ip.
I think that is very wrong but I can't find answer why. Maby I forgot about something in kernel ... i don't now. What is wrong? What should i do to make it working?

My post on the gentoo forum
http://forums.gentoo.org/viewtopic-t-447016.html
here is more information but I belive that the main problem is shown here --> the wrong src ip and/ or static gw.

I'm sorry for my english, I know it's bad.

Pozdrawiam
Szymon Mroofka


----------------------------------------------------------------------
Jak sie go pozbyc? >>> http://link.interia.pl/f191a

_______________________________________________
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