Limit Any Device’s Speed on MikroTik (default-small / pfifo Simple Queues)

If you’ve ever needed to limit download/upload speed for a specific user, subnet, or an entire interface, Mikrotik’s simple queues are an easy way to achieve just that. There are various parameters within the simple queue menu, and I suggest reading up about these on the Mikrotik Wiki, however to create a basic queue that applies a limit to a specific target, only a few settings are required:

queue/simple/add max-limit=5M/5M queue=default-small/default-small target=192.168.0.0/24 name=test_queue

The command above creates a simple queue, the max-limit sets the upload/download speed, and “queue=x” sets the queuing algorithm.

Continue reading

Load-Balancing Src NAT Across Multiple Public IPs on MikroTik

In large NATTED networks, where the number of LAN devices create more connections than there are available ports, connections will stop working, and internet access will be intermittent due to port exhaustion.

Example: In a standard NAT setup on Mikrotik, NATTED connections each get one src port. By default Mikrotik NATS using the port range (1024–65535) – If the total amount of active connections out number ~64 thousand (ignoring any static ports), then the network will have exhausted all available ports, and subsequently new connections will not be possible until used ports become available again after connection timeouts.

Continue reading