load balancing

Taking care of your Linux box.
Post Reply
cyph3r
Lance Naik
Posts: 46
Joined: Tue Jan 22, 2008 1:27 am

load balancing

Post by cyph3r »

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


mujha load balancing karni hai web sites ki,
eth2(dsl) is per mai youtube.com or facebook.com chalana chahta hoon,
or eth1 per all site except facebook and youtube.com


how can i do this ????
Regards,
Mehmood Ahmed |cyph3r|
(+92)345-2835810
E-mail:cyph3r.07@hotmail.com
AamirAkbar
Lance Naik
Posts: 33
Joined: Mon Sep 09, 2002 12:53 am
Location: Islamabad
Contact:

Post by AamirAkbar »

You mean to use all three in parallel.
Br
Aamir(MS iiu islambad.)
Back Office Engineer
http://www.nsn.com/
(+ 92 345 200 1132)
cyph3r
Lance Naik
Posts: 46
Joined: Tue Jan 22, 2008 1:27 am

Post by cyph3r »

yes parallel
Regards,
Mehmood Ahmed |cyph3r|
(+92)345-2835810
E-mail:cyph3r.07@hotmail.com
compucated
Naik
Posts: 75
Joined: Mon Oct 13, 2003 5:06 am
Location: Karachi, Pakistan
Contact:

Post by compucated »

4.2. Routing for multiple uplinks/providers
syedbilalmasaud
Naib Subedar
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
Location: Attock
Contact:

Post by syedbilalmasaud »

you need to do policy based routing with ip route and define the destications for youtube and facebook or whatever you want it will go from DSL interface and rest of all traffic will go from fiber, for IP route please visit as above http://www.lrtc.org
Cheers :)

:D B I L A L :D
cyph3r
Lance Naik
Posts: 46
Joined: Tue Jan 22, 2008 1:27 am

Post by cyph3r »

yes bilal
i want to do this ,as u say !!!!
and give me example
but ur link is wrong ,
plzz correct it :)
Regards,
Mehmood Ahmed |cyph3r|
(+92)345-2835810
E-mail:cyph3r.07@hotmail.com
syedbilalmasaud
Naib Subedar
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
Location: Attock
Contact:

Post by syedbilalmasaud »

Cheers :)

:D B I L A L :D
mudasir
Captain
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Location: Dubai
Contact:

Post by mudasir »

AOA,

Dear if even you are able to set routing table properly, how will you differ the traffic, you should know complete IP's of both facebook and YouTube.

You can use content filtering with IPTABLES, it might be able to help you out. SET MARK on every packet containing content facebook and youtube, it might work.

Have not tried it yet, but it might.
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com
cyph3r
Lance Naik
Posts: 46
Joined: Tue Jan 22, 2008 1:27 am

Post by cyph3r »

nice !!

can u plzz give me some examples ????
i havent try this !
Regards,
Mehmood Ahmed |cyph3r|
(+92)345-2835810
E-mail:cyph3r.07@hotmail.com
mudasir
Captain
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Location: Dubai
Contact:

Post by mudasir »

AOA,

Something like this might work

Code: Select all

iptables -A INPUT -i $NETWORK -m string --string "facebook" -j MARK --set-mark 1 
iptables -A INPUT -i $NETWORK -m string --string "youtube" -j MARK --set-mark 2
Then route specific fwmark to specific routing table.
Again it is just an example, i have not tried it anywhere, you can use google for this.
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com
nasacis
Battalion Havaldaar Major
Posts: 269
Joined: Sat Dec 13, 2003 3:58 pm
Location: Faisalabad
Contact:

Post by nasacis »

use PFSense
Nafees Ahmed
Cell: +92.300.8653568
UAN: 041-111432432
Nexlinx Faisalabad
www.nexlinx.net.pk
nafees29@gmail.com
Post Reply