PCC loadbalancing with failover problems

hi guys,
this is my scenario on CCR1016


ether1=WAN1 (10.10.10.0/29)
ether2=WAN2 (10.10.20.0/29)
ether3=LAN1 (192.168.10.0/24)
ether3=LAN2 (192.168.20.0/24)
ether3=LAN3 (192.168.30.0/24)
ether3=LAN4 (192.168.40.0/24)
ether3=LAN5 (192.168.50.0/24)
ether3=LAN6 (192.168.10.0/24)

current solution is double default route with different distances, and everything works well, all the segments connected and internet is OK

now I wanna do PCC loadbalancing with failover

I did this :

firwall > mangle > add
chain input, in-interface=wan1, action=mark-connection new-connection-mark=wan1_conn
firwall > mangle > add
chain input, in-interface=wan2, action=mark-connection new-connection-mark=wan2_conn


firwall > mangle > add
chain ouput, connection-mark=wan1_conn, action=mark-routing, new-routing-mark=to_wan1
firwall > mangle > add
chain ouput, connection-mark=wan2_conn, action=mark-routing, new-routing-mark=to_wan2


firwall > mangle > add
chain=prerouting, dst-address=wan1/mask, action=accept, in-interface=LAN1
firwall > mangle > add
chain=prerouting, dst-address=wan2/mask, action=accept, in-interface=LAN1

repeat for other lans

add chain=prerouting ds-address-type=!local in-interface=LAN1 per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting ds-address-type=!local in-interface=LAN1 per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=wan2_conn passthrough=yes

repeat for other lans

firwall > mangle > add
chain=prerouting coonection-mark=wan1_conn in-interface=LAN1 action=mark-routing new-routing-mark=to_wan1
firwall > mangle > add
chain=prerouting coonection-mark=wan2_conn in-interface=LAN1 action=mark-routing new-routing-mark=to_wan2

repeat for other lans

ip > route > add
dst-address=0.0.0.0/0 gateway=wan1ip routing-mark=to_wan1 check-gateway=ping
dst-address=0.0.0.0/0 gateway=wan2ip routing-mark=to_wan2 check-gateway=ping

ip > route > add
dst-address=0.0.0.0/0 gateway=wan1ip distance=1 check-gateway=ping
dst-address=0.0.0.0/0 gateway=wan2ip distance=2 check-gateway=ping


ip > firewall > nat>
chain=srcnat out-interface=wan1 action=masquerade
chain=srcnat out-interface=wan2 action=masquerade

only Lan1 has internet connectivity and can not ping other Lans !
Lan2 to Lan6 has no internet access, and can not ping others Lans !

whats the problem ?

you have multiple Lan, so i think you have to configure this way …

firwall > mangle >
addchain 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

firwall > mangle >
add chain ouput, connection-mark=wan1_conn, action=mark-routing, new-routing-mark=to_wan1
add chain ouput, connection-mark=wan2_conn, action=mark-routing, new-routing-mark=to_wan2

firwall > mangle >
add chain=prerouting, dst-address=wan1/mask, action=accept
add chain=prerouting, dst-address=wan2/mask, action=accept

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

firwall > mangle >
add chain=prerouting coonection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=prerouting coonection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2

ip > route >
add dst-address=0.0.0.0/0 gateway=wan1ip routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=wan2ip routing-mark=to_wan2 check-gateway=ping

ip > route >
add dst-address=0.0.0.0/0 gateway=wan1ip distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=wan2ip distance=2 check-gateway=ping

ip > firewall > nat>
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade