Community discussions

MikroTik App
 
User avatar
ekarin
Trainer
Trainer
Topic Author
Posts: 34
Joined: Fri Jun 01, 2018 9:12 pm
Contact:

Routing Mark in Routing Rules

Tue Dec 19, 2023 8:37 pm

I have read the Mirkotik Document as the following link. https://help.mikrotik.com/docs/display/ ... cy+Routing
I have an question about this sentences in the above link.
"It is not recommended to use both methods at the same time or you should know exactly what you are doing. If you really do need to use both mangle and routing rules in the same setup then keep in mind that mangle has higher priority, meaning if the mangle marked traffic can be resolved in the table then route rules will never see this traffic."

It seems that if I use the mangle rule with the Mark Routing action, the routing rule (policy routing rule) with its condition of the same routing mark can be ignored because the mangle rule has a higer priority than the policy routing rule. The Routing Mark condition in the policy routing rules seems to be useless. Can someone know which case the Routing Mark condition in the policy routing rules can be applied for? Why does MikroTik have the Routing Mark condition in the policy routing rules?

Thank you very much.
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22254
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Routing Mark in Routing Rules

Tue Dec 19, 2023 10:43 pm

If there is no overlap in the traffic being directed both can be used at the same time.
Often if mangling can be avoided by use of routing rules then why not.
Routing rules cannot be used for address lists, so mangling in that case is mandatory.
Routing rules for regulating traffic to WAN are only possible for fixed WANIPs, or else one has to do some very creative scripting.

Finally without an actual scenario, not much more can be said............
 
User avatar
ekarin
Trainer
Trainer
Topic Author
Posts: 34
Joined: Fri Jun 01, 2018 9:12 pm
Contact:

Re: Routing Mark in Routing Rules

Thu Dec 21, 2023 9:34 am

Thank you for your infomation.
I already understande it when I have recosidered the FIB picture below.
The mangle rule is processed first, and then the routing rule with the same routing mark as its condition will be executed if the routes of the routing table from the mangle rule are not matched with the destination address of a packet.
However this case is hardly possible to happen.
You do not have the required permissions to view the files attached to this post.