Community discussions

MikroTik App
 
User avatar
eugenevdm
Member Candidate
Member Candidate
Topic Author
Posts: 208
Joined: Tue Jun 01, 2004 12:23 pm
Location: Stellenbosch, South Africa
Contact:

What happened to Nth in Beta?

Wed May 09, 2007 9:21 pm

I'm trying to use this example on a router that I've migrated from 2.9.42 to 3.0 Beta 7:
# Improved Load Balancing over Multiple Gateways
http://wiki.mikrotik.com/wiki/Load_Balancing

The symptoms of the problem is that the first Nth does not mangle any more.
The most obvious difference between 2.9.42 and 3.0 Beta 7 is that Nth now has less fields.

In 2.9.42:
* Every
* Counter
* Packet

In 3.0 Beta 7
* Every
* Packet

Is there some advice for me?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7211
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Mon May 14, 2007 10:26 am

This is very simple. There are no more counters. For example to mark every second packet:
chain=prerouting nth=2,1 action=mark-packet new-packet-mark=odd 
     passthrough=yes;
chain=prerouting nth=2,2 action=mark-packet new-packet-mark=even 
     passthrough=yes;
It is very important to set passthrough=yes, otherwise nth won't work correctly.
 
User avatar
eugenevdm
Member Candidate
Member Candidate
Topic Author
Posts: 208
Joined: Tue Jun 01, 2004 12:23 pm
Location: Stellenbosch, South Africa
Contact:

Mon May 14, 2007 10:37 am

Thank you.

Just for reference the old (pre-version 3) example on the WIKI looks like:
/ip firewall mangle
add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \
    action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
    disabled=no 
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
    new-routing-mark=odd passthrough=no comment="" disabled=no 
add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \
    action=mark-connection new-connection-mark=even passthrough=yes comment="" \
    disabled=no 
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
    new-routing-mark=even passthrough=no comment="" disabled=no