Packet Mark Check Performance in mangle list?

How fast is it?

Here is what I try to do:

  • I have a central mikrotik where some offices link up with 1+ different pptp lines, so I use nth routing to distirbute the traffic.

  • Checking for the different address spaces obviously is expensive (multiple address checks every time), so my idea is:

  • I dont need the packet mark in the prerouting step. I use it for qos in postrouting, but then i can overwrite it.

  • In prerouting, I set the packet mark to the market of the office (like “office1”). THere i check addresses etc. THen, immediately after, I do the nth routing tricks, prequalifying by packet market (i.e. every 2nd office1 goes to office1.1, every other to office1.2).

  • Then postrouting comes and overwrites the packet mark as per connection mark (for qos).

The idea is that this way I have to check addresses (plural) of each office ONCE, the different nth checks use the first result. Also, I can use the address check only if no packet mark exists, which is handy as I have some (3, soon 5) address range assignments. So, I can prefix them with no-mark. THe idea is to do the expensive operaitons only once.

Comments? :wink: