Page 1 of 1

Set bandwidth limit on WAN

Posted: Tue Sep 08, 2020 3:23 pm
by atuxnull
I do have a RB and i would like to put a bandwidth Limit on the WAN interface to 10Mbps. This is pppoe-out1 and it is on eth1.
May i have some help please?

Re: Set bandwidth limit on WAN

Posted: Tue Sep 08, 2020 3:42 pm
by xvo
/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=eth1

Re: Set bandwidth limit on WAN

Posted: Tue Sep 08, 2020 9:55 pm
by atuxnull
/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=eth1
Thanks a lot for the reply. Apart forbthe queues code, do i need to add anything else on the firewall or anywhere else?

Re: Set bandwidth limit on WAN  [SOLVED]

Posted: Tue Sep 08, 2020 10:23 pm
by xvo
/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=eth1
Thanks a lot for the reply. Apart forbthe queues code, do i need to add anything else on the firewall or anywhere else?
Nope, but I misread your original post a little, so the command should be:

/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=name-of-your-local-bridge

instead of

/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=eth1

Re: Set bandwidth limit on WAN

Posted: Thu Sep 10, 2020 7:38 am
by atuxnull
I have multiple WAN interfaces
  • pppoe-out1
  • pppoe-out2
  • lte1
  • lte2
  • eth1
and i would like to add a bandwidth limit to each one of them as in
  • pppoe-out1=10Mbps
  • pppoe-out2=unlimited
  • lte1=3Mbps
  • lte2=5Mbps
  • eth1=20Mbps
How would your code look like, then?

Re: Set bandwidth limit on WAN

Posted: Thu Sep 10, 2020 9:12 am
by BartoszP
Just multiply shown rule replacing change dst=????? parameter to the particular interface you want to limit ... that's all.

Re: Set bandwidth limit on WAN

Posted: Thu Sep 10, 2020 5:05 pm
by anav
Why would you want to cap the bandwidth the ISp provides. Seems like paying for 5 steaks and throwing away 2 of them.

Re: Set bandwidth limit on WAN

Posted: Fri Sep 11, 2020 8:10 am
by atuxnull
Why would you want to cap the bandwidth the ISp provides. Seems like paying for 5 steaks and throwing away 2 of them.
It's not that simple. The ISP has a fine on speed. so if i keep my speed under those levels then i will keep the bandwidth until the end of the billing cycle. Otherwise they impose a cap and you get the lowest speed they can provide.

Re: Set bandwidth limit on WAN

Posted: Fri Sep 11, 2020 9:09 pm
by anav
Ahh thank you!! Understanding the requirement is critical at least for me, it leads to the most efficient solution and less coding errors.
This is one case where there is a direct correlation to costs LOL.

Re: Set bandwidth limit on WAN

Posted: Sat Sep 12, 2020 2:44 am
by creatin
Usually ISP put restrictions on the speed once you use let's say 100 gb of traffic, after that it limits your speed to 5 mbit/s,
first time I hear ISP is limiting speed if you use full provided and I assume paid bandwidth

Re: Set bandwidth limit on WAN

Posted: Sat Sep 19, 2020 6:35 pm
by DarkNate
/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=eth1
Thanks a lot for the reply. Apart forbthe queues code, do i need to add anything else on the firewall or anywhere else?
Nope, but I misread your original post a little, so the command should be:

/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=name-of-your-local-bridge

instead of

/queue simple add dst=pppoe-out1 max-limit=10M/10M name=queue1 queue=default/default target=eth1
What if we leave target as blank though?

Re: Set bandwidth limit on WAN

Posted: Sat Sep 19, 2020 10:50 pm
by xvo
What if we leave target as blank though?
Should work the same way in this scenario.