Community discussions

MikroTik App
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Step by step Load balancing in v4.4 helpfull for many users.

Tue Jan 19, 2010 9:41 am

HI,

First of all many thanks to Mikrotik professionals and from a long time there is a many problem by the user in implementing the right and exact load balancing i will explain my network senario with image and also i will give the requests below what i exactly nedded

Image

sorry for my bad diagram but i think u guys will understand, I came to know tht ECMP will drop the connections on masquerade network , So please give me the detailed GUI config if possible , if cant atlease command line config but please give the step by step detailed

Once again i appreciate the experts and professional for making this forum success

Thanks,
Sathish
 
Pada
Member Candidate
Member Candidate
Posts: 150
Joined: Tue Dec 08, 2009 11:37 pm
Location: South Africa, Stellenbosch

Re: Step by step Load balancing in v4.4 helpfull for many users.

Tue Jan 19, 2010 5:20 pm

You could do policy based load balancing. Eg. splitting the 300 users into 3 groups of 100 - 1 group per WAN connection. See http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways
This is not the ideal solution though.

Here's an old forum thread where persistent load balancing using ECMP has been discussed:
http://forum.mikrotik.com/viewtopic.php?f=2&t=29464
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Thu Jan 21, 2010 3:35 pm

Please give me the response , as iam waiting for the solution from along time

Thanks,
Sathish
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Fri Jan 22, 2010 6:38 pm

 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Fri Jan 22, 2010 8:31 pm

Thanks for your kind reply Chupka, As i heard ECMP will flush routing table and disconnect clients for every 10min

and NTH is not a perfect load balance as we specify one fied GW for each clients if load on one GW will not be balanced automatically as this leads to bandwidth wastage on another GW

please try to help me in configuring ECMP like balancing without Dropping the connections for evry couple of minutes
Thanks in advance for skillfull answer , as there is no scope of using fully routed network in my case

Thanks,
Sathish
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Fri Jan 22, 2010 9:04 pm

http://wiki.mikrotik.com/wiki/PCC#Appli ... _Balancing have nothing to do with ECMP and Nth

you may use per-connection-classifier=both-addresses-and-ports for ECMP-like balancing, but without flushes
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sat Jan 23, 2010 8:52 pm

Thanks,let me try it out soon

Sathish
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Mon Jan 25, 2010 6:22 pm

Chupka iam having A small doubt in the above concept iwant use seperate Routerboard for load balance
i want to do the load balance through tht dedicated


WAN's > Routerboard (PCC) > Mikrotik main server > local network

So after the routerboard i will attach my server, so will it work i mean PCC load balance because all the requests will come from only one IP from mikrotik main server

the above senario works, please suggest me

Thanks
sathish
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Mon Jan 25, 2010 7:49 pm

sure it will work, if you will use 'both-addresses-and-ports' classifier

but be aware about ECMP problems: banking sites may deny your users, etc...
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Wed Jan 27, 2010 3:02 pm

ECMP ? i dont want to configure ECMP i want follow your instruction and want to implement PCC, dou you mean banking sites also denies the users if i use PCC ?

And also please explain how to configure with example , please this may help the people a lot

i mean you said clasifier etc please explain cleary thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Wed Jan 27, 2010 4:48 pm

do you do NAT on 'Mikrotik main server'?

explaination is in Manual: http://wiki.mikrotik.com/wiki/PCC#Theory
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Wed Jan 27, 2010 7:41 pm

Yes , i do NATing
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Wed Jan 27, 2010 7:44 pm

And also if i use 8 WAns how many group i have to divide

8/0 to 8/7

is the above senario is correct

Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Wed Jan 27, 2010 8:41 pm

Yes , i do NATing
hmmm... to what addresses do you perform NATting?.. if those lines are adsl lines - you should NAT on the router the lines are connected to...
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Thu Jan 28, 2010 7:37 pm

I will get 8 WANS which are directly connected to internet cloud or may be ADSL but i will terminate and connect with the ADSL routers (DLINK) because in our location ADSL are provide through 1 pair copper ordinary telephone line which cant connect to Mikrotik directly So we will use some kind of ADSL routers and will dail automatically connects when they are switched on

So please proceed with the solution

My local network should be like 10.10.0.0/16

and WAN's Like 192.168.1.1 2.1 3.1 4.1 5.1 6.1......etc

So ihave to masquerade the connection

please post the solution
Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Thu Jan 28, 2010 11:16 pm

WAN's Like 192.168.1.1 2.1 3.1 4.1 5.1 6.1......etc
so, you will NAT twice: first on router, then on modem... it's not good practice :) I think, you should move PCC to your main router. but if you will do your scheme - then use 'action=same' instead of 'action=srcnat' on the main router - and all should work fine, on RB you should just mark routing according to PCC with 'both-addresses' classifier
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Fri Jan 29, 2010 4:29 pm

Sorry confused , can u please tell me with much more clarity, iwill explain below which i understand please confirm me y or n

Image

And abt my network info. i have to do natting compulsory in ADSL router as because my telecom people assigns public IP to DLink through PPPOE from normal telephone cable which i cant connect directly to mikrotik

and after tht please explain me how to skip 2nd natting in main mikrotik router, But should assign same network to all the lan people with perfect load balance

And i skipped RB in the middle because as u suggested to lower thr lookup's , as i came to know tht mikrotik has realsed 4port ethernet card so i skipped RB in the middle and i want to directly connect to main router

So, please give me much more suggestins to run my network reliably
Thank you very much for having much more time on my problem
i appreciate you tht u are giving more solution to the questions which are posing in this forums
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Fri Jan 29, 2010 5:51 pm

i have to do natting compulsory in ADSL router as because my telecom people assigns public IP to DLink through PPPOE from normal telephone cable which i cant connect directly to mikrotik
your modems should be in Bridge mode, so that your router can establish PPPoE connections by himself

to connect many modems in Bridge mode, you need either many ethernet interfaces, or just a switch that supports VLANs =)
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sat Jan 30, 2010 7:25 am

Thank you very much , i will get the modem which supports Bridge mode which assigns public ip directly to Mikrotik router

i will attach 2 * 4 port ethernet cards and there will be one onboard ethernet card which will used for lan connections

and 8 ports for wans and will do natting in the main router only let me find how it goes , if anything doubtfull please support me

Thanks,
Sathish
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sat Jan 30, 2010 7:25 am

Thank you very much , i will get the modem which supports Bridge mode which assigns public ip directly to Mikrotik router

i will attach 2 * 4 port ethernet cards and there will be one onboard ethernet card which will used for lan connections

and 8 ports for wans and will do natting in the main router only let me find how it goes , if anything doubtfull please support me

Thanks,
Sathish
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sat Jan 30, 2010 7:31 am

Please Suggest the model of the ADSL2+ modems which supports Bridge mode and which helpfull to assign public ips to PC

Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sat Jan 30, 2010 1:25 pm

I think, any modem can work in Bridge mode - it's mode where the modem is just transparent converter of ethernet to adsl, without any IP functions
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sun Jan 31, 2010 9:04 pm

Chupka a small conformation, can i use only one ethernet card for all 8 wans and use VLAn in the mikrotik router




8 wans >>. normal 10portswitch(unmnageble)>>> Mikrotik router 1 + 7VLANs >>>>> clients


is it works

thanks
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Step by step Load balancing in v4.4 helpfull for many users.

Sun Jan 31, 2010 9:31 pm

You'd need a VLAN capable switch to plug the modems into. Each modem is on a separate VLAN and you connect the router to the switch on a link that carries all 8 WAN VLANs. Those 8 VLANs have nothing to do with how you deliver services to the clients behind the router.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many users.

Mon Feb 01, 2010 1:43 pm

or maybe your modems support VLANs - then unmanageable switch is enough. as a rule, they pass VLAN tags transparently
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Mar 30, 2010 3:54 pm

Hi chupka , thanks for your great solution and can u please clarify me wht to do with the load balance config if WANS are assigned the Ip thorugh DHCp


Please tell me the solution it may help me alot

Thanks
Sathish
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Mar 30, 2010 4:21 pm

well... default gateway should be the same for all WANs, is it?
 
sathishsa
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri Sep 04, 2009 12:08 am

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Mar 31, 2010 12:08 pm

Hi,

Thanks for your kind and fast reply

Please give me both the solutions, i.e what if the gateway is same for all wan's
and also what if not

Thanks
sathish
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Sun Apr 11, 2010 2:59 am

this reply is not so fast =)

if your gateways are static, you should use '/ip route add gateway=ip_address%interface' syntax when adding your routes via Terminal
 
lukkes
Member Candidate
Member Candidate
Posts: 177
Joined: Mon Jun 16, 2008 2:12 am
Location: Venezuela
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Dec 07, 2010 5:45 am

hi chupaka, what about the dhcp taken gateways when two or more adsl have the same gateway? how should i use your command?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Dec 08, 2010 8:33 pm

create static routes - you can't do that with dynamically created
 
lukkes
Member Candidate
Member Candidate
Posts: 177
Joined: Mon Jun 16, 2008 2:12 am
Location: Venezuela
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Dec 08, 2010 9:51 pm

hmmm so i should program an script that take the default gateway and create the static route, but when run this script? that's the problem...
 
User avatar
SamCurtis
newbie
Posts: 29
Joined: Sat Nov 20, 2010 2:23 am

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Dec 09, 2010 7:38 am

FAIL Ros ver 3.30

"add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local"

ERROR: LOCAL IS NOT A VALID INTERFACE
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Dec 09, 2010 9:21 am

FAIL Ros ver 3.30

"add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local"

ERROR: LOCAL IS NOT A VALID INTERFACE
Do you really have an interface called "Local"? what happens if you hit Tab twice before entering the interface name? It should give you a list of valid options
 
User avatar
SamCurtis
newbie
Posts: 29
Joined: Sat Nov 20, 2010 2:23 am

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Dec 09, 2010 12:36 pm

k, now I just feel retarted, lol, sorry

The question is, can I use an IP instead of an interface....

Im trying to load balance two gateways with two static adresses on a single interface and a dhcpserver on another and my switch doesnt support Vlans, baaawwwww there must be a way, but I have a thread open on that one so Ill take my props down teh road,
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Dec 09, 2010 1:02 pm

You are using an old version, you can do it in newer versions, as per the manual:
http://wiki.mikrotik.com/wiki/Manual:IP ... _a_gateway
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Jan 05, 2011 9:14 am

dear sir


i have 5 adsl load balance in one mikrotik..

and other mikrotik is 10 mbps with real ip

how to merge both bandwidth and distribute to my another ppppoe mikrotik
(10mbps ADSL +10mbps Realip )=20mbps...


Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Sat Jan 08, 2011 6:49 pm

need more details =)

generally: use 5 more PCC rules, marking all with the same routing-mark, and send those packets to your 10M line
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Sun Jan 09, 2011 12:12 am

hi chupaka

this load balance is working very well with 5 adsl dynamic pppoe ...
its working very nice in mikrotik.....

here is the settings ...

Total nic 6
>>5 ADSL nic is connected 5 ADSL Modem (bridge mode)

[admin@Adsl] /ip firewall mangle> pr
Flags: X - disabled, I - invalid, D - dynamic
0 I ;;; ADSL1 PPPOE 1
chain=input action=mark-connection new-connection-mark=adsl1
passthrough=yes in-interface=pppoe-out1

1 I chain=input action=mark-connection new-connection-mark=adsl2
passthrough=yes in-interface=pppoe-out2

2 I chain=input action=mark-connection new-connection-mark=adsl3
passthrough=yes in-interface=pppoe-out3

3 I chain=input action=mark-connection new-connection-mark=adsl4
passthrough=yes in-interface=pppoe-out4

4 I chain=input action=mark-connection new-connection-mark=adsl5
passthrough=yes in-interface=pppoe-out5

2nd Rules
0 ;;; ==ALL OutPut ADSL 1
chain=output action=mark-routing new-routing-mark=adsl1 passthrough=no
connection-mark=adsl1

11 ;;; ADSL2
chain=output action=mark-routing new-routing-mark=adsl2 passthrough=no
connection-mark=adsl2

12 ;;; ADSL3
chain=output action=mark-routing new-routing-mark=adsl3 passthrough=no
connection-mark=adsl3

13 ;;; ADSL4
chain=output action=mark-routing new-routing-mark=adsl4 passthrough=no
connection-mark=adsl4

14 ;;; ADSL5
chain=output action=mark-routing new-routing-mark=adsl5 passthrough=no
connection-mark=adsl5

then /ip route

# DST-ADDRESS PREF-SRC GATEWAY DISTANCE


10 0.0.0.0/0 pppoe-out1 1
pppoe-out2
pppoe-out3
pppoe-out4
pppoe-out5


ADC 10.10.0.0/18 10.10.0.6 AdslMain 0 (Total 10mbps)

each adsl have 2 mbps bandwidth


# NAME MTU MAC-ADDRESS ARP
0 R adsl1 1500 00:00:00:00:00:00 enabled
1 R adsl2 1500 00:cc:cc:cc:dd:99 enabled
2 R adsl3 1500 00:cc:cc:B5:D9:25 enabled
3 R adsl4 1500 00:E0:cc:cc:09:BC enabled
4 R adsl5 1500 00:27:19:cc:cc:cc enabled
5 R AdslMain 1500 00:04:75:cc:cc:cc enabled



AdslMain 0 (Total 10mbps)
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Mon Jan 10, 2011 1:52 am

so you have simgle ECMP route with 5 gateways (of 2 Mbits) and want to add one more gateway with 10 Mbits. then you need to add that gateway 5 times, like this:
gateway=pppoe-out1,pppoe-out2,pppoe-out3,pppoe-out4,pppoe-out5,pppoe-10M,pppoe-10M,pppoe-10M,pppoe-10M,pppoe-10M
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Jan 11, 2011 3:55 am

dear chupaka

can i merge this adsl bandwidth to another Realip gateway ?which have already 10mbps Bandwidth (static 1 Reali
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Jan 11, 2011 3:59 pm

just replace "pppoe-10M" with necessary gateway (interface or IP address)
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Jan 25, 2011 12:46 am

i did for 5 pppoe but how to add one static IP (gateway) here.. i have 6 lancards!

my static Realip gateway is 10.10.0.1
and all adsl pppoe gateway is dynamic

how to load balance pppoe-out1 pppoe-out2,pppoe-out3,pppoe-out4,pppoe-out5, with 10.10.0.1 here..

pls give me a example..
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Sun Feb 13, 2011 10:18 pm

here we go =)

gateway=pppoe-out1,pppoe-out2,pppoe-out3,pppoe-out4,pppoe-out5,10.10.0.1

sorry for the long delay - my vacation in Egypt =)
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Mar 10, 2011 10:00 pm

Welcome back bro
im sorry i could not reply u

can u pls tell me step by step

i have been trying for long to do this :(
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Fri Mar 11, 2011 2:15 am

trying what? what exactly you did and what was not working?

I'm on MUM now, but it didn't help me to become more telepathistic :(
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Mar 23, 2011 8:47 pm

Dear Sir

i have load balance with 6 ADSL PPPOE connection..(using ecmp load balance) in one Mikrotik using 4.17 (Level 4)Licence version

And all of my users are connected on Anotehr Level 5 PPPOE server using mikrotik 5.0rc11
(this pppoe Servers gateway is 10.10.0.1 (another Mikrotik gateway Different ISP) Level 4 Licence....


ALL Server is Connected in my 1 Vlan
And users are connected another Vlan

Now i can Redirect only http traffic through another Squid Server (squid server gateway is (ADSL Mikrotik |Router)which is connected on this Vlan



but i cannot pass any other traffic to my ADSL router why...

can u pls tell me how to do it?

thanks...
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Mar 24, 2011 5:58 pm

be more specific. make a drawing. I cannot understand your (new?) problem
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Apr 05, 2011 2:13 pm

Dear Sir

i have load balance using pcc rule in my mikrotik and its going nice ..the following rules are given

Now I want to merge or add more (adsl dyanamic pppoe 1 mbps connection) bandwidth here ....

or i want to route some traffic through new adsl pppoe bandwidth...


0 chain=srcnat action=masquerade out-interface=buct1

1 chain=srcnat action=masquerade out-interface=adsl2



;; Connection MARK
chain=input action=mark-connection new-connection-mark=buct1_conn
passthrough=yes in-interface=buct1

chain=input action=mark-connection new-connection-mark=adsl2_conn
passthrough=yes in-interface=adsl2

chain=output action=mark-routing new-routing-mark=to_adsl2
passthrough=yes connection-mark=adsl2_conn

chain=output action=mark-routing new-routing-mark=to_buct1
passthrough=yes connection-mark=buct1_conn

chain=prerouting action=accept dst-address=10.111.0.0/24
in-interface=Local

chain=prerouting action=accept dst-address=10.112.0.0/24
in-interface=Local

chain=prerouting action=accept dst-address=10.113.0.0/24
in-interface=Local

;;; Per Connection Classifier..
chain=prerouting action=mark-connection new-connection-mark=buct1_conn
passthrough=yes dst-address-type=!local in-interface=Local
per-connection-classifier=both-addresses:2/0

chain=prerouting action=mark-connection new-connection-mark=adsl2_conn
passthrough=yes dst-address-type=!local in-interface=Local
per-connection-classifier=both-addresses:2/1

chain=prerouting action=mark-routing new-routing-mark=to_buct1
passthrough=yes in-interface=Local connection-mark=buct1_conn

chain=prerouting action=mark-routing new-routing-mark=to_adsl2
passthrough=yes in-interface=Local connection-mark=adsl2_conn
====

1 A S 0.0.0.0/0 reachable 10.112.0.1 1 adsl2
2 S 0.0.0.0/0 reachable 10.112.0.1 2 adsl2
3 A S 0.0.0.0/0 reachable 10.111.0.1 1 buct1
4 A S 0.0.0.0/0 reachable 10.111.0.1 1 buct1
8 ADC 10.10.0.0/18 10.10.0.10 0 Local
9 ADC 10.111.0.0/24 10.111.0.2 0 buct1
10 ADC 10.112.0.0/24 10.112.0.2 0 adsl2
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Apr 05, 2011 8:11 pm

is anybody can tell me

if i load balance 6 mbps +15mbps +1 mbps Link what pcc will be set?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Apr 05, 2011 8:18 pm

I wouldn't recommend doing that at all. Leave out the 1Mbps link and use it just as a backup route if the 15Mbps and 6Mbps links go down.

To spread evenly across 15/6, use 5 rules that select the 15Mbps link, and 2 that select the 6Mbps link. Smallest common denominator is 3, 15/3 = 5, 6/3 = 2.
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: Step by step Load balancing in v4.4 helpfull for many us

Tue Apr 05, 2011 10:15 pm

hmmmm very help full
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Apr 06, 2011 11:40 am

can u pls tell me also 3/1 3/2 3/0 and 6 mbps + 2 mbps load balance settings with detail
im using 5.0 stable Level 5 (Licenced)Mikrotik

thanks
You do not have the required permissions to view the files attached to this post.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Step by step Load balancing in v4.4 helpfull for many us

Wed Apr 06, 2011 5:14 pm

This is getting ridiculous. You are asking for help with math they teach to 8 year olds.

Each line for PCC is one unit. Find the lowest common denominator, and add the appropriate number of lines.

If you have a 6 meg circuit and a 2 meg circuit the lowest common denominator is 2. 6/2 = 3, 2/2 = 1, so you need 3 lines for the 6 meg circuit and 1 line for the 2 meg circuit.

Read the PCC wiki manual until you understand how it works. The manual is VERY clear in how it works.
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Thu Apr 07, 2011 7:01 am

yeah sometimes we asked absurd ludicrous question because of confusion also cudnt get detailed answer from here.. Like :)





anywys

If the fraction is 18/42 then simpler equivalent fractions are 9/21, 3/7 and 6/14.

However there are an infinity of equivalent fractions if the value of the denominator is increased :- 21/49, 24/56, 27/63, 30/70 etc.

here is the dEtails which is helpfull for many users may be ..


PCC Load Balance With 3 links adsl modem with bridge Mode (2 ISP Bandiwidth is 8 Mbps, 1 ISP BandWidth is 2mb)>Total 3 ISP with 18 mbps


ether1 = Local (Local Interface >Clients Access).
ether2 = wlan1 (Interface ISP1 With 8mbps Bandwidth)
ether3 = wlan2 (Interface ISP2 With 8mbps Bandwidth)
ether4 = wlan3 (Interface ISP3 With 2 mbps Bandwidth)

Total Bandwidth IS 18 mbps

Local IP:10.10.0.1/16




Interface wlan1 = 192.168.1.2/24 (IP no Adsl modem = 192.168.1.1) (using Bridge Mode)
Interface wlan2 = 192.168.2.2/24 (IP no Adsl modem = 192.168.2.1) (using Bridge Mode)
Interface wlan3 = 192.168.3.2/24 (IP no Adsl modem = 192.168.3.1) (using Bridge Mode)




/ip address


add address=10.10.0.1/16 broadcast=10.10.0.255 comment="Local IP Address" disabled=no \
interface=Local network=10.10.0.0


add address=192.168.1.2/24 broadcast=192.168.1.255 comment="" disabled=no \
interface=wlan1 network=192.168.1.0 (Those Address For Access to your ADSL Modem If u dont Want.. U can Disable)

add address=192.168.2.2/24 broadcast=192.168.2.255 comment="" disabled=no \
interface=wlan2 network=192.168.2.0 (Those Address For Access to your ADSL Modem If u dont Want... U can Disable)

add address=192.168.3.2/24 broadcast=192.168.3.255 comment="" disabled=no \
interface=wlan2 network=192.168.3.0 (Those Address For Access to your ADSL Modem If u dont Want.. U can Disable)



/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=10240KiB \
max-udp-packet-size=512 primary-dns=8.8.8.8 secondary-dns=\
8.8.4.4


/interface pppoe-client

add ac-name="" add-default-route=no allow=pap,chap comment=\
"PPPOE Cconnection 1-ISP1-wlan1(8Mbps Link)" dial-on-demand=no disabled=no interface=wlan1 \
max-mru=1480 max-mtu=1480 mrru=disabled name=pppoe-wlan1 password=xxxx \
profile=default service-name="" use-peer-dns=no user=details@perconnectionclassifierLoadbalance




add ac-name="" add-default-route=no allow=pap,chap comment=\
"PPPOE Cconnection 1-ISP2-wlan2(8Mbps Link)" dial-on-demand=no disabled=no interface=wlan1 \
max-mru=1480 max-mtu=1480 mrru=disabled name=pppoe-wlan2 password=xxxx \
profile=default service-name="" use-peer-dns=no user=schoolboy@perconnectionclassifierLoadbalance



add ac-name="" add-default-route=no allow=pap,chap comment="PPPOE connection3-ISP1 3- wlan3(2Mbps Link)" dial-on-demand=no disabled=no \
interface=wlan1 max-mru=1480 max-mtu=1480 mrru=disabled name=pppoe-wlan3 password=xxxx \
profile=default service-name="" use-peer-dns=no user=details@perconnectionclassifierLoadbalance




/ip firewall nat


add action=masquerade chain=srcnat comment="Masquerade pppoe-wlan1" disabled=no out-interface=pppoe-wlan1
add action=masquerade chain=srcnat comment=""Masquerade pppoe-wlan2" disabled=no out-interface=pppoe-wlan2
add action=masquerade chain=srcnat comment=""Masquerade pppoe-wlan3"" disabled=no out-interface=pppoe-wlan3







/ip firewall mangle
add action=accept chain=prerouting comment="" disabled=no \
dst-address-list=loopback in-interface=Local


add action=mark-connection chain=input comment=" Make the packet leaves via same interface(ISP18mbps) " disabled=no \
in-interface=pppoe-wlan1 new-connection-mark=wlan1_conn passthrough=yes
add action=mark-routing chain=output comment="(ISP1 8 mbps)" connection-mark=wlan1_conn \
disabled=no new-routing-mark=to_wlan1 passthrough=yes
====
add action=mark-connection chain=input comment="(ISP2 8mbps)" disabled=no in-interface=\
pppoe-wlan2 new-connection-mark=wlan2_conn passthrough=yes
add action=mark-routing chain=output comment="(ISP2 8mbps)" connection-mark=wlan2_conn \
disabled=no new-routing-mark=to_wlan2 passthrough=yes

--
add action=mark-connection chain=input comment="(ISP3 -2mbps)" disabled=no in-interface=\
pppoe-wlan3 new-connection-mark=wlan3_conn passthrough=yes
add action=mark-routing chain=output comment="(ISP3= 2mbps)" connection-mark=wlan3_conn \
disabled=no new-routing-mark=to_wlan3 passthrough=yes



Example = 10 lines for 5 mbps, 3 lines for 6 mbps bandwidth, 5 lines for 2.5 mbps, 9 lines for 18 mbps


*Note We have split Total 18 mbps(8 mbps(ISP1- 8mbps+ISP2 + 2 mbps-ISP3 > 18/2=9(the smallest no
is 2)





add action=mark-connection chain=prerouting comment="Load Balance PCC" disabled=no dst-address-type=!local in-interface=Local
new-connection-mark=wlan1_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:9/0

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan1_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/1


add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan1_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/2

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan1_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/3

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/4

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/5

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/6

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan2_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/7

add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=Local new-connection-mark=wlan3_conn \
passthrough=yes per-connection-classifier=both-addresses-and-ports:9/8


=====
add action=mark-routing chain=prerouting comment=\
"===== Marking all the packets =====" connection-mark=wlan1_conn \
disabled=no in-interface=Local new-routing-mark=to_wlan1 passthrough=yes

add action=mark-routing chain=prerouting comment="" connection-mark=\
wlan2_conn disabled=no in-interface=Local new-routing-mark=to_wlan2 \
passthrough=yes

add action=mark-routing chain=prerouting comment="" connection-mark=\
wlan3_conn disabled=no in-interface=Local new-routing-mark=to_wlan3 \
passthrough=yes



/ip route
add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=pppoe-wlan1 routing-mark=to_wlan1 scope=30 \
target-scope=10


add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=pppoe-wlan1 scope=30 target-scope=10


add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=pppoe-wlan2 routing-mark=to_wlan2 scope=30 \
target-scope=10


add check-gateway=ping comment="" disabled=no distance=2 dst-address=\
0.0.0.0/0 gateway=pppoe-wlan2 scope=30 target-scope=10


add check-gateway=ping comment="" disabled=no distance=1 dst-address=\
0.0.0.0/0 gateway=pppoe-wlan3 routing-mark=to_wlan3 scope=30 \
target-scope=10


add check-gateway=ping comment="" disabled=no distance=3 dst-address=\
0.0.0.0/0 gateway=pppoe-wlan3 scope=30 target-scope=10


Thanks
 
tanjil
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Sun Jun 06, 2010 11:15 pm

Re: Step by step Load balancing in v4.4 helpfull for many us

Sat Apr 09, 2011 4:44 am

dear support

will u pls give me example of pcc load balance (fail over rules) if my one gateway down cant browse anywhere...

Thanks

Who is online

Users browsing this forum: No registered users and 29 guests