hi friends
i want to know how i can put automatic queue for user for this senarios:
if download speed of be 150-300k in 30 s then queue 1 be active and user speed be 30k for 1 minute
thanks alot
Let’s think of it this way. If a connection has 300kbs for 30s, it means there are at least 9000kbps or 1125kB. Create a rule in firewall mangle:
/ip firewall mangle
add chain=forward action=add-dst-to-address-list protocol=tcp address-list=test address-list-timeout=1m in-interface=WAN out-interface=LAN connection-bytes=1125000-0
You can use that list to mark packets, and use packet marks on simple queue. But the list will be populated with more than one IP. To solve this, you would need a pcq queue with pcq-rate=30000:
/ip firewall mangle
add chain=forward action=mark-packet new-packet-mark=test passthrough=no src-address-list=test in-interface=WAN out-interface=LAN
/queue type
add name="PcqDown" kind=pcq pcq-rate=30000 pcq-limit=50 pcq-classifier=dst-addres pcq-total-limit=1500 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=128 pcq-dst-address6-mask=128
/queue simple
add name="test" target=LAN parent=none packet-marks=test priority=8/8 queue=PcqDown/PcqDown limit-at=0/0 max-limit=0/0 burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
Just an idea
Thanks so much.itsgood idea.i have a idea like this and i want to know about other mikrotik expert ideas.
Actually, now that I am thinking of it again, I got it wrong
The connection that I calculated as 1125kB, means a connection at a given time, not over 30 seconds. I have to rethink about it again, sorry.
i think one of the best soultion for this is use connection rate.