Community discussions

MikroTik App
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

problem with PCC load balance

Sat Jul 17, 2010 5:16 pm

Hi to All

i have two gateways first is Fiber and the other is VSAT .. i have using PCC load Balance with RB1000 v.4.5 and its working very fine , i only have two issues :

1- Currently the LAN bandwidth is devided on both gatways " WAN1 & wan2 " equally , for exampl if the traffic show 1 Mbps i see in the load balance that 512 go to WAN1 and 512 go to WAN2 .. How do i can give more priority to WAN1 so the most traffic will go through WAN1 .. so if the LAN network need 1 Mbps .. it will send 768k through WAN1 and 256 THROUGH wan2 .


2-its doing continous check for ping to gateway so if one of them went down its handover all traffic through the other WAN , but if the ping to gateway still ok and stable bu the internet on WAN1 went down .. its keep passing the traffic through both gateways and causing problems to the LAN network here is my IP route :

[admin@MikroTik] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 192.168.12.1 1
1 A S 0.0.0.0/0 172.168.1.1 1
2 A S 0.0.0.0/0 192.168.12.1 1
3 S 0.0.0.0/0 172.168.1.1 2
4 ADC 192.168.12.0/29 192.168.12.2 WAN1 0
5 ADC 172.168.1.0/28 172.168.1.2 WAN2 0
6 ADC 192.168.100.0/24 192.168.100.1 Local 0



Any post is highly appreciated
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: problem with PCC load balance

Sat Jul 17, 2010 8:16 pm

1) use more pcc 'streams':

per-connection-classifier=classifier:4/0 new-connection-mark=wan1
per-connection-classifier=classifier:4/1 new-connection-mark=wan1
per-connection-classifier=classifier:4/2 new-connection-mark=wan1
per-connection-classifier=classifier:4/3 new-connection-mark=wan2

2) http://wiki.mikrotik.com/wiki/Advanced_ ... _Scripting
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: problem with PCC load balance

Sun Jul 18, 2010 11:06 am

Thanks for your feedback ,, here is my magle configuration can you please explain bit more if i need to add some more rules on it if i increase the pcc streams :

/ ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=WAN2
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=WAN2


also shall i need to add another rules in ip route ?

finally here is my firewall NAT >

/ ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade

shall i need to add any more rules .






1) use more pcc 'streams':

per-connection-classifier=classifier:4/0 new-connection-mark=wan1
per-connection-classifier=classifier:4/1 new-connection-mark=wan1
per-connection-classifier=classifier:4/2 new-connection-mark=wan1
per-connection-classifier=classifier:4/3 new-connection-mark=wan2

2) http://wiki.mikrotik.com/wiki/Advanced_ ... _Scripting
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: problem with PCC load balance

Mon Jul 19, 2010 1:50 pm

simply replace
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
with
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/1 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/2 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/3 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
in that setup WAN1 will receive three times more traffic than WAN2
 
kazanova
Member
Member
Posts: 406
Joined: Tue Sep 06, 2005 11:52 am

Re: problem with PCC load balance

Tue Sep 07, 2010 9:11 pm

nice trick

Who is online

Users browsing this forum: No registered users and 13 guests