Community discussions

MikroTik App
 
youtube345
just joined
Topic Author
Posts: 13
Joined: Sun Jan 19, 2020 12:44 pm

Mange Rule - Chain Prerouting vs Forward

Tue Feb 18, 2020 10:15 am

Let say i have connection game online through port 5000-5500.
When i mark connection this UDP packet . Which chain is better ? (Prerouting vs Forward).


Ex1
/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=forward connection-mark=game new-packet-mark=packet_game passthrough=no
Ex2
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=forward connection-mark=game new-packet-mark=packet_game passthrough=no
Ex3
/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=prerouting connection-mark=game new-packet-mark=packet_game passthrough=no
Ex4
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=prerouting connection-mark=game new-packet-mark=packet_game passthrough=no
Which example is fastest ? I'm try to learn on wiki with Packet Flow Chains but don't understand much. Sorry for my idiot question .
 
User avatar
skylark
MikroTik Support
MikroTik Support
Posts: 138
Joined: Wed Feb 10, 2016 3:55 pm

Re: Mange Rule - Chain Prerouting vs Forward

Tue Feb 18, 2020 12:48 pm

It depends on what you want to do further with marked connections? If you want to prioritize traffic take a look here: viewtopic.php?t=149111
 
youtube345
just joined
Topic Author
Posts: 13
Joined: Sun Jan 19, 2020 12:44 pm

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 4:55 pm

It depends on what you want to do further with marked connections? If you want to prioritize traffic take a look here: viewtopic.php?t=149111
I will priority 1 all packet game. And surfing web prirority 2 . Download priority 3.
So can you help me which example at #1 is the best for my opinion mark packet game ?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 5947
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 5:08 pm

The thread he pointed to has all the information you need. The last entry was clear and simple for example.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
youtube345
just joined
Topic Author
Posts: 13
Joined: Sun Jan 19, 2020 12:44 pm

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 5:18 pm

The thread he pointed to has all the information you need. The last entry was clear and simple for example.
I'm still curious about Chain Prerouting or Forward ?
Because i read so many thread ,
A few people prerouting,prerouting for 2 mangle rule, said it it best for router take all connection than forward.
A few people use forward,forward, said router will forward packet to queue it will slow than prerouting.
A few people use prerouting,forward said prerouting will capture mark connection first after that we don't need prerouting to mark packet, just forward it will go faster to queue.
I don't know which one is best for my game priority. So i must beg some help here to clarify my mind ? Please look at ex1,2,3,4 and help me choose the best for game . Thank you.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 5947
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 5:31 pm

My recommendation is to avoid pre-routing until you have a deeper knowledge of MT coding.
Pre-routing can affect traffic you had no intention of messing with due to its non-discriminatory approach.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
youtube345
just joined
Topic Author
Posts: 13
Joined: Sun Jan 19, 2020 12:44 pm

Re: Mange Rule - Chain Prerouting vs Forward

Sat Feb 22, 2020 11:19 am

Bump
 
ahmedelbarbary
just joined
Posts: 5
Joined: Thu Dec 01, 2016 1:23 am

Re: Mange Rule - Chain Prerouting vs Forward

Tue Jan 05, 2021 3:01 am

i tested many ways to do this but the best
Prorouting for mark connection
forward for packets

Who is online

Users browsing this forum: No registered users and 94 guests