Page 1 of 1

Youtube limit queue

Posted: Thu Nov 20, 2008 6:01 am
by maksima4net
Please help howe to limit youtube bandwith in my mikrotik !!

have tried with the script

/ system scheduler
\n:if \e="youtobe" on-event=":foreach i in=\[/ip dns cache find\] do={
\n:log \find \[/ip dns cache get \$i name\] \"youtube\"\] > 0) do={
info (\"youtube: \" . \[/ip dns cache get \$i name\] . \" (ip address \" . \
\n/ip firewall address-list add \ss\] . \")\")
address=\[/ip dns cache get \$i address\] list=youtube \
\n}" start-date=sep/12/2007 start-time=21:00:00 \
interval=1m comment="" disabled=no

and

/ ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=youtube \
passthrough=yes src-address-list=youtube comment="" disabled=no

add chain=prerouting action=mark-packet new-packet-mark=youtube passthrough=no \
connection-mark=youtube comment="" disabled=no

and

/ queue simple
add name="youtube" dst-address=0.0.0.0/0 interface=all parent=none \
packet-marks=youtube direction=both priority=8 \
queue=PCQ_download/PCQ_download limit-at=0/0 max-limit=20000/20000 \
total-queue=default-small time=0s-1d,sun,mon,tue,wed,thu,fri,sat \
disabled=no

but

this is error

Please Help me !!

Re: Youtube limit queue

Posted: Thu Nov 20, 2008 8:39 am
by mrz
Scheduler:
add on-event=" is missing after / system scheduler and probably even beginning of script.

Queue error:
Try putting youtube in quotes, example,
packet-marks="youtube"

Re: Youtube limit queue

Posted: Thu Nov 20, 2008 6:44 pm
by joysolutions
/ system scheduler
\n:if \e="youtobe" on-event=":foreach i in=\[/ip dns cache find\] do={

try to recorrect that i had bold.

youtube or youtobe ?

Re: Youtube limit queue

Posted: Thu Nov 20, 2008 9:15 pm
by bellis
lol... i've often wished the winbox had a spellcheck :)

Re: Youtube limit queue

Posted: Sun Jan 11, 2009 4:11 pm
by pokeman
can anyone find out the error

youtube.JPG