Suggestion: make "PCQ-Upload" compatible with "Masquerade" again

The subject is quite descriptive: when using Masquerade PCQ-Upload queues work like standard queues.

It stopped working in V6 due to changes in packet flow.

what parent do you use?

I think it doesn’t work with any of them (global or interface)

well, it works for us in usual way (hundreds of active users per PCQ queue, RouterOS v6.10 to v6.33) on ‘global’ parent, and seems like that ‘feature’ was fixed in early v6:

What's new in 6.0beta1 (2012-Apr-13 15:26):
*) pcq queue is NAT aware (just like "/queue simple" and "/ip traffic-flow";

And yet it fails.

/ip firewall mangle
add action=mark-packet chain=forward new-packet-mark=prueba out-interface=pppoe-out1

/queue type
add kind=pcq name=pcq-upload-prueba pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-rate=1M \
    pcq-src-address6-mask=64

/queue tree
add name=pcq-upload-prueba packet-mark=prueba parent=global queue=pcq-upload-prueba

I set up 2 PC uploading and I only get 1M combined upload.

Ironically this document gets it wrong (it is broken in v6, while it worked in v5):
http://mum.mikrotik.com/presentations/HR13/valens.pdf

and what value you see in ‘/queue tree print stats’, pcq-queues=?

still works fine for me, marking in ‘forward’, queues are under ‘global’ :slight_smile:

It says:

pcq-queues=1

Don’t forget to use masquerade on the output interface.

Btw, using version 6.32.4

we’re using “action=same to-addresses=some.ip/25”, and I see pcq-queues>400, for example (I should see not more than 128 if it were not working)

So we agree that pcq-upload is currently not compatible with masquerade, right?

I didn’t test it exactly with masquerade, I use generic src-nat. You may change “action=masquerade” to “action=same to-addresses=your.wan.ip.address” and recheck - this definitely works for me.

I only have 1 WAN IP address, can I use “same”?

Sure. 1 IP address is whole /32 subnet :slight_smile:

With connection tracking on, it definitely works

with connection tracking off, masquerade definitely does not work :slight_smile:

Have you verified it personally in v6?
Can you post a working example?

I finally found the way.

You need simple queues (not queue tree)
Target must be the LAN interface.
Then you can specify the WAN interface as Dst (or use mangle to mark the upload).



/queue simple
add dst=WAN max-limit=5M/100M name=PCQ queue=pcq-upload-default/pcq-download-default target=LAN

Tested in ROS 6.38.7.

It also looks that my original example is working properly now, i’m not sure what happened.