Community discussions

MikroTik App
 
vadood
just joined
Topic Author
Posts: 17
Joined: Sun Aug 29, 2010 11:28 am

Mangle not marking connections

Tue Mar 06, 2012 10:53 am

I have this problem with mangle

I have created a mangle rules like this:
 3   ;;; Mark Hotspot Connection
     chain=prerouting action=mark-connection new-connection-mark=HotSpot_Conxn passthrough=yes src-address-list=[b]Hotspot[/b] 
 4   ;;; Mark Hotspot Connection
     chain=prerouting action=mark-connection new-connection-mark=HotSpot_Conxn passthrough=yes dst-address-list=[b]Hotspot[/b] 
 5   ;;; Mark HotSpot Packet
     chain=prerouting action=mark-packet new-packet-mark=HotSpot_Pkt passthrough=no connection-mark=HotSpot_Conxn 
but when I look at connections, some of them are marked and some are not; this ip is in the Hotspot address list above
I do not exactly know how Mikrotik marks connections and why this happens, but I can not use queues effectively because of this.

Image
 
sja
newbie
Posts: 29
Joined: Sun Jan 22, 2012 6:26 pm
Location: Italy

Re: Mangle not marking connections

Wed Mar 07, 2012 9:01 am

I think you need to add a "connection-state=new" to your mark connection mangle rules.

Here is an example of what I use (I use the forward chain but it will work as well on the pre-routing chain):
add action=mark-connection chain=forward connection-state=new dst-address-list=X new-connection-mark=conn-X 
Hope that helps.
 
vadood
just joined
Topic Author
Posts: 17
Joined: Sun Aug 29, 2010 11:28 am

Re: Mangle not marking connections

Wed Mar 07, 2012 10:17 am

Thank you for the hint, I will try and see the results

I want to figure out how mangle works, what happens if we do not state any connection-state= setting? will it mark all connections? will it only mark new connections? what is the default behavior?

documentation is so poor for mangle :(

Who is online

Users browsing this forum: Bing [Bot], psannz and 142 guests