Community discussions

 
Bibliotech
newbie
Topic Author
Posts: 25
Joined: Mon Apr 13, 2009 8:48 pm

Route Multiple LANs to Multiple WANs

Mon Mar 28, 2016 4:59 pm

Hi. I have a CCR1009 running 6.34.3. I have 2 LANs (ether1&2) and 3 WANs connected to it. I wish to have one LAN (ether1) use only one specific gateway (ether4). The other LAN will load balance across the two WAN interfaces, one public-addressed WAN subnet and one private-addressed WAN subnet. The config below is my first thought at it, but I think it will simply load balance both LANs to all three WAN's which is not what I wish. First, is this technique the best way to accomplish my task. Second, if so, is the config below correct? Thanks.


/ ip address
add address=private.1.1/24 network=private.1.0 broadcast=private.1.255 interface=ether1
add address=private.23.1/24 network=private.23.0 broadcast=private.23.255 interface=ether2
add address=public.254.94/29 network=public.254.80 broadcast=public.254.95 interface=ether4
add address=public.253.142/29 network=public.253.136 broadcast=public.253.143 interface=ether5
add address=private.10.2/24 network=private.10.0 broadcast=private.10.255 interface=ether6

/ ip route
add dst-address=0.0.0.0/0 gateway=public.253.137,private.10.1,public.254.81 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=ether4 action=masquerade
add chain=srcnat out-interface=ether5 action=masquerade

/ ip firewall mangle
add chain=input in-interface=ether4 action=mark-connection new-connection-mark=Wan1
add chain=input in-interface=ether5 action=mark-connection new-connection-mark=Wan2
add chain=input in-interface=ether6 action=mark-connection new-connection-mark=Wan3
add chain=output connection-mark=Wan1 action=mark-routing new-routing-mark=Staff
add chain=output connection-mark=Wan2 action=mark-routing new-routing-mark=PubMdmUp
add chain=output connection-mark=Wan3 action=mark-routing new-routing-mark=PubMdmLow

/ ip route
add dst-address=0.0.0.0/0 gateway=public.254.81 routing-mark=Staff
add dst-address=0.0.0.0/0 gateway=public.253.137 routing-mark=PubMdmUp
add dst-address=0.0.0.0/0 gateway=private.10.1 routing-mark=PubMdmLow
 
User avatar
pukkita
Trainer
Trainer
Posts: 2981
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Route Multiple LANs to Multiple WANs

Mon Mar 28, 2016 6:51 pm

Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
Bibliotech
newbie
Topic Author
Posts: 25
Joined: Mon Apr 13, 2009 8:48 pm

Re: Route Multiple LANs to Multiple WANs

Mon Mar 28, 2016 9:32 pm

Thanks pukkita. That looks like just the ticket. I'll try it tomorrow night and report back.

Who is online

Users browsing this forum: Bing [Bot] and 46 guests