The simplest way to limit data rate for specific IP addresses and subnets on Mikrotik router.
Connect via SSH, and change to simple queue:
[admin@mikrotik] > queue simple
Add a new rule to limit upload and download speed to a maximum of 16Mb/s (16 Megabits == 2 Megabytes) for 10.1.1.17 IP address:
[admin@mikrotik] /queue simple> add comment="user_limit" target=10.1.1.17/32 dst=0.0.0.0/0 max-limit=16M/16M name="user" parent=none priority=8/8 queue=default-small/default-small disabled=no
Note that the rule above will also affect LAN speed.
[admin@mikrotik] /queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; user_limit
name="user" target=10.1.1.17/32 parent=none packet-marks="" priority=8/8 queue=default-small/default-small limit-at=0/0 max-limit=16M/16M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
To disable the rule:
[admin@mikrotik] /queue simple> disable 0
[admin@mikrotik] /queue simple> print
0 X ;;; user_limit
name="user" target=10.1.1.17/32 parent=none packet-marks="" priority=8/8 queue=default-small/default-small limit-at=0/0 max-limit=16M/16M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
To remove the rule:
[admin@mikrotik] /queue simple> remove 0
Is target and destination IP reverse? you example did not limit anything .. ..
confuse …
:(
Yes, thanks very much for spotting it. Should have been the other way around. Fixed.
does this work in bridge mode? I have been trying this simple queue for 1 week and nothing seems to work. Any idea what’s wrong?
Flags: X – disabled, I – invalid, D – dynamic
0 ;;; user_limt
name=”user” target=192.168.51.9/32 parent=none packet-marks=”” priority=8/8
queue=default-small/default-small limit-at=0/0 max-limit=2M/2M burst-limit=0/0
burst-threshold=0/0 burst-time=0s/0s
I used Mikrotik in a router mode only, so could not tell I’m afraid.