Three WAN connections - routing setup?

Hi guys, hope you can help.

I’ve got a CCR1036 with three WAN (internet) connections and three LAN connections, one of the LAN connections has two VLANs. I want to be able to route/NAT traffic from LAN 1 out of WAN 1, traffic from LAN 2 (both VLANs) to WAN 2, and traffic from LAN 3 out of WAN 3. What would the best way to do this? I was thinking of using Mangle but not sure if this is the correct way to do it.

I’ve mocked up a quick diagram showing the setup:

Thanks,

Verta.

Yes,

Your going to use Mangle

Mangle based on Src-address each subnet with a routing mark. Routing mark can be anything example Wan1, Wan2, and Wan3.

Now that packets are marked the next step in IP Routes

Put three any address routes in (0.0.0.0/0) referring to the gateway you want to use. Also don’t forget your routing marks.



I recommend putting in backup routes. Additional steps for backups.

  1. On primary route edit them and add check gateway
  2. Add secondary route with distance 2 for that routing mark to a different gateway
  3. Repeat and add more routes as needed distance is the order in which they are used