Load-balancing

Hello everybody,

Maybe i am not seeing the obvious, but what is the recommended way to load-balance 2 wan’s?
i know about ppc but it seems rather complicated for a simple scenario like this one.

2 wan’s with diffrent rates.

Scenario 1: I want to move .google. to wan 2, and if wan2 fails use wan1 for google traffic. Is this supposed to work with layer 7 marking->mangle->routes?
Scenario 2: The same problem but knowing the destingation ip: All traffic to a certain destination IP should go to wan2 and if that fails use wan1. simpler than scenario 1.

Thanks.

use /tool netwatch

you cannot use L7 filters to route TCP traffic until you don’t use NAT

Scenario2:

/ip route add gateway=wan2 routing-mark=wan2
/ip route add gateway=wan1 routing-mark=wan2 distance=10
/ip firewall address-list add address=1.0.0.0/8 list=some_networks
/ip firewall mangle add chain=prerouting in-interface=local dst-address-list=some_networks action=mark-routing new-routing-mark=wan2

Chupaka, can you please explain why scenario 1 doenst work?
And when is PCC recommended?

thanks.

L7 works with data. in TCP, data is sent only after establishing the connection. you cannot then move the connection to another link - only if you do not use NAT (UPD: I mean, if you are using PI addresses)

PCC is recommended in case of balancing of similar traffic. if you want strict policy - you do strict policy, like above