Community discussions

MikroTik App
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Limit different traffic in day and night using Queue Tree

Fri Mar 18, 2011 2:02 pm

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
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Mon Mar 28, 2011 3:11 pm

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

Answer me and get Karma :) ;)
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Limit different traffic in day and night using Queue Tre

Mon Mar 28, 2011 4:19 pm

The run-counts are 0 and 1. What is the output of "/system clock print"?
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 10, 2011 12:23 pm

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
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Fri Apr 15, 2011 12:17 am

Still waiting any post helpout in this issue ...
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Limit different traffic in day and night using Queue Tre

Fri Apr 15, 2011 2:02 am

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,
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 17, 2011 1:37 am

Now the script and the scedular working but its not disable or enable the Day / night queue Tree
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 17, 2011 2:03 am

Queue names are not inside quotation marks, try this:
source=/queue tree enable "day"; /queue tree disable "night"
HTH,
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 17, 2011 12:01 pm

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
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 17, 2011 2:23 pm

Try to run this command
/queue tree enable "day"
from terminal and observe what happens with this queue.

Regards,
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 17, 2011 3:00 pm

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
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Limit different traffic in day and night using Queue Tre

Sun Apr 17, 2011 4:41 pm

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,
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Mon Apr 18, 2011 10:03 am

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
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Limit different traffic in day and night using Queue Tre

Mon Apr 18, 2011 12:04 pm

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,
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: Limit different traffic in day and night using Queue Tre

Mon Apr 18, 2011 2:01 pm

Great ,,, its perfectly work now ..

Thank you million time for your kind help .


Regards

Who is online

Users browsing this forum: No registered users and 6 guests