Load balancing

21 views
Skip to first unread message

Magus

unread,
Mar 16, 2011, 7:06:07 PM3/16/11
to DealExtreme NAS
Is there a way to add load balancing in NAS (busybox)?
I did try some scripts I got from google, but all of then fail at some
point (iptables missing, or some option not available in busybox).

But it didn't stop me from having crazy ideas:
I got two logical networks working in the same physical network:
NetworkA = 192.168.254.1/16, gateway is 192.168.146.1
NetworkB = 10.0.0.2/24, gateway is 10.0.0.1

So my first step was to add the second address to interface by adding
a virtual one:
ifconfig eth0:0 10.0.0.2 netmask 255.255.255.0
Works perfectly, I can ping the gateway from NetworkB without any
problems.

But for internet only gateway from NetworkA is used. Next step was to
change routing (remove old and add new ones):
route del default gw 192.168.146.1
route add -net 0.0.0.0/1 gw 192.168.146.1
route add -net 128.0.0.0/1 gw 10.0.0.1

Now, every packet with destination from 0.0.0.0 to 127.255.255.255
must go through gateway A, and from 128.0.0.0 to 255.255.255.255 must
go through gateway B.

The main problem is, for example, if an external connection request
comes from address 130.125.25.12 through gateway A, the reply will
follow the gateway B, and so the connection will never happen. So it
did not work that well, but better than only gateway A or B alone.

Any ideas how to 'fix' this problem or how to correct use load
balancing?

Thanks in advice,
Willian

Gabriel Fernandes de Almeida

unread,
Mar 17, 2011, 8:34:42 AM3/17/11
to dealextr...@googlegroups.com
Well, I can't help you now, but I have to say that it is a crazy and interesting idea.


--
You received this message because you are subscribed to the Google
Groups "DealExtreme NAS" group.
To post to this group, send email to dealextr...@googlegroups.com
To unsubscribe from this group, send email to
dealextreme-na...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dealextreme-nas-?hl=en

Gabriel Fernandes de Almeida

unread,
Jun 13, 2011, 10:31:21 AM6/13/11
to dealextr...@googlegroups.com
Magus, with the USBNET adapter, I think your idea is now easier to implement. You can see it on http://code.google.com/p/snake-os/issues/detail?id=11
Reply all
Reply to author
Forward
0 new messages