Community discussions

MikroTik App
 
dyrdymal
just joined
Topic Author
Posts: 24
Joined: Thu Nov 26, 2009 9:15 pm
Location: IE/PL

mangle...

Fri Dec 18, 2009 12:53 am

Hi,

Can someone explain to me why exactly some examples mangle connections and then mangle packets...? Why not mangle packets alone...?
Example:
why this
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
    new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
    new-packet-mark=http passthrough=no
and not this:
add chain=prerouting protocol=tcp dst-port=80 action=mark-packet \
    new-packet-mark=http passthrough=no
Thanks,
 
akosenko
newbie
Posts: 48
Joined: Fri Aug 21, 2009 8:56 am
Location: Lipetsk, Russia

Re: mangle...

Fri Dec 18, 2009 10:18 am

If I'm not mistaken, when you're mark connection first and then mark all packets belong this connection, then in packet marks you're have src-address and dst-address, then apply this packet mark for outgoing or incoming interface and you're have download or upload traffic. In other words you're don't have separate upload or download connections, just apply packet mark for upload or download interface. BUT if you're using NAT (masquerade) you must separate upload and download traffic (in this connection, or use only packet marks).

sorry for my bad english
 
dyrdymal
just joined
Topic Author
Posts: 24
Joined: Thu Nov 26, 2009 9:15 pm
Location: IE/PL

Re: mangle...

Fri Dec 18, 2009 7:36 pm

my guess is that it may be more efficient to mark connection first and then look only at that connection when marking packets (it may be more efficient to look at connection and not every single packet)... but that's just a guess...

Perhaps one of MIkrotik's QoS/firewall expert could clarify that...?
 
User avatar
gmsmstr
Trainer
Trainer
Posts: 983
Joined: Fri Jun 04, 2004 2:22 am
Location: St. Louis, MO
Contact:

Re: mangle...

Fri Dec 18, 2009 9:29 pm

Connection marks are MUCH more efficent, not to mention, they capture data both ways, not just to or from depending on the ports and/or in interfaces.
 
User avatar
butche
Trainer
Trainer
Posts: 430
Joined: Fri May 28, 2004 6:14 pm
Location: Missouri, USA
Contact:

Re: mangle...

Mon Dec 21, 2009 8:02 am

Who is online

Users browsing this forum: Bing [Bot] and 13 guests