First of all: Don’t hate because of another stupid rate limiting question, I did search, but I didn’t find an answer
The point is that I don’t wanna limit a single IP, application or something, I’d like to limit the 100mbps port which is connected to my switch. Normally I would do that on the switch, but at this location I only have a simple L2 switch with no rate limiting features.
Since I don’t want my MT Router to consume 100mbps I was looking in the forum for a solution to do a “per port” rate limiting (something like CAR) and found the “/interface set 0 rx-rate= tx-rate=” command. Is this a good way to solve my problem and limit the port to 6mbps? How does this command fullfill its job exactly?
This command will not limit data as you wish.
You have to add mangle rules that will mark traffic for ‘in/out’ interface, add queues for the particular ‘packet-marks’.
Well, this command actually DOES some reate limiting, not very accurate although. I’m just wondering how it is done, if there are any bursts possible, if it drops or queues, …
Command provided in the first post does not provide ‘rate limiting’.
Burst are implemented to the queues, burst techique is described in the ‘Bandwidth control’ documentation.
Hmmmm, to be honest, when I read my own posting I see that maybe I explained it a bit wrong… With PORT I actually don’t mean a port like 21, 22, 80, 53, 443, … I DO MEAN a physical port, like ether1. An interface so to say…
Please excuse my wrong expression
My aim is to just attach the RB to a 100mbit switch port and no matter what ports, services, … they use BEHIND it should be just limited to a maximum bandwidth for about 6mbit. I guess in this case the command above would be ok for my RB WAN Interface?
yes, in that case if you want to allow only 6Mbps for users behind, than this is correct solution for you.
just do not forget that you added it there, in case you want to increase it someday.
edit:
jsut checked that out, that in 2.9.42 there is no such option available for interface. so use simple queues and mangle as sergejs suggested in the first post.
BTW: Do you have some more info for me how this limiting works? Is it dead sharp, are bursts allowed and how does it handle traffic that is above the limit?