Disable Queue at Certain Times

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.

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.

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.


:smiley: