Community discussions

MikroTik App
 
Marktime87
newbie
Topic Author
Posts: 38
Joined: Sat Feb 25, 2017 11:49 am

Need help sending 2 subnets over 2 different WAN interfaces

Wed Oct 11, 2017 10:42 am

Hi Guys

So I just finished redoing my units network here with the idea of clearing out 3 cabinets that looked like they were about to become sentient tentacle monsters, and streamlining it into 2 neat and tidy cabs. That part was easy enough, everything is up and running but I cannot figure out how to send phones over 1 WAN and data over the other.

So here's the setup:

RB3011 UiAS-RM

WAN 1 - PPPoE (goes to old BT modem)
WAN 2 - DHCP of 192.168.1.0/24 (Assured connection so we have to use their Cisco and can't manage our own ports, hence the second line [WAN 1])

Management network - 192.168.88.0/24
Data VLAN - 192.168.0.0/24
Phone VLAN - 192.168.2.0/24

All I want to do is make the management and data networks use WAN 1, and phones to use WAN 2. I thought it would be a simple case of using static routes but when I came to set it up it dawned on me that I'd never done this before.

After much Googling and not being sure I was looking at the right stuff I think I might need to use Mangle to do it, but I could use some assistance from the community (and to be told if that is the path I need to take!).

I did do my MTCTCE earlier in the year but I had the flu and barely scraped through so any knowledge that could have helped me from that is pretty much destroyed.

I'll appreciate any help you can give me.

Cheers

MT
 
Marktime87
newbie
Topic Author
Posts: 38
Joined: Sat Feb 25, 2017 11:49 am

Re: Need help sending 2 subnets over 2 different WAN interfaces

Wed Oct 11, 2017 3:46 pm

Problem solved guys.

Turns out I had the right idea but when I was doing it I was trying to route to my static IP on WAN 1 instead of the gateway because I'm an idiot.

So in summary:

Set your WANs up
Set your local networks up
Set your Masquerades
Do this for both networks:

/ip firewall mangle
chain=prerouting action=mark-routing new-routing-mark=WAN1
passthrough=yes src-address=<local network IP>

/ip route
add dst-address=0.0.0.0/0 routing-mark=WAN1 gateway=<WAN1 Gateway>

I did have some weird DNS issues after with VLAN 1 still trying to use WAN2's DNS servers but I changed the DHCP server entry and renewed the IP. All good now.