06 October 2011

Setting MikroTik RouterOS V2.9 Load Balance Via Winbox

Load balancing is a computer networking methodology to distribute workload across multiple computers or a computer cluster, network links, central processing units, disk drives, or other resources, to achieve optimal resource utilization, maximize throughput, minimize response time, and avoid overload. Using multiple components with load balancing, instead of a single component, may increase reliability through redundancy. The load balancing service is usually provided by dedicated software or hardware, such as a multilayer switch or a Domain Name System server. (wikipedia)

or

Load balancing is implemented as equal cost multipath routing. With load balancing two or more gateways can be specified for the same destination. That applies to the default one as well. Equal cost multipath routes can be created by routing protocols (RIP or OSPF), or by adding a static route with multiple gateways. The routing protocols may create routes with equal cost automatically, if the cost of the interfaces is adjusted properly.  (http://www.mikrotik.com/solutions.php)


i have two internet connection with different speed 1mb and 384kb, both connected with load balance and still testing but this far still ok.

the steps are :
  1. Setting ip address
  2. setting mangle
  3. setting route
  4. setting your PC
1. Setting IP Address 
set interfaces  as lokal (eth0) , internet1 (eth1) , and internet1(eth2)
lokal : 192.168.0.1 (this is your mikrotik ip address)
internet1 : 192.168.1.2 (set your first modem as 192.168.1.1)
internet2 : 192.168.2.2 (set your second modem as 192.168.2.1)

2. Setting mangle
setting connection for internet 1
ip firewall mangle add chain=prerouting in-interface=lokal connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=satu passthrough=yes;



next setting
ip firewall mangle add chain=prerouting in-interface=lokal connection-mark=satu action=mark-routing new-routing-mark=satu passthrough=no;






then
ip firewall mangle add chain=prerouting in-interface=lokal connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=dua passthrough=yes;


last mangle
ip firewall mangle add chain=prerouting in-interface=lokal connection-mark=dua action=mark-routing new-routing-mark=dua passthrough=no;


3. Setting Route
ip route add gateway=<first gateway> mark=satu;
ip route add gateway=<the other gateway> mark=dua;

make sure the basic connection for mikrotik is already set, DNS and NAT

this is the results

continue....

6 comments:

Anonymous said...

Nice tutorial. What about the setup of the ISPs cpes. What kind of setup do they need to have? Port forward, pppoe?

Anonymous said...

Ні theге to every one, thе contents preѕent at thiѕ sitе are truly
amazing foг people knowledge, well, keеp up the gooԁ work fellows.


My blog post ... resistor Color code calculator

Anonymous said...

Hοωԁy would you mind statіng ωhіch blog
platform you're working with? I'm going to ѕtart my
own blog in the nеaг future but I'm having a hard time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I'm lookіng for something cοmpletely unique.
P.S Му apologies for gеtting off-tоpіc but I
hаd tо ask!

Feel fгeе to visit my webpagе:
http://cust.static.46-14-229-145.swisscomdata.ch

Anonymous said...

Fоr most uρ-to-datе informatіon уou have tο visit
ωeb and on woгld-wide-web I found this ѕite aѕ а best
web site for latеѕt updatеs.

My wеbsite :: resistance in Parallel 

Anonymous said...

Hellο, і think that i saw you viѕited my blog ѕo i
came to “retuгn the favor”.I am trying to find thіngs to еnhance my site!
I suppoѕe its oκ tο use a few
of yοur ideas!!

Feel fгee to surf to my web ρage; Resistoг Resistance
(occupedia.nl)

Unknown said...

http://www.mr-ekoapriadi.blogspot.com/2013/05/mikrotik-mangle-port-game-online.html