LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-19-2010, 08:50 AM   #1
cyph3r
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
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 ????
 
Old 04-19-2010, 09:11 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,077

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by cyph3r View Post
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....
 
Old 04-19-2010, 09:20 AM   #3
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
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
 
Old 04-27-2010, 11:44 AM   #4
cyph3r
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by troop View Post
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 ??
 
Old 04-27-2010, 12:16 PM   #5
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,077

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by cyph3r View Post
good

what about youtube.com ??
You replace the Facebook address with the YouTube address, obviously.
 
Old 04-27-2010, 05:40 PM   #6
virtualCoder
Member
 
Registered: Sep 2007
Distribution: Ubuntu
Posts: 33

Rep: Reputation: 15
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.
 
  


Reply

Tags
balancing, load


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Balancing jjrowan Linux - Networking 1 03-06-2009 02:02 PM
Load balancing HelpMe2877 Linux - Networking 1 06-06-2008 04:24 PM
Load Balancing Winanjaya Linux - Networking 3 10-03-2006 09:13 AM
Load Balancing laurent01 Linux - Networking 6 02-22-2006 03:38 PM
How to do load balancing tkt Linux - Networking 0 04-27-2005 02:22 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration