Unable to use mangle marking in the Queue

Hi,
I need little advice about mangle / marking and queue

I have configured a marking based on a MAC address, in the mangle part, then I have enabled it and checked the statistics, it’s active and counting well,

then I have added a new rule in simple queue and wanted to select the mark from the mangle but I cannot see it in the list. I have try to write it manually, but I dont see any trafic, so somehow this que is unable to use the marking ?

what m I doing wrong ?

here is the info from mangle :

/ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting action=mark-connection new-connection-mark=IPTV-mac
passthrough=yes src-mac-address=00:1A:79:02:3F:4E



this is printout of my queue :

/queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0 name=“IPTV” target-addresses=192.168.1.48/32 interface=all parent=none
packet-marks=IPTV-mac direction=both priority=1
queue=default-small/default-small limit-at=0/0 max-limit=2M/20M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
total-queue=default-small



I wanted to use the mac to prioritize and limit bandwidth.


any advice / help appreciated

The queue uses packet marks, not connection marks. So you need to mark the packet as well after you have marked the connection in the mangle

/ip firewall mangle
add  chain=prerouting action=mark-packet new-packet-mark=IPTV-mac
passthrough=no connection-mark=IPTV-mac

wow :slight_smile: fast and precise. thanks for help.

one question I have left on this one, why is the upload now download and vise versa ?
in que now if I set limit for upload 2 mb, and for download 20mb, it sees it as download 2 mb and upload 20 :slight_smile:

first I thought I set it wrong but then I when I changed the left side (target upload) to 20 my usage went up to 8mb, while before that it was not able to pass 2mb.
so now it’s upload where it says download ? is this normal ?

Update :


I’ve found out that in any case if I change the speed it changes on both the upload and the download, so does not matter in which column I change it, upload or download, it affects both upload and download.

what is wrong with this ?


hereby my printout :

/ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting action=mark-connection new-connection-mark=IPTV-mac passthrough=yes src-mac-address=00:1A:79:02:3F:4E

1 chain=prerouting action=mark-packet new-packet-mark=IPTV-mac passthrough=yes connection-mark=IPTV-mac


/queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0 name=“IPTV” target-addresses=“” interface=all parent=none packet-marks=IPTV-mac direction=both priority=1 queue=default-small/default-small
limit-at=0/0 max-limit=22M/22M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=default-small



what m I doing wrong ?

That was fast because I just happened to be around here :slight_smile:
For the problem of download, I don’t think it is going to work, because the mangle facility will capture packets based on source mac-address, therefore only upload traffic. For the other direction you can use the destination IP, but then you can use the IP input in the simple queue itself without going through the mangle process.

Yes, but I cannot use IP for the case that IP address changes by dhcp some time, and now that means If I go this way I will not be able to specifically set the upload speed. but only the download speed.

If you are assigning the IPs from dhcp server, you can make those leases static, so the same mac-address will always receive the same IP.
While in winbox, check the leases tab on dhcp server window, there you can see a button “make static”.

/ip dhcp-server lease> make-static

That’s the problem part, in my case DHCP on the router is disabled, dhcp is done by windows 2008 server.

:slight_smile:

Well, you can check in windows server how to make the leases static, or disable the dhcp server on windows and activate it on your router.