Community discussions

MikroTik App
 
zaherhamiyah
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 82
Joined: Thu Mar 23, 2006 12:43 am

Disable Queue at Certain Times

Tue Apr 24, 2018 6:34 am

Hello Guys,

I have simple queues (QoS per user-ip) with limitation during day and unlimited speeds after midnights
I have also queue tree, for traffic prioritization.

Users after midnight are limited by queue tree only. For example if someone watching youtube or downloading something from internet, his or her speed will be limited based on traffic type.

I wonder how to automatically disable queue tree after midnight.

Thanks.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Disable Queue at Certain Times  [SOLVED]

Tue Apr 24, 2018 2:30 pm

Create a schedule and then issue command to disable or enable queue on event
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Disable Queue at Certain Times

Tue Apr 24, 2018 3:31 pm

Create a schedule and then issue command to disable or enable queue on event
Or set different packet marking rules in mangle table based on time schedule:
/ip firewall mangle
add chain=prerouting action=mark-connection time=0h-6h,sun,mon,tue,wed,thu,fri,sat new-connection-mark=night
add chain=prerouting action=mark-connection time=6h-1d,sun,mon,tue,wed,thu,fri,sat new-connection-mark=day
The beauty here is that the rule becomes inactive (ok, "invalid") outside its specified time, so it is not processed at all so doesn't waste resources:
[me@MyTik] > /ip firewall mangle print where action=mark-connection
Flags: X - disabled, I - invalid, D - dynamic
 0 I  ;;; inactive time
      chain=prerouting action=mark-connection new-connection-mark=night time=0s-6h,sun,mon,tue,wed,thu,fri,sat

 1    chain=prerouting action=mark-connection new-connection-mark=day time=6h-1d,sun,mon,tue,wed,thu,fri,sat

The
action
of the rule can be a
jump
to a chain of classification rules of course.
 
zaherhamiyah
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 82
Joined: Thu Mar 23, 2006 12:43 am

Re: Disable Queue at Certain Times

Tue Apr 24, 2018 8:33 pm

Thanks CZFan and Sindy.

I knew that i can play with mangle rules times or scheduling, but it is a administrative headache to work on both solutions.

But i think i prefer to work on CZFan's method.

I hope Mikrotik guys, add timeing option for queue tree section.


:-D

Who is online

Users browsing this forum: ivankrosl, Mosmos and 123 guests