Community discussions

MikroTik App
 
User avatar
Arxondas
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Aug 02, 2015 12:23 pm
Location: Greece
Contact:

Priority to Port

Tue Dec 04, 2018 8:40 am

Hello all,

I need your help about a mangle rule.
I have a Server with mysql behide a mikrotik router. I want to give priority
to the mysql port (3306/tcp) over everything else for so mysql Server will always have best traffic from & to internet.

my mangle rules are :
/ip firewall mangle add action=mark-connection chain=forward disabled=no in-interace=wan1 new-connection-mark=server.upload passthrough=yes port=3306 protocol=tcp
/ip firewall mangle add action=mark-connection chain=forward disabled=no new-connection-mark=radius.downlad out-interface=wan1 passthrough=yes port=3306 protocol=tcp
/ip firewall mangle add action=mark-packet chain=forward connection-mark=server.upload disabled=no new-paket-mark=server.upload passthrough=yes
/ip firewall mangle add action=mark-packet chain=forward connection-mark=server.download disabled=no new-packet-mark=server.download passthrough=yes

then in queue tree I setup highest priority for this packets along with other rules with low priority.

Is that OK or I need to do something different.

Thank you.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12985
Joined: Thu Mar 03, 2016 10:23 pm

Re: Priority to Port

Tue Dec 04, 2018 8:43 am

There's nothing you can do to increase priority in DL direction ... that's up to your ISP to arrange. You can, though, increase priority in UL. For that, wan1 will be out-interface.
 
User avatar
Arxondas
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Aug 02, 2015 12:23 pm
Location: Greece
Contact:

Re: Priority to Port

Tue Dec 04, 2018 8:52 am

Hello,

Thx for your replay. Because mikrotik gives internet to other devices also except of the Server
I want when I connect to mysql from outside to have priority to traffic if my bandwidth is full because
some clients e.g. download something. Same for upload when the Server needs to answer to an external
client.

thanks
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: Priority to Port

Tue Dec 04, 2018 9:56 am

There's nothing you can do to increase priority in DL direction ... that's up to your ISP to arrange. You can, though, increase priority in UL. For that, wan1 will be out-interface.
From my experience, that's is not entirely true. Since most of the traffic on net is tcp based, one can limit the throughput of data coming from ISP and making sure QoS is ensured. To limit tcp connections, it suffices to drop when necessary some packets, which will result in:
* retransmission
* reduction of transmission speed (reduction of window) by sender

This can be achieved by attaching a queue to interface connected to lan. The approach is further similar to upload side.

Who is online

Users browsing this forum: cyrq, jaclaz, Techsystem, trustno1 and 34 guests