Mikrotik Queuing is heuristic , means every packet leaving mikrotik destined to your IP is capped, even ICMP/PING too.
So when client starts browsing or downloading any data , there will be less or no bandwidth available for PING/ ICMP packets and ping result from client to mikrotik OR to internet will be observing frequent timeout and high latency (in case of full usage of allocated bandwidth)
As shown in the image below …
NOTE:
It is recommended to limit (BUT DONOT BLOCK ICMP AS IT IS REQUIRED BY MANY MONITORING / CONNECTIVITY ASPECTS) .
Task: Simply mark icmp packets and and create a queue that allows more bandwidth to icmp marked packets. Make sure to move all these rules on top of other rules.
1- EXAMPLE OF PING/ICMP QUEUE USING SIMPLE QUEUE [overall capping]
########################################### # PING/ICMP Priority Script for Mikrotik to avoid timeout on user standard queue being used full # Checked on Mikrotik 5 / 6.x versions # Syed Jahanzaib / aacable @ hotmail . com # https://aacable.wordpress.com ########################################### # Connection PACKET marking for ICMP, for 6.x ROS versions /ip firewall mangle add action=mark-packet chain=forward new-packet-mark=icmp_pkts passthrough=no protocol=icmp add action=mark-packet chain=input new-packet-mark=icmp_pkts passthrough=no protocol=icmp add action=mark-packet chain=prerouting new-packet-mark=icmp_pkts passthrough=no protocol=icmp add action=mark-packet chain=postrouting new-packet-mark=icmp_pkts passthrough=no protocol=icmp add action=mark-packet chain=output new-packet-mark=icmp_pkts passthrough=no protocol=icmp /queue simple add max-limit=5M/5M name=ICMP_Priority packet-marks=icmp_pkts target=""
Note: Make sure to move all these rules in Mangle & Queue RULE on top of other rules.
Result after implementing above code.
2- SECOND EXAMPLE OF PING/ICMP QUEUE USING PCQ TREE | (FOR PER USER DISTRIBUTION)
The following script will mark icmp packets and will allow 32k per user for icmp traffic via PCQ / QUEUE TREE
/ip firewall mangle add action=mark-packet chain=prerouting comment="Mark ICMP I / zaib" new-packet-mark=ping_pkts_i protocol=icmp add action=mark-packet chain=postrouting comment="Mark ICMP O / zaib" new-packet-mark=ping_pkts_o protocol=icmp /queue type add kind=pcq name="ping_pkts_i_32K" pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-rate=32k pcq-src-address6-mask=64 add kind=pcq name="ping_pkts_o_32K" pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-rate=32k pcq-src-address6-mask=64 /queue tree add name=ping_pkts_i packet-mark=ping_pkts_i parent=global-out queue="ping_pkts_i_32K / zaib" add name=ping_pkts_o packet-mark=ping_pkts_o parent=global-out queue="ping_pkts_o_32K / zaib"
TIP: You can also use PRIORITY based queuing to give priority to ICMP packets from user own queue over other protocols.
Regard’s
Syed Jahanzaib
great bhai……
bhai qos ka koi guide b post kary..
LikeLike
Comment by usmans — December 9, 2011 @ 3:51 PM
Will work on it when I will get some time
LikeLike
Comment by Pinochio~:) — December 9, 2011 @ 4:28 PM
What kind of Q O S you are expecting>
LikeLike
Comment by Pinochio~:) — December 10, 2011 @ 8:32 PM
Thanx……
LikeLike
Comment by adeel — December 10, 2011 @ 4:40 PM
nice work bahi
thank you
LikeLike
Comment by waseem ahmed — January 26, 2012 @ 2:03 AM
Syed bahi ager 3.20 to upgrade 4.1 ho sakta hai tu plz guide me
thanks
LikeLike
Comment by waseem ahmed — January 26, 2012 @ 2:08 AM
It’s not possible.
Go and BUY the licensed version if you are using it for commercial purposes.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — January 26, 2012 @ 10:47 AM
Dear sir,
I have tried this but no difference it is the same case which i have defined before (when i am browsing or playing youtube video etc.. when i ping mikrotik server which local its delay time increase up to 3000ms and the internet will be slow and also if i want to access mikrotik server it takes too much to login in mikrotik server).
Please help me, if the above solution works fine than can you tell me sir that how i should apply this because i have applied before it doesn’t work.
LikeLike
Comment by Mohammad Ikram — July 2, 2012 @ 2:25 PM
dear sir
thankxx for urs coprtn….
sir mere pass yha problem ho rahee hai…. mai nai yha sprip bhi laga liya hai is kai bawajood mere wan ki ping high ho kar break hojata hai… so plz sovle it my problem…
LikeLike
Comment by waseem shaikh — December 1, 2012 @ 8:57 PM
dear sir
thankxx for urs coprtn….
sir mere pass yha problem ho rahee hai…. mai nai yha scrip bhi laga liya hai is kai bawajood mere wan ki ping high ho kar break hojata hai jb mai downloading lagata hn tb…1mb par jatey hai ping break hojata hai phir sahi ho jatee hai..
… so plz sovle it my problem…
LikeLike
Comment by waseem shaikh — December 1, 2012 @ 9:18 PM
regesterd or creak mikrotik os ka koi faida hta ha k nai???????????
LikeLike
Comment by w — July 12, 2013 @ 11:28 AM
Always use Registered version, that way you get vendor support and free upgrades.
Crack versions also works ok but its illegal to use them
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — July 16, 2013 @ 8:22 AM
Sir,
i am used this for caping icmp.it is amazing except ppoe users.is there any confiquration for ppoe users.
thanks
saravanan siva
LikeLike
Comment by saravanan — December 23, 2013 @ 7:54 PM
Asalamu Alikum,
I am using 2 wan’s for hotspot i configured your pcc script in my RB 1000 from router side i am able to ping both gateways but from client side our login page not appreaing if i type any address it was stuck. i would like to request you could you please give me the solution on it.
local IP 192.168.0.1/24
WAN1 192.168.1.1
WAN 192.168.10.100
Regards
jeelani
LikeLike
Comment by jeelani — September 21, 2014 @ 7:00 PM
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — September 22, 2014 @ 3:39 PM
Hi, Any update on this script to work on V6 version. I am finding IP capped using simple queue has a ping break
LikeLike
Comment by Sankar — August 19, 2015 @ 8:05 AM
We have a CCR router with OSV 6.31, configured with hotspot. The users under the hotspot are able to get icmp request for gateway but it is very high. Earlier on 450G we had mangle rules by which we would redirect the ICMP packets to ping in 1 ms. But we are not able to do that on OS 6.14. Kindly suggest us how to overcome this issue. Please provide examples if possible.
LikeLiked by 1 person
Comment by shafi — August 21, 2015 @ 3:18 PM
[…] Original Link […]
LikeLike
Pingback by Mikrotik Howto give PiNG / iCMP high Priority | SUMONCHAI — January 26, 2016 @ 2:42 PM
Dear Syed Jahanzaib dear maini mikrotik pc os Level 6 instal keya hain WAN Ke IP 192.168.10.1 hen or LAN ka Ip 192.168.88.1/24 hain maini server thek kam kar raha hain per jab main client pe PING CHECK KAR RAHA HO TO PING kahhby arhai hain or kabhy timed Out jab CLIENT koi b web open karta hain to Request Timed OUT ajata hain Pher 5 ye 6 bar reply ata hain Timed Out K wajha se Net Ckient Pe Slow Chal rahe hain so kindly help Kya Karo Please Koi Hall iska ap k pas
BEST REGARD GM BALOCH
LikeLike
Comment by Ghulam Murtaza Baloch — January 31, 2016 @ 7:36 PM
Obrigado. Funcionou aqui perfeitamente. Mikrotik versão 6.x.
LikeLike
Comment by Josué Guedes Ribeiro — December 24, 2016 @ 6:02 PM
Gracias!!!
LikeLike
Comment by pablo — March 29, 2017 @ 7:51 PM