Site Tools


bandwidth_limiter

This is an old revision of the document!


Bandwidth Limiter

First, let's clarify what Bandwidth Limiter is and what is is not. Bandwidth Limiter is not QoS. Bandwidth Limiter is a function to limit the bandwidth used by one or more client devices on the network. Bandwidth Limiter does not prioritize one type of traffic over another type. It prioritizes one client device or group of client devices over others.

By contrast, QoS anaylzes all traffic and follows rules for prioritizing one type of traffic over another, based on all clients on the network. In a sense, Bandwidth Limiter is a more crude tool, whereas QoS might be considered a little more refined. Confusingly, however, Bandwidth Limiter shares a few settings with QoS. When Bandwidth Limiter is enabled, QoS should be disabled, and vice versa. If both are enabled, they will conflict with each other and neither will work.

The Bandwidth Limiter menu is divided into sections. These sections typically include:

  • Bandwidth Limiter for LAN (br0)
  • Default Class for unlisted MAC / IP's in LAN (br0)
  • Default Class for LAN1 (br1)
  • Default Class for LAN2 (br2)
  • Default Class for LAN3 (br3)

Your menu may have slightly different options, depending on its hardware specifications.

One easy way to learn which clients are the “guilty” when it comes to using bandwidth, is to check the IP Traffic/View Graphs menu. There, a pie chart clearly indicates the bandwidth used by each address. If you're not sure the guilty client is active now, check the history using the Last 24 Hours, Weekly or Monthly menus. This will help guide your decisions.

Default Class for unlisted MAC / IP's in LAN (br0)

As said above, clients with a static IP address can still gain network access. Tomato needs a mechanism to ensure those clients not in the Static DHCP (Reservation)/ARP /IPT list are also categorized for bandwidth limiting. The Default Class for unlisted MAC / IP's in LAN (br0) function does this. This lets you set the default Class (bandwidth priority) for MAC/IP addresses on the main LAN, not listed in the (Static) DHCP Reservation/ARP table. This will ensure Bandwidth Limiter manages the bandwidth of static clients as well. These settings apply to the main LAN, that is: LAN0 (bridge 0).

NOTE: The sections following this are analogous, except they apply to a different (virtual) interface. For example, Default Class for unlisted MAC / IP's (LAN1 (br1) applies to clients on LAN1 (bridge 1).

Enable: Checking this box enables Bandwidth Limiter.

Max Available Download: Here you enter the Maximum Available Download speed of the network's Internet connection. This is not literal. You should actually enter a number calculated as follows: (minimum speed of 3 download tests done at different times of the day, x 85%). QoS should be disabled when the speed tests are run, and there should be no other traffic. Doing this will calculate realistic numbers for bandwidth. This will drastically improve the chances Bandwidth Limiter will work properly.

Max Available Upload: Here you enter the Maximum Available Upload speed of the network's Internet connection. This is not literal. You should actually enter a number calculated as follows: (minimum speed of 3 upload tests done at different times of the day, x 85%). QoS should be disabled when the speed tests are run, and there should be no other traffic. Doing this will calculate realistic numbers for bandwidth. This will drastically improve the chances Bandwidth Limiter will work properly.

IP: Here, enter the IP address of one network client you want to limit. This field is shared. In each row, you can enter an IP Address, a range of IP addresses, or a MAC address. Only one type can be entered at a time. See NOTE below.

IP Range: Here, (in the same field), you can enter a range of IP addresses, using the syntax “starting address-last octet of ending address”. For example, enter: 192.168.1.4-7 to cover the range: 192.168.1.4 - 192.168.1.7 . See Note below.

MAC Adddress: Here, you can enter the 12-character MAC address of one client device you wish to limit. Each MAC Address must be entered individually. <Fix ME!> Is there a way to bulk enter MAC Addresses for Bandwidth Limiter from CLI?

NOTE: A quicker, easier way to enter individual IP or MAC Addresses is from the Device List menu. In Device List, click on [bwlimit] for each client to limit. Device List will then take you back to the Bandwidth Limiter menu to enter the settings for each address.

NOTE: If you enter IP address(es), the clients specfiied should be using a static IP, or (Static) DHCP Reservation. If they're not, those clients might be assigned a different IP address. Then, Bandwidth Limiter would not not work clients whose addresses changed from ones you originally configured. Entering MAC addresses instead will help avoid that problem, since officially, MAC addresses never change.

DLRate: Download Rate is the minimum download speed Tomato will try to allocate to the client when other clients on the list are also downloading. The total of this column for all network clients on the list should not overcome the total “Download Bandwidth.” If the amount exceeds “Download Bandwidth”, the entered data will serve no purpose when all network clients are downloading data. <Fix <ME!> Needs to be more clearly explained.

DLCeil: Download Ceiling is the maximum download speed Tomato will allocate to the client when more bandwidth is available. These conditons includ when other network clients are off, or using less bandwidth than normal. The less bandwidth they use, the more becomes available to allocate to the clients specified, especially those categorized with higher priority settings.

Priority: This sets the position of the bandwidth rule (relative to other network clients) in Tomato's netfilter module. Tomato has five priority settings. The higher the setting, the more preference will be given to that client's allocated bandwidth, relative to other client devices. Clients with higher priority settings will also experience lower latency, but only as a side effect of being earlier than other clients in netfilter's priority list.

TCP Limit: This is the maximum number of active connections for this IP address. Limiting active TCP connections is particularly useful for avoiding network saturation due to download utilities, or P2P programs, such as BitTorrent.

UDP Limit: Here, specify the maximum UDP connections that can be opened per second for the specified IP address. This can also be very helpful in limiting network saturation due to download utllities, and P2P programs, such as BitTorrent.

Default Class for LAN1 (br1)

These settings are analogous to the above, but apply to clients on VLAN1 also known as LAN1/(bridge 1). The same settings apply respectively to all other Default Class for LAN (br) sections in this menu.

Bandwidth Limiter Notes and Troubleshooting

WAN Reboot: Bandwidth Limiter is supposed to reboot the WAN interface only when Captive Portal is enabled. However, up to and including release 2020.8, Bandwidth Limiter will reboot the WAN interface, even if Captive Portal is disabled. This means the router will drop the Internet connection until the WAN interface is reinitialized and the the WAN connection is renegotiated. This will be fixed in the next release.

Default Class for unlisted MAC / IP's in LAN (br0)

As said above, clients with a static IP address can still gain network access. Tomato needs a mechanism to ensure those clients not in the Static DHCP (Reservation)/ARP /IPT list are also categorized for bandwidth limiting. The Default Class for unlisted MAC / IP's in LAN (br0) function does this. This lets you set the default Class (bandwidth priority) for MAC/IP addresses on the main LAN, not listed in the (Static) DHCP Reservation/ARP table. This will ensure Bandwidth Limiter manages the bandwidth of static clients as well. These settings apply to the main LAN, that is: LAN0 (bridge 0).

NOTE: The sections following this are analogous, except they apply to a different (virtual) interface. For example, Default Class for unlisted MAC / IP's (LAN1 (br1) applies to clients on LAN1 (bridge 1).

Enable: Checking this box enables Bandwidth Limiter.

Max Available Download: Here you enter the Maximum Available Download speed of the network's Internet connection. This is not literal. You should actually enter a number calculated as follows: (minimum speed of 3 download tests done at different times of the day, x 85%). QoS should be disabled when the speed tests are run, and there should be no other traffic. Doing this will calculate realistic numbers for bandwidth. This will drastically improve the chances Bandwidth Limiter will work properly.

Max Available Upload: Here you enter the Maximum Available Upload speed of the network's Internet connection. This is not literal. You should actually enter a number calculated as follows: (minimum speed of 3 upload tests done at different times of the day, x 85%). QoS should be disabled when the speed tests are run, and there should be no other traffic. Doing this will calculate realistic numbers for bandwidth. This will drastically improve the chances Bandwidth Limiter will work properly.

IP: Here, enter the IP address of one network client you want to limit. This field is shared. In each row, you can enter an IP Address, a range of IP addresses, or a MAC address. Only one type can be entered at a time. See NOTE below.

IP Range: Here, (in the same field), you can enter a range of IP addresses, using the syntax “starting address-last octet of ending address”. For example, enter: 192.168.1.4-7 to cover the range: 192.168.1.4 - 192.168.1.7 . See Note below.

MAC Adddress: Here, you can enter the 12-character MAC address of one client device you wish to limit. Each MAC Address must be entered individually. <Fix ME!> Is there a way to bulk enter MAC Addresses for Bandwidth Limiter from CLI?

NOTE: A quicker, easier way to enter individual IP or MAC Addresses is from the Device List menu. In Device List, click on [bwlimit] for each client to limit. Device List will then take you back to the Bandwidth Limiter menu to enter the settings for each address.

NOTE: If you enter IP address(es), the clients specfiied should be using a static IP, or (Static) DHCP Reservation. If they're not, those clients might be assigned a different IP address. Then, Bandwidth Limiter would not not work clients whose addresses changed from ones you originally configured. Entering MAC addresses instead will help avoid that problem, since officially, MAC addresses never change.

DLRate: Download Rate is the minimum download speed Tomato will try to allocate to the client when other clients on the list are also downloading. The total of this column for all network clients on the list should not overcome the total “Download Bandwidth.” If the amount exceeds “Download Bandwidth”, the entered data will serve no purpose when all network clients are downloading data. <Fix <ME!> Needs to be more clearly explained.

DLCeil: Download Ceiling is the maximum download speed Tomato will allocate to the client when more bandwidth is available. These conditons includ when other network clients are off, or using less bandwidth than normal. The less bandwidth they use, the more becomes available to allocate to the clients specified, especially those categorized with higher priority settings.

Priority: This sets the position of the bandwidth rule (relative to other network clients) in Tomato's netfilter module. Tomato has five priority settings. The higher the setting, the more preference will be given to that client's allocated bandwidth, relative to other client devices. Clients with higher priority settings will also experience lower latency, but only as a side effect of being earlier than other clients in netfilter's priority list.

TCP Limit: This is the maximum number of active connections for this IP address. Limiting active TCP connections is particularly useful for avoiding network saturation due to download utilities, or P2P programs, such as BitTorrent.

UDP Limit: Here, specify the maximum UDP connections that can be opened per second for the specified IP address. This can also be very helpful in limiting network saturation due to download utllities, and P2P programs, such as BitTorrent.

Default Class for LAN1 (br1)

These settings are analogous to the above, but apply to clients on VLAN1 also known as LAN1/(bridge 1). The same settings apply respectively to all other Default Class for LAN (br) sections in this menu.

Bandwidth Limiter Notes and Troubleshooting

WAN Reboot: Bandwidth Limiter is supposed to reboot the WAN interface only when Captive Portal is enabled. However, up to and including release 2020.8, Bandwidth Limiter will reboot the WAN interface, even if Captive Portal is disabled. This means the router will drop the Internet connection until the WAN interface is reinitialized and the the WAN connection is renegotiated. This will be fixed in the next release.

/home/fresoehv/wiki/data/pages/bandwidth_limiter.txt · Last modified: 2021/04/11 00:45 by hogwild