How to Limit Bandwidth on Ubuntu and Debian (2 Easy Ways)

How to Limit Bandwidth on Ubuntu and Debian (2 Easy Ways)
User
8 Min Read
2025/07/02

When you have a low internet speed or limited bandwidth, traffic limiting becomes even more important. In such situations, multiple applications or users sharing the network connection may lead to congestion and reduced performance for everyone involved. This article will explore two effective methods to limit network bandwidth on Ubuntu and Debian systems. If purchasing a Linux VPS server is your goal, looking into the packages available on the Eldernode website would be advisable.

Why Limit Bandwidth on Ubuntu or Debian?

In today’s connected world, controlling our network bandwidth usage is crucial for optimizing internet performance and ensuring fair resource allocation. If you are an Ubuntu or Debian user seeking effective ways to limit network bandwidth, this guide will walk you through two clever methods. By employing these techniques, you will be able to prioritize critical tasks, manage network congestion, and enhance your overall browsing experience. Let’s dive in!

Method 1 – Limit Bandwidth Using Wondershaper

Wondershaper is a handy and open-source command-line utility that allows you to easily limit network bandwidth in Linux. It provides a simple way to configure the download and upload speeds for each network interface on your Linux machine.

Step 1: Install the Wondershaper tool

Wondershaper simplifies bandwidth management on Ubuntu and Debian systems. To install it, use the following command:

sudo apt-get install wondershaper

Step 2: Limit the bandwidth

To limit your bandwidth to 2 Mbps on a chosen interface (e.g., eth0), execute the following command:

sudo wondershaper eth0 2000 2000

Here, 2000 represents the limit for both upstream and downstream, measured in kilobits per second (Kbps). Please alter these values according to your needs.

Step 3: Verify the changes

To verify that the bandwidth control has been applied successfully, use the following command:

sudo wondershaper eth0

It should display the configured limits and other relevant information.

 

Testing Wondershaper on Ubuntu and Debian

After you know the network interface name, you will be able to test Wondershaper. For example, to set the bandwidth limit to 6 MB/s for download and 1 MB/s for upload on the enp0s3 Ethernet interface, do the following:

sudo wondershaper enp0s3 6144 1024

Now test your Internet speed at Speedtest.net to check if the above settings are applied or not. You should get the following result:

 

speedtest Bandwidth on Ubuntu and Debian

 

You can clear all the limits with the following command:

sudo wondershaper clear enp0s3

If you test your Internet speed after you clear all the limits, you will get the following result:

 

Removed bandwidth limits Speedtest

 

Method 2 – Limit Bandwidth Using TC (Traffic Control)

Step 1: Check requirements

Before proceeding, ensure that the “tc” and “traffic-control” packages are installed on your Ubuntu or Debian system. If any are missing, use the following command to install them:

sudo apt-get install iproute2

Step 2: Identify the network interface

To limit the bandwidth, we first need to identify the network interface that needs adjustment. Execute the following command to list your network interfaces:

ifconfig

Identify the relevant interface (e.g., eth0) for TC configuration.

Step 3: Limit the bandwidth

To limit the bandwidth of your chosen interface (for illustration purposes, let’s assume it’s eth0) to 1 Mbps, execute the following command:

sudo tc qdisc add dev eth0 root tbf rate 1mbit burst 10kb latency 70ms

Feel free to adjust the values (rate, burst, latency) according to your requirements. The “rate” and “burst” values control the maximum allowed bandwidth, while “latency” defines the simulated network delay.

Step 4: Verify the changes

To ensure that the bandwidth limit has been successfully applied, execute the following command:

$ sudo tc -s -d qdisc show dev eth0

You should see the configured values and no errors.

 

Additional Tips:

  • To remove bandwidth limitations, use the following command (dependent on the method used):
  • For TC: sudo tc qdisc del dev eth0 root
  • For Wondershaper: sudo wondershaper clear eth0
  • Experiment and fine-tune the parameters to suit your specific needs.
  • Utilize tools like Network Analyzer to monitor and analyze your network.

 

Conclusion

If you’ve ever noticed your connection slowing down when too many apps or users are online, you’re not alone. The good news? You don’t need fancy tools or advanced setups to take control of your bandwidth.

I’ve personally tested both Wondershaper and TC on Ubuntu and Debian. Wondershaper is great if you just want a quick, no-fuss solution. TC takes a bit more effort, but it gives you tighter control over how traffic flows.

Try both. See which one fits your needs better. Even simple limits can go a long way in keeping your network stable especially if you’re sharing bandwidth or running a VPS.

0 out of 0 votes
Leave a Reply

Full Name*
Email*
Comment *

Calculate the value of 9 - 1 :

Save my name, email, and website in this browser for the next time I comment.
Recent Replies
Show More

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day