Limit different traffic in day and night using Queue Tree

Hi

i have tested limit dffrent traffic in day and night with simple Queue and its worked perfectly , now i’m using another way of BW management using Firewall–Mangle – Mark Packets and using Queue tree to limits . the problem that with Queue tree the scadular not working , its show me that its active and show the next run time but the queue tree not take the changes , bellow the config i made .. i do appreciate any post for help in this :

ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; Normal connections
chain=forward action=mark-connection new-connection-mark=normal conn
passthrough=yes src-address-list=normal

1 ;;; Normal Packets
chain=forward action=mark-packet new-packet-mark=normal packets
passthrough=no connection-mark=normal conn




[admin@MikroTik] > queue tree print
Flags: X - disabled, I - invalid
0 name=“day” parent=global-out packet-mark=normal packets limit-at=0
queue=day priority=8 max-limit=0 burst-limit=0 burst-threshold=0
burst-time=0s

1 name=“night” parent=global-out packet-mark=normal packets limit-at=0
queue=night priority=8 max-limit=0 burst-limit=0 burst-threshold=0
burst-time=0s



[admin@MikroTik] > system script print
Flags: I - invalid
0 name=“day” owner=“admin”
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
run-count=0 source=queue tree enable day; /queue tree disable night

1 name=“night” owner=“admin”
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
run-count=0 source=queue tree enable night; /queue tree disable day


[admin@MikroTik] > system script print
Flags: I - invalid
0 name=“day” owner=“admin”
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
run-count=0 source=queue tree enable day; /queue tree disable night

1 name=“night” owner=“admin”
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
run-count=0 source=queue tree enable night; /queue tree disable day
[admin@MikroTik] >
[admin@MikroTik] > system scheduler print
Flags: X - disabled

NAME START-DATE START-TIME INTERVAL ON-EVENT RUN-COUNT

0 day mar/18/2011 01:49:00 1d day 0
1 night mar/18/2011 13:49:00 1d night 1



Regards

its 10 days since i post my issue .. till now no answers ..

Answer me and get Karma :slight_smile: :wink:

The run-counts are 0 and 1. What is the output of “/system clock print”?

Hi

thanks for post , here is the results of clock


[ahmed@MikroTik] > /system clock print
time: 12:22:08
date: apr/10/2011
time-zone-name: manual
gmt-offset: +00:00

Still waiting any post helpout in this issue …

IMHO in your scripts source should be:

source=/queue tree enable day; /queue tree disable night

In both scripts you didn’t type initial ‘/’

HTH,

Now the script and the scedular working but its not disable or enable the Day / night queue Tree

Queue names are not inside quotation marks, try this:

source=/queue tree enable "day"; /queue tree disable "night"

HTH,

ditonet , thanks for your effort but still the qeueue tree not take the changes , i see the run count in both script and scedular working fine but its not reflected to the qeueue tree .


Regards
Ahmed

Try to run this command

/queue tree enable "day"

from terminal and observe what happens with this queue.

Regards,

Hi

its accept it


[ahmed@MikroTik] > /queue tree enable “day”
[ahmed@MikroTik] >

and i tried disable it and enable it trough /queue tree disable “day” and /queue tree enable “day” and both is working on queue disable and enabling.

Regards
Ahmed

The last idea, check that your code is in two separated lines:

/queue tree enable "day"
/queue tree disable "night"

I made some tests and these scripts works for me perfectly (ROS 5.1)

HTH,

Thanks for your kind help , but still i can not success in this even after upgrade to 5.1 and put the script in two seperated lines , can you please do me favor and post the final working config for the script , scedular , clock and queue Tree .

i do appreciate your kind support .


Regards

Below is export from scripts and scheduler, it works 100%:

/system script
add name=day policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    source=\
    "/queue tree disable \"night_queue\";\r\
    \n/queue tree enable \"day_queue\";\r\
    \n"
add name=night policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    source="/queue tree enable \"night_queue\";\r\
    \n/queue tree disable \"day_queue\";"
    
/system scheduler
add disabled=no interval=2m name=day_time on-event=day policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=apr/18/2011 \
    start-time=10:48:00
add disabled=no interval=2m name=night_time on-event=night policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=apr/18/2011 \
    start-time=10:49:00

IMHO you should also set your clock according to your location (proper time zone) and set SNTP client with these settings:

/system ntp client
set enabled=yes mode=unicast primary-ntp=xxx.xxx.xxx.xxx secondary-ntp=yyy.yyy.yyy.yyy

List of time servers closer to you is here:
http://www.pool.ntp.org/en/
I didn’t export my ‘queue tree’ because it’s not important in this case, you was able to enable/disable queues manualy from command-line.

HTH,

Great , its perfectly work now ..

Thank you million time for your kind help .


Regards