Hello,
I have been trying unsuccessfully to use filter rules to isolate DHCP traffic between specific bridged interfaces.
The context is the following: I live on a campus where internet is provided to me. I have a few RJ45 jacks that I can use for wired connections to the internet, but these are FastEthernet which is not great for large transfers between my devices. So I got a CRS326-24G-2S+RM that runs RouterOS, on which I connect all my devices, and which I also connect to one of the campus jacks.
The problem is that I am now limited by the fact that all my devices share the same relatively slow link to the gateway.
To address that, what I would like to do is group the interfaces on my switch in pairs such that each pair contains one interface connected to the gateway and one connected to a device, and use filter rule to ensure that the traffic from each device to the gateway goes exclusively through the other interface in the pair. I have been trying to achieve that by using filter rules on DHCP traffic, which has not been working. My hope was to avoid using VLANs with inter-VLAN routing, which I saw as an alternative.
Specifically, starting from the default switch configuration, I ran the following commands:
/interface bridge filter
:for n from=1 to=11 do={
:local iface1 ("ether" . (2 * $n - 1))
:local iface2 ("ether" . (2 * $n))
add chain=forward mac-protocol=ip in-interface=$iface1 out-interface=$iface2 ip-protocol=udp dst-port=67-68 action=accept
add chain=forward mac-protocol=ip in-interface=$iface2 out-interface=$iface1 ip-protocol=udp dst-port=67-68 action=accept
}
add chain=forward mac-protocol=ip in-interface=ether23 out-interface=sfp-sfpplus1 ip-protocol=udp dst-port=67-68 action=accept
add chain=forward mac-protocol=ip in-interface=sfp-sfpplus1 out-interface=ether23 ip-protocol=udp dst-port=67-68 action=accept
add chain=forward mac-protocol=ip in-interface=ether24 out-interface=sfp-sfpplus2 ip-protocol=udp dst-port=67-68 action=accept
add chain=forward mac-protocol=ip in-interface=sfp-sfpplus2 out-interface=ether24 ip-protocol=udp dst-port=67-68 action=accept
add chain=forward mac-protocol=ip ip-protocol=udp dst-port=67-68 action=drop
/interface bridge settings
set use-ip-firewall=yes
Now if I plug a device in
ether4
and use
ether1
to connect to the gateway, with no other interface in use, I would expect that my device does not get assigned an ip address, but it does.
What am I missing?