Community discussions

MikroTik App
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

"no-mark" as default mark to all connections and traffic

Mon Sep 28, 2009 1:39 pm

In next RouterOS we will include small, but important change in firewall mangle. Every connection will have connection mark "no-mark" by default, and every packet will have packet mark "no-mark" by default.

This changes will greatly help to reduce complexity and efficiency of the mangle setups that require remarking of the connections and traffic. Traffic remarking will be avoidable.

For example with one rule it will be possible to ensure that this rule will mark only connections that was not marked before (connections with "no-mark" mark).

It will also allow to create queue for unmarked traffic, this way eliminating requirement that all traffic need to be marked in mangle to create proper QoS.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "no-mark" as default mark to all connections and traffic

Mon Sep 28, 2009 1:59 pm

is this like adding hidden rules
/ip fi mangle add chain=prerouting connection-state=new action=mark-connection new-connection-mark=no-mark
/ip fi mangle add chain=prerouting action=mark-packet new-packet-mark=no-mark
? =)

can it help to reduce complexity in current version? :)
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: "no-mark" as default mark to all connections and traffic

Mon Sep 28, 2009 2:48 pm

To Chupaka: it looks like only in your case you will need to reboot the router/conntrack to force all connections become new :)

One way or another it will help to get rid of at least 2 rules (more in more complex setups)
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "no-mark" as default mark to all connections and traffic

Mon Sep 28, 2009 3:20 pm

To Chupaka: it looks like only in your case you will need to reboot the router/conntrack to force all connections become new :)
are you sure you don't need to reboot a router to upgrade it to the next version? ;)
 
User avatar
omidkosari
Trainer
Trainer
Posts: 640
Joined: Fri Sep 01, 2006 4:18 pm
Location: Canada, Toronto

Re: "no-mark" as default mark to all connections and traffic

Tue Sep 29, 2009 10:49 pm

In next RouterOS we will include small, but important change in firewall mangle. Every connection will have connection mark "no-mark" by default, and every packet will have packet mark "no-mark" by default.

This changes will greatly help to reduce complexity and efficiency of the mangle setups that require remarking of the connections and traffic. Traffic remarking will be avoidable.

For example with one rule it will be possible to ensure that this rule will mark only connections that was not marked before (connections with "no-mark" mark).

It will also allow to create queue for unmarked traffic, this way eliminating requirement that all traffic need to be marked in mangle to create proper QoS.
Should we care before upgrade to next version ? will our configuration affected or it does everything automatically ?
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: "no-mark" as default mark to all connections and traffic

Wed Sep 30, 2009 9:27 am

As far as I can see it it does nothing to your configuration, you can ether use it or not.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "no-mark" as default mark to all connections and traffic

Wed Sep 30, 2009 9:40 am

if you are using mangle and marking connections the way you do that - it will not bring you any difference. because initial marks are without checking any mark, because of presumption that there are none, then, even if you set something, it will be overwritten.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "no-mark" as default mark to all connections and traffic

Wed Sep 30, 2009 9:59 am

the things to be a bit more clear: now you are able to match connections and packets without marks in a native way. earlier you had to mark it with some temp mark to do that trick
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: "no-mark" as default mark to all connections and traffic

Wed Sep 30, 2009 7:17 pm

it would be NICE to have an option to bypass this hidden process. I can imagine there are cases where you do not want this. What about performance, if I'm not even using packet marks at all are they now incurring additional CPU usage on the hidden marking process? Additional RAM usage?

PLEASE just have a checkbox / boolean flag on the mangle setup that allows you to turn it on and off. If you dont add it now, then you will just have confused a ton of people when you automatically start doing this, and in future versions I imagine it will be added and now more people will be confused. Make it an option, not a requirement.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "no-mark" as default mark to all connections and traffic

Wed Sep 30, 2009 8:19 pm

I really HOPE that this is just firewall MATCHER improvement, not full redesign of whole conntrack system. if that's true - then no performance impact at all
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: "no-mark" as default mark to all connections and traffic

Thu Oct 01, 2009 9:48 am

previously if packet had no mark, returned value was nil, value you could not match against, now, in same case if you want to macth, you can do that, because returned value is no-mark. So, if you look at it in that way - all packets are considered marked now, no value set is a actually value set.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "no-mark" as default mark to all connections and traffic

Thu Oct 01, 2009 10:56 am

as I said, and as it should be :)

good work =)
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: "no-mark" as default mark to all connections and traffic

Thu Oct 01, 2009 6:51 pm

connection-marks and packet-marks take up memory correct? I could be understand this wrong, but I just want to make sure that our really heavy loaded routers that we do not use any mangling aren't going to take a performance hit for marking and storing the value in memory.

This new change does not affect CPU or memory usage at all?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: "no-mark" as default mark to all connections and traffic

Thu Oct 01, 2009 6:57 pm

yes, no affect at all. just a bit changed logic
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: "no-mark" as default mark to all connections and traffic

Fri Oct 02, 2009 9:31 am

it's not really a mark. it's just a name for unmarked connections to make matching them easier.
 
Ozelo
Member
Member
Posts: 338
Joined: Fri Jun 02, 2006 3:56 am

Re: "no-mark" as default mark to all connections and traffic

Fri Oct 02, 2009 1:52 pm

Guess it is just a masked info. (nil = no-mark) As you may not be able to leave those fields in blank to have a match. This is great. Whenever you had a "blank" info, now ROS will show you that "nil = no-mark" without any variable attributions. Thanks!
 
celicas
just joined
Posts: 12
Joined: Tue Nov 04, 2014 2:59 pm

Re: "no-mark" as default mark to all connections and traffic

Thu May 28, 2015 8:43 am

Very useful and it significantly reduces complexity :) . I just came across the need for a default routing-mark=no-mark as well which is not implemented as of now (v6.28) :(
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: "no-mark" as default mark to all connections and traffic

Thu May 28, 2015 2:31 pm

Wouldn't routing-mark=main be useable in your setup?
 
celicas
just joined
Posts: 12
Joined: Tue Nov 04, 2014 2:59 pm

Re: "no-mark" as default mark to all connections and traffic

Thu May 28, 2015 4:10 pm

Wouldn't routing-mark=main be useable in your setup?
Yes you are right! This is equivalent to "no-mark" of connection & packet marks!
I can't hide that this is my first complex setup!
Thank you!
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1162
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: "no-mark" as default mark to all connections and traffic

Thu May 28, 2015 4:25 pm

Very useful and it significantly reduces complexity :) . I just came across the need for a default routing-mark=no-mark as well which is not implemented as of now (v6.28) :(
This post is from 2009.

This is already working as described in 6.28.

@MirkoTik - Please lock this topic.

Who is online

Users browsing this forum: Bing [Bot], GoogleOther [Bot], mostfa228, MrRey, robertkjonesjr and 92 guests