|« Google accuses Micro$oft of copying search results||New article about Hierarchical Temporal Memory has been released »|
How to limit internet bandwidth usage on Mikrotik router
Suppose that you have a Mikrotik router which is routing both LAN and Internet packets. You want to limit the Internet bandwidth on some ports. On Mikrotik you can use Simple Queues to limit Both Transmit and Receive bandwidth. But there is no direct option in the Queue settings to limit just the Internet bandwidth, and whole network bandwidth including LAN will be limited on the configured ports.
There is a table in the firewall section named Mangle. One of the usages of this table is marking packets. In other words you can assign a label to packets according to desired rule. This will help you to make further decisions whole around the Firewall/Router.
Mangle table can be used to solve the problem. you must add a rule to this Table. Telnet to the Mikrotik or use it's GUI/Web interfaces go to IP -> Firewall -> Mangle add a new rule with following settings:
- chain = prerouting
- action = mark-packet
- new-packet-mark = Internet
- passthrough = yes
Here dst-address=!192.168.0.0/16 (Take note of the '!' mark at first) is a sample for your network. You must configure it based on you network settings. Also if you need to limit just some ports you must configure the Interface setting. Applying this rule will mark all packets whose destination is not to LAN.
After marking packets you can add a rule in the Simple Queue to limit bandwidth just for packets marked as Internet.
Trackback address for this post
Feedback awaiting moderation
This post has 1 feedback awaiting moderation...