LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   load balancing (https://www.linuxquestions.org/questions/linux-networking-3/load-balancing-802840/)

cyph3r 04-19-2010 07:50 AM

load balancing
 
eth1 = Wan1 (Fiber)
eth2 = Wan2 (DSL)
eth0 = Lan

i want to do load balancing for web sites ,
i want to run youtube.com and facebook.com on eth2(dsl),
and all other sites except facebook and youtube.com run on eth1(Fiber)


how can i do this ????

TB0ne 04-19-2010 08:11 AM

Quote:

Originally Posted by cyph3r (Post 3940261)
eth1 = Wan1 (Fiber)
eth2 = Wan2 (DSL)
eth0 = Lan

i want to do load balancing for web sites ,
i want to run youtube.com and facebook.com on eth2(dsl),
and all other sites except facebook and youtube.com run on eth1(Fiber)
how can i do this ????

You set up Squid.

And what you're describing isn't load balancing. Might also help when you ask a question, to provide some details. Version/distro of Linux, etc....

troop 04-19-2010 08:20 AM

or you can do this by routing.
for instance, facebook.com:
Code:

ip route add -net 69.63.176.0/20 dev eth2
route for all other sites:
Code:

ip route add default dev eth1

cyph3r 04-27-2010 10:44 AM

Quote:

Originally Posted by troop (Post 3940293)
or you can do this by routing.
for instance, facebook.com:
Code:

ip route add -net 69.63.176.0/20 dev eth2
route for all other sites:
Code:

ip route add default dev eth1

good

what about youtube.com ??

TB0ne 04-27-2010 11:16 AM

Quote:

Originally Posted by cyph3r (Post 3949443)
good

what about youtube.com ??

You replace the Facebook address with the YouTube address, obviously.

virtualCoder 04-27-2010 04:40 PM

Probably also remove all other routes on eth2 to stop the rest of the traffic from going through it.
Similarly, remove route to the addresses for eth2 from eth1.

Hmm, I'm not sure what happens if the same route is mentioned for two ethernet interfaces.


All times are GMT -5. The time now is 11:38 AM.