Saturday, September 10, 2011

Limit Queue Video Streaming

Limit Queue for Video Streaming "eg:Youtube" and Video Download using Layer7-Protocol.

LAYER7-PROTOCOL
/ip firewall layer7-protocol
add comment="" name=http-video regexp="http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][\
1-5][0-9][0-9][\\x09-\\x0d-~]*(content-type: video)"

IP FIREWALL MANGLE
/ip firewall mangle
add action=mark-packet chain=forward comment="Limit Video Streaming" disabled=no \
layer7-protocol=http-video new-packet-mark=Limit-Video passthrough=no \
protocol=tcp

QUEUE TREE
Note: This sample use bandwith limit 256k, you can change the limit as you need by edited "256000" to other Limit you needed.
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=256000 \
max-limit=256000 name=Limit-Video packet-mark=Limit-Video parent=global-out \
priority=8 queue=default