good morning, I am trying unsuccessfully to limit the bandwidth of an ethernet port through a simple queue, the problem that that port is part of the briged.
Ether 1: wan
Ether 2,3,4,5: Briged 1.
Try to limit the bandwidth of port Ether 2 using a simple queue in target = Ether2. but it surely doesn’t work because it is part of the briged.
Is there a way to limit the bandwidth of an ethernet port that is part of a briged?
To make the queues handle L2 forwarding on a bridge, you must set use-ip-firewall to yes in /interface bridge settings. And I’m not sure whether /queue simple and target=ether2 will be sufficient, you may have to use queue tree and assign packet-mark. I don’t have any practical experience with this.
As I’ve suspected in advance, the interface name used as simple queue’s target can only be a name of an L3 interface (at least in 6.45.7 where I’ve just tested it). L2 interfaces (member ports of bridges) are “invisible” to the simple queue’s matcher, so if you set an L2 interface name as a target, the queue will never match any packet or frame because no packet or frame ever gets an L2 interface name as an in-interface or out-interface attribute.
So to make the simple queue “notice” the frame, you have to assign a packet-mark to it (using /interface bridge filter action=mark-packet new-packet-mark=xyz), and you have to add the value xyz also to the packet-marks list which is one of parameters of the queue. When specifying the limits in download/upload format, for L2 interfaces, download is the direction wire->silicon and upload is the direction silicon->wire. Setting IP address as simple queue’s target has some effect on the packet matching but not the expected one, so either investigate it in detail or avoid it.
I was unable to assign a packet-mark to locally originated packets in chain=output or chain=postrouting of /ip firewall mangle depending on out-bridge-port, but that may be because of my VLAN configuration on the bridge, and I could not test in chain=forward. Without this to work, you have to know the IP addresses of devices connected via the bridge port in order to set the correct new-packet-mark in /ip firewall mangle to packets routed into the subnet which lives on the bridge, which probably ruins your idea.