Community discussions

MikroTik App
 
sudiptakp
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Thu Jan 29, 2009 2:43 pm

Mangle Best Practice

Mon Dec 21, 2009 7:55 pm

What is better among the two for marking packets in pre-routing chain in mangle coming from a specific sublet?

1. add action=mark-packet chain=prerouting comment="Internet Zone2--DN" disabled=no dst-address-list="Internet Zone2" \
new-packet-mark="Internet Zone2" passthrough=no
........... Internet Zone2 is defined in address-list as a subnet.

2. add action=mark-connection chain=prerouting comment="Internet Zone2--DN" disabled=no dst-address-list="Internet Zone2" \
new-connection-mark="Internet Zone2 Conn" passthrough=yes

add action=mark-packet chain=prerouting comment="Internet Zone2--DN" disabled=no connection-mark="Internet Zone2 Conn" \
new-packet-mark="Internet Zone2" passthrough=no

Which one is better and why?

Thanks,

Sudipta
 
User avatar
gmsmstr
Trainer
Trainer
Posts: 982
Joined: Fri Jun 04, 2004 2:22 am
Location: St. Louis, MO
Contact:

Re: Mangle Best Practice

Mon Dec 21, 2009 8:32 pm

The end result is having a packet mark, however, marking your connection is less CPU intensive. The PROPER or perferred way is the do the connection mark then the packet mark. This does two things, provides a simpler faster way to mark packets once the connection is identified. Two, depending on the connection and type, it will typically get traffic both directions vs just a single direction.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Mangle Best Practice

Mon Dec 21, 2009 8:46 pm

Who is online

Users browsing this forum: bertus, Bing [Bot], dervomsee, djvabe, infabo, mgual, Mr47, unam83 and 122 guests