Ubuntu

Tool To Limit Network Bandwidth In Ubuntu

Tool To Limit Network Bandwidth In Ubuntu

Insight: Tool To Limit Network Bandwidth In Ubuntu

Today we are going to talk about the method to control or limit network bandwidth in Ubuntu operating system. We will be using the tool “Wondershaper” to limit network bandwidth.

Not only in Ubuntu, Wondershaper helps you to limit network bandwidth in other Linux based operating systems too. Wondershaper is a command-line utility for limiting a network bandwidth.

Today, We will see how to limit network bandwidth in Ubuntu 18.04 LTS using Wondershaper.

Tool To Limit Network Bandwidth In Ubuntu

Run the following command in Ubuntu operating system to install Wondershaper in Ubuntu. Wondershaper is available in the official Ubuntu repositories

$ sudo apt-get install wondershaper

After installing, You need to enable the service to allow it to start every time automatically when the system starts. Run the following commands in the Terminal to enable and start the Wondershaper service in Ubuntu:

$ sudo systemctl enable wondershaper.service
$ sudo systemctl start wondershaper.service

Just in case if you want to verify the service.

$ sudo systemctl status wondershaper.service

How To Limit Network Bandwidth

If you want to limit the bandwidth for a specific interface, run the following command:

$ sudo wondershaper -a <interface> -d <rate> -u <rate>

-a: It defines interface name

-d: It defines download rate in kbps

-u: It defines upload rate in kbps

For example:

$ sudo wondershaper -a eth1  -d 32  -u 64

It will limit bandwidth for interface eth1 to be 32kbps for download and 64 kbps for upload.

If you want to clear or remove the bandwidth limits from an interface, run the command:

READ THIS ALSO  Install Oranchelo Icons Theme In Ubuntu And Other Linux

$ sudo wondershaper -c –a <interface>

There is an alternative method to install Wondershaper and  if you want to have Wondershaper with the latest updatesc then this is method for you:

Run the following command to navigate to the directory.

$ cd /bin

And add the following command:

$ git clone https://github.com/magnific0/wondershaper.git

This will clone wondershaper in your current folder in a new folder named wondershaper. Now go to the Wondershaper directory and install it:

$ cd wondershaper
sudo make install