Ros pcq speed limit alternative practice (Traffic Control/Time Control) carrying mirotik Technical Forum)

Source: Internet
Author: User
Tags passthrough winbox

Pcq Speed Limit
: For AAA from 1 to 254 DO = {/queue simple Add name = (PC. $ AAA) DST-address = (192.168.0 .. $ AAA) limit-at = 500000/500000 max-Limit = 3000000/3000000}

/IP firewall mangle
Add chain = prerouting action = mark-packet New-packet-mark = All-mark passthrough = Yes comment = "" Disabled = No

/Queue type
Add name = "pcq-up" kind = pcq-rate = 1500000 pcq-Limit = 50 pcq-classifier = Src-address pcq-total-Limit = 2000
Add name = "pcq-down" kind = pcq-rate = 1500000 pcq-Limit = 50 pcq-classifier = DST-address pcq-total-Limit = 2000

/Queue simple
Add name = "pcq" target-addresses = 192.168.0.0/24 DST-address = 0.0.0.0/0 interface = all parent = none packet-marks = All-mark direction = both priority = 1 Queue = pcq-up/pcq-down limit-at = 0/0 max-Limit = 15000000/15000000 total-queue = default-small Disabled = Yes

/System script
Add name = "pcqon" Source = ": if/(/[/queue SIM get/[/queue SIM find name =/"pcq/"/] disable/] = true /) do = {/queue SIM enable pcq} "policy = FTP, reboot, read, write, policy, test, winbox, password
Add name = "pcqoff" Source = ": if/(/[/queue SIM get/[/queue SIM find name =/"pcq/"/] disable/] = false /) do = {/queue SIM disable pcq} "policy = FTP, reboot, read, write, policy, test, winbox, password

/Tool traffic-Monitor
Add name = "pcqon" interface = Wan Traffic = received trigger = above threshold = 14800000 on-event = pcqon comment = "" Disabled = No
Add name = "pcqoff" interface = Wan Traffic = inclued trigger = below threshold = 5000000 on-event = pcqoff comment = "" Disabled = No
========================================================== ============
The above is the complete script. copy each segment directly. For more information, see the following description!

Below is a comment
For example, the static value of 15 MB is 3 MB, and the dynamic value of 1.5 MB is enabled after the value reaches 14.8m!

: For AAA from 1 to 254 DO = {/queue simple Add name = (PC. $ AAA) DST-address = (192.168.0 .. $ AAA) limit-at = 500000/500000 max-Limit = 3000000/3000000}

This is a static speed limit. Change 1to254 to your intranet IP address! For example, 2 to 120! 192.168.0. Here it is changed to your IP segment! Limit-at = 500000/500000 is the average speed of 500 K, and Max-Limit = 3000000/3000000 is the normal speed limit of 3 m!

Note that many of the experts in the Network Alliance have mistaken the ROS algorithm. Here I am shaking down, Ros is not 1kb = 8 kbit! But 1000 = 1 K 1000000 = 1 m

/IP firewall mangle
Add chain = prerouting action = mark-packet New-packet-mark = All-mark passthrough = Yes comment = "" Disabled = No

This is a fixed script!
/Queue type
Add name = "pcq-up" kind = pcq-rate = 1500000 pcq-Limit = 50 pcq-classifier = Src-address pcq-total-Limit = 2000
Add name = "pcq-down" kind = pcq-rate = 1500000 pcq-Limit = 50 pcq-classifier = DST-address pcq-total-Limit = 2000

Change "1500000" to "full-network upload speed and download speed" when you set the dynamic speed limit! Do not change others! This is 1.5 m!
/Queue simple
Add name = "pcq" target-addresses = 192.168.0.0/24 DST-address = 0.0.0.0/0 interface = all parent = none packet-marks = All-mark direction = both priority = 1 Queue = pcq-up/pcq-down limit-at = 0/0 max-Limit = 15000000/15000000 total-queue = default-small Disabled = Yes

Now we have established a dynamic speed limit policy! Replace 192.168.0.0/24 with your IP address segment! Max-Limit = 15000000/15000000 here is your total bandwidth. You can fill in the bandwidth you need for China Telecom! You don't need to change anything else, because you need to jump to the above!
/System script
Add name = "pcqon" Source = ": if/(/[/queue SIM get/[/queue SIM find name =/"pcq/"/] disable/] = true /) do = {/queue SIM enable pcq} "policy = FTP, reboot, read, write, policy, test, winbox, password
Add name = "pcqoff" Source = ": if/(/[/queue SIM get/[/queue SIM find name =/"pcq/"/] disable/] = false /) do = {/queue SIM disable pcq} "policy = FTP, reboot, read, write, policy, test, winbox, password

This is an inspiring script that inspires and disables dynamic scripts! Copy directly!
/Tool traffic-Monitor
Add name = "pcqon" interface = Wan Traffic = received trigger = above threshold = 14800000 on-event = pcqon comment = "" Disabled = No
Add name = "pcqoff" interface = Wan Traffic = inclued trigger = below threshold = 5000000 on-event = pcqoff comment = "" Disabled = No

This is traffic monitoring. I have 15 m settings inspired by 14.8m, enough. No latency or problems. We do not recommend that you change it too little. When Threshold = 5000000 is less than 5 MB, disable dynamic! You have mastered this! Try more!

Note that! Interface = Wan change wan to your Internet Nic!

Each of the above sections is required, and a few sections of this script are incomplete! Otherwise it will be ineffective!

For the time period to inspire the script, I sent it. I just need to change the last paragraph to OK! By the network alliance, feedback to the network alliance!

========================================================== ====================

/System scheduler Add name = timeon interval = 24 h start-time = 08:00:00 on-event = {pcqon} Disabled = No

/System scheduler Add name = timeoff interval = 24 h start-time = 23:59:59 on-event = {pcqoff} Disabled = No

========================================================== ======================================

Replace the last paragraph with this section, which is the time period control switch pcq!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.