problem with PCC load balance

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

  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

  1. http://wiki.mikrotik.com/wiki/Advanced_Routing_Failover_without_Scripting

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 .







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

nice trick