ack prioritization

I would like to prioritize ACK packets for DSL link. I am using NAT on that MT box. Where to put ACK packet marking rule? on prerouting or postrouting??

use tpc flags in magle advanced

I know what to mangle, but my question was: what chain? prerouting or postrouting?

in postrouting must be.

May i ask why? I’m too doing TCP ACK prioritization, and have the mangle rules done in prerouting. Whats the difference?
Just curious whats, the packet size you use? I’m using just the no piggybacked ones (0-40 bytes).

because the ack it happens when the conexion is established, already passage by the routes

Correct TCP ACK prioritization is currently not possible with RouterOS.
It won’t let you accurately match tcp ack packets with zero data length.
Perhaps you could ask support@ for it?

A few versions had “u32” support which would have let us match those packets accurately but they removed that support.

I’m newbie with ROS, but… I’m using it right now with this mangle rule before all connection marking ones:

 0   chain=prerouting action=mark-packet new-packet-mark=tcp_ack passthrough=no tcp-flags=ack
     in-interface=Lan1 protocol=tcp packet-size=0-40

The “no data payload ACKs” are just the ones with 40 bytes with ACK flag set. I just need to prioritize “upload” ones, so i don’t need connection marks, or do I? :neutral_face:

TL

I’m not sure i understand you entirely.
You don’t need connection marks only packet marks.

PS: 40 byte tcp packets with ack flag set are tcp packets without tcp options (SACK, window scaling, timestamps).

So, these are the ACK packets we want to prioritize aren’t they? I mean, my goal is just to optimize the downstream even when the upstream channel is full on a ADSL link, so only these ACKs interest me.
This page explains this in more detail: http://www.benzedrine.cx/ackpri.html

TL

And taht page:
http://doc.m0n0.ch/handbook/faq-ackprio.html

So, is it NOT possible in MikroTik???

what you also need is to mark packets with flags:

fin,syn,rst,psh,ack,urg/ack

and

fin,syn,rst,psh,ack,urg/syn

unfortunately, mikrotik routeros can’t mark urg/ack or urg/syn.

at least I don’t know how to do it.

or maybe we’re all misunderstanding, and by having ‘tcp-flags=ack,fin,syn,rst,psh,ack,urg’ we kill the two above birds with one stone.

which I doubt :wink:

cheers!