Community discussions

MikroTik App
 
faisalusuf
just joined
Topic Author
Posts: 14
Joined: Wed Aug 11, 2010 1:22 pm

Strange behavior PCC Loadbalancing

Tue Dec 06, 2011 7:13 pm

Dear Fellows,

I have configured the router OS 3.30 with PCC dual wan balancing but the problem is the youtube streaming is instable either it stops or show fully buffered but stopped. Secondly the outlook emails are not downloading, the downloading interupts during download.

Can please suggest to cater this issue?

Thanks,
Faisal.
 
cieplik206
Trainer
Trainer
Posts: 290
Joined: Sun Jul 01, 2007 12:25 am
Contact:

Re: Strange behavior PCC Loadbalancing

Thu Dec 08, 2011 12:10 am

please paste your firewall config here and routing table
 
faisalusuf
just joined
Topic Author
Posts: 14
Joined: Wed Aug 11, 2010 1:22 pm

Re: Strange behavior PCC Loadbalancing

Thu Dec 08, 2011 8:33 pm

Dear Fellow,

The router is configured with PPPoE for client access while two NIC are connected to 2xISP (DSL routers):

Flags: X - disabled, I - invalid, D - dynamic

7 chain=input action=mark-connection new-connection-mark=WAN1_conn
passthrough=yes in-interface=WAN1

8 chain=input action=mark-connection new-connection-mark=WAN2_conn
passthrough=yes in-interface=WAN2

9 chain=output action=mark-routing new-routing-mark=to_WAN1 passthrough=yes
connection-mark=WAN1_conn

10 chain=output action=mark-routing new-routing-mark=to_WAN2 passthrough=yes
connection-mark=WAN2_conn

11 chain=prerouting action=accept dst-address=192.168.1.0/24

12 chain=prerouting action=accept dst-address=192.168.2.0/24

13 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn
passthrough=yes dst-address-type=!local
per-connection-classifier=both-addresses-and-ports:2/0

14 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn
passthrough=yes dst-address-type=!local
per-connection-classifier=both-addresses-and-ports:2/1

15 chain=prerouting action=mark-routing new-routing-mark=to_WAN1
passthrough=yes connection-mark=WAN1_conn

16 chain=prerouting action=mark-routing new-routing-mark=to_WAN2
passthrough=yes connection-mark=WAN2_conn


NAT Rules


Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade src-address-list=clients out-interface=WAN1

1 chain=srcnat action=masquerade src-address-list=clients out-interface=WAN2

Regards,
Faisal.
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: Strange behavior PCC Loadbalancing

Fri Dec 09, 2011 11:54 am

Dear Fellows,
I have configured the router OS 3.30 with PCC dual wan balancing but the problem is the youtube streaming is instable either it stops or show fully buffered but stopped. Secondly the outlook emails are not downloading, the downloading interupts during download.
Can please suggest to cater this issue?
Thanks,
Faisal.
I guess you are using "both addresses and ports" as the classifier.Using this as classifier can give your client most combined bandwidth for both links BUT there is also a good chance that it will break certain things like youtube buffering , downloads, https web sites and some forums. This is because often times a HTTP requests will generate several connections, so there is a chance that some requests may go out a different route than the initial one, and that will break some request.

Use src-address as classifier, this way you will get rid of problems like https/broken link, streaming issues etc
But for src-address, In my personnel experience , If users request are directly hitting Mikrotik configured with PCC , then you will get good load balancing. . Load balancing using this PCC method (src-address) will be effective and balanced only when more and more connections (from clients) occurs. I also recommend to use SQUID proxy server along with mikrotik , either parallel or in front or backend , for better response time and it will also increase good browsing experience to users.

If somehow you are not satisfied with the src-address approach,play with the PCC-Classifier, Try different classifiers.
 
faisalusuf
just joined
Topic Author
Posts: 14
Joined: Wed Aug 11, 2010 1:22 pm

Re: Strange behavior PCC Loadbalancing

Fri Dec 09, 2011 3:22 pm

Hi Jahnzaib,

The above configuration is taken from your blog and with slight changes. There you have explained with source-port both in PCC. Well let me try with source only as PCC classifier.

thanks,
Faisal.
 
faisalusuf
just joined
Topic Author
Posts: 14
Joined: Wed Aug 11, 2010 1:22 pm

Re: Strange behavior PCC Loadbalancing

Sat Dec 10, 2011 11:04 am

Yes there was a mistake in my documented config and router config i was using both addresses and ports as PCC classifier which was causing the problem. The correct to only source-address has resolved the problem.

Thanks for guidance and feedback on the post.
 
faisalusuf
just joined
Topic Author
Posts: 14
Joined: Wed Aug 11, 2010 1:22 pm

Re: Strange behavior PCC Loadbalancing

Sat Dec 10, 2011 6:54 pm

im trying different settings but still youtube and messenger problem.
 
faisalusuf
just joined
Topic Author
Posts: 14
Joined: Wed Aug 11, 2010 1:22 pm

Re: Strange behavior PCC Loadbalancing

Sun Dec 11, 2011 10:00 pm

I have tried with source address as PCC clasifier but behavior is the same. I have the following config while users are authenticating from PPP0E server:



add chain=input in-interface=PTCL1 action=mark-connection new-connection-mark=PTCL1_conn

add chain=input in-interface=PTCL2 action=mark-connection new-connection-mark=PTCL2_conn

add chain=output connection-mark=PTCL1_conn action=mark-routing new-routing-mark=to_PTCL1

add chain=output connection-mark=PTCL2_conn action=mark-routing new-routing-mark=to_PTCL2

add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=dialin

add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=dialin

add chain=prerouting dst-address-type=!local per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=PTCL1_conn passthrough=yes

add chain=prerouting dst-address-type=!local per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=PTCL2_conn passthrough=yes

add chain=prerouting connection-mark=PTCL1_conn action=mark-routing new-routing-mark=to_PTCL1

add chain=prerouting connection-mark=PTCL2_conn action=mark-routing new-routing-mark=to_PTCL2


add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_PTCL1 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_PTCL2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping


Can someone please suggest where im making mistake?
 
danki
just joined
Posts: 3
Joined: Sun Dec 18, 2011 12:44 pm

Re: Strange behavior PCC Loadbalancing

Sun Dec 18, 2011 1:29 pm

Hi all, Can anyone halp me about load balancing, I just make this scprip on my RB751U (5.7 version), but not working!
The script of my configuration is:

chain=input action=mark-connection new-connection-mark=3.PTK passthrough=no in-interface=3.PTK
chain=input action=mark-connection new-connection-mark=4.IPKO passthrough=no in-interface=4.IPKO

chain=output action=mark-routing new-routing-mark=3.PTK passthrough=no connection-mark=3.PTK
chain=output action=mark-routing new-routing-mark=4.IPKO passthrough=no connection-mark=4.IPKO

chain=prerouting action=accept dst-address=192.168.1.0/24 in-interface=bridge1
chain=prerouting action=accept dst-address=192.169.1.0/24 in-interface=bridge1

chain=prerouting action=mark-connection new-connection-mark=3.PTK passthrough=yes dst-address-type=local in-interface=bridge1
per-connection-classifier=both-addresses:2/0

chain=prerouting action=mark-connection new-connection-mark=4.IPKO passthrough=yes dst-address-type=local in-interface=bridge1
per-connection-classifier=both-addresses:2/1

chain=prerouting action=mark-routing new-routing-mark=3.PTK passthrough=no in-interface=bridge1 connection-mark=3.PTK
chain=prerouting action=mark-routing new-routing-mark=4.IPKO passthrough=no in-interface=bridge1 connection-mark=4.IPKO


dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-3.PTK check-gateway=ping
dst-address=0.0.0.0/0 gateway=192.169.1.1 routing-4.IPKO check-gateway=ping ? (showed with blue color on my MK)
dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
dst-address=0.0.0.0/0 gateway=192.169.1.1 distance=2 check-gateway=ping

Who is online

Users browsing this forum: Bing [Bot], emunt6, homerouter and 107 guests