Tuesday, September 17, 2019

PBR on MikroTik - issues with inter-VLAN routing

Hi.

I (client, actually) have some simple infrastructure: two WAN interfaces (10/1 DSL and LTE) and few VLANs. MT does routing for those VLANs. The device in question is hAP and runs 6.45.5 firmware.

GOAL

To push all the traffic OUT of LTE, while leave DSL as backup (as since only this connection has public IP, it's used for VPN/RDS, etc).

So I followed this guide:

https://wiki.mikrotik.com/wiki/Policy_Base_Routing

Did the following:

  • Created Address List (LAN), containing all the VLAN subnets.

  • Created Mangle rule (prerouting/Src Address List: LAN/Action: mark routing/passthrough on/new routing mark: LTE)

  • created two static routes with the same distance (one has the LTE routing mark set)

  • finally created two NAT masquerade rules for LAN address list: one for DSL and the other one for LTE.

Current Outcome

No routing between VLANs. I presume it's because mangle affects prerouting chain? I tried creating copies of the routes for connected networks (this time with LTE mark - didn't work). When I do the traceroute, I see the client computer first hits its' default gateway and then goes straight for LTE interface...

As a workaround I made some changes in Mangle route: aside from Address List, I specified TCP protocol and ports like 25/80/443/465/587/8080. Works, but it's not ideal.

Any idea why router behaves like this?



No comments:

Post a Comment