New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
A MikroTik Help
Mahfuz_SS_EHL
Host Rep, Veteran
in Help
Hello,
Suppose, I have 3 Uplinks as PPPoE Interface & I have 3 Wifi Routers connected in a Managed Switch by 3 VLANs from MikroTik. The Wifi Routers have different subnets.
Now, I want to filter traffic from each subnet & pass through different PPPoE interfaces. How can I achieve this ??
If you can't see the image: https://pasteboard.co/3MPUEOPZcMI9.png
Comments
Hello,
One solution is that use routing tables. I'll write the config for one interface, you can multiply this. There are other ways (e.g. packet marking), however, I think that it is the most simple way. Firstly you will create interfaces, routing tables for each network and after that, routing table for it. When PPPoE IF reconnects, it will update the IPs in the routing table. It works well for me.
If I am understanding this correctly, then you need VLANs.
Subnets are already assigned to VLANs.
Then why do you need to filter traffic? Just arrange each subnet to go to the corresponding exit.
If you need some exceptions, then you can route between the subnets and write special rules for every machine which needs an exception, add a route for that.
This is what I'm looking for.
So you already have the VLANs, then there is nothing left to do, just put in each vm or device in the VLAN the gateway for that VLAN (which should be in the VLAN in the first place), problem solved.
Yes, there is the VLAN gateway but how to put each VLAN to passthrough into a specific PPPoE Interface, I was looking for that.
Hi, you can create VRF for each vlan on MikroTiK router. Then you can write a static route from the servers on the VLAN side to the gateway of each VRF. You will need to create ACL and do NAT as well.
If you have static IPs on the pppoe interfaces just src nat each subnet to it.
if not then you can mark routing in mangle and set routing rules to assign traffic to each gateway
just throwing it out there is case you need it, i just upgraded to V7 because wireguard
and as a bonus you dont need mangle anymore to do what you want just create a custom table add the gateway ( pppoe int) to it and then create a simple rule with source being your subnet and specify look only in table then done
you can route as many subnets as you want will little ovehead and assign subnet specific routing rules. i just switched to this to test it out