Bandwidth management in the home office

Those who normally upload large amounts of data while away from home may have a problem with the cloud up-cloud or backup replication in times of home office. Similarly, family members may experience problems when they want to upload large amounts of data in parallel.

In order to avoid this, there are different approaches to distribute the available bandwidth in the best possible way without creating bottlenecks in the home network.

Traffic shaping

Applications or network clients can be prioritized by means of traffic shaping. For example, the PCs used for the home office can be given high priority in the router, other devices (in my setup e.g. the NAS) lower priority.

If you use a Fritz!Box, you can change these settings under Internet -> Filter -> Prioritization by default, only telephony is defined as a real-time application, and this should not be changed.

Priority setting in the Fritz!Box

Traffic limitation on the individual clients

In my setup, there is a regular replication between my NAS at home and a second NAS that is located in a different location. The two FreeNAS boxes are connected by a Wireguard connectionwhich is configured on a Raspberry Pi (which also FreeNAS starts automatically if necessary). Normally, replication runs in a few minutes, so the rest of the network traffic is not affected.

However, if there are major changes to be made or even data is added very freshly (in my scenario, a good 300 gigabytes of data are now being synchronized for the first time), this means a greater load on the upload.

The Fritzbox's traffic shaping doesn't seem to work perfectly here, at least the full load upload has caused the download to slow down as well - although the Wireguard connection has a low priority. The solution is to limit the bandwidth of the wireguard peer. This also has the advantage that at the other end the Internet is not completely overloaded by the download of data (the upload with 46 MBit/s is almost as fast as the download of the remote peer with 50 MBit/s).

For this I have developed the tool "tc" which is part of the package "iproute2" is. The basic operation is described directly in the Debian Wiki: https://wiki.debian.org/TrafficControl. The most useful mode (and the simplest for this purpose) is "Token Bucket Filter (TBF, by way of explanation)which simply limits the bandwidth of an interface, regardless of the application. Specifically I used the following settings:

tc qdisc add dev eth0 root tbf rate 35mbit latency 10ms burst 1540

eth0"must of course be replaced by the respective interface - the list of interfaces can be obtained under Linux using "ip a" just out. The available bandwidth should of course always be adjusted to your own circumstances, I would not use more than 80% of the total upload rate for a single PC.

The result: the bandwidth used for uploading has decreased. This can also be seen in the traffic monitor of the Fritz!Box:

Used upload bandwidth: easy to see when bandwidth limiting is enabled or disabled

Result: enough bandwidth for everyone

With the configured traffic prioritization in the Fritz!Box and the limitation of particularly bandwidth-intensive applications such as the synchronization of ZFS snapshots, there is enough bandwidth available at the end of the day to supply a total of 26 devices in the home network with Internet without any bottlenecks - now all that remains is to hope that the connection remains stable overall.

If you still have ideas & tips for a stable home network in the times of curfew and home office I would be happy about a comment!

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top