Spis treści

Linux: TC - bandwidth limitation, transmission error induction and delays

programmes used to take measurements:

Connection diagram


Diagram generated using my script

Machine name Network card ip address gateway Virtual switch
ubuntu-tc eth0 192.168.1.1/24 X NET-A
eth1 192.168.2.1/24 X NET-B
ubuntu-tc-A eth0 192.168.1.10/24 192.168.1.1/24 NET-A
ubuntu-tc-B eth0 192.168.2.10/24 192.168.2.1/24 NET-B

Settings on the "Ubuntu-tc" machine

echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
sudo apt install git
git clone https://github.com/tum-lkn/tcgui
cd tcgui
sudo python3 main.py --ip 127.0.0.1

Settings on the rest of the machines

sudo apt-get update
sudo apt-get install iperf3

We still need to address them statically via the GUI or by using netplan

Test results table

Test description protocol loss bandwidth delay [ms]
Delay tests
Test without added delay icmp 0% 1,131
Test with added 10ms delay result from 100 measurements icmp 0% 11,020
test with added 100ms delay result from 100 measurements icmp 0% 101,071
test with added 1000ms delay result from 100 measurements icmp 0% 1000,911
UDP bandwidth tests protocol Lost/Sent bandwidth delay [ms]
Unlimited 30s test (UDP 1Gbps iperf) UDP 998 Mbps
300Mbps 30s bandwidth limitation (UDP iperf) UDP 72% 282 Mbps
Bandwidth limitation to 100Mbps 30s (UDP iperf) UDP 91% 94.3 Mbps
10Mbps 30s bandwidth limitation (UDP iperf) UDP 99% 9.72 Mbps
Bandwidth limitation to 1Mbps 30s (UDP iperf) UDP 1e+02% 972 kbps
TCP bandwidth tests protocol retransmissions bandwidth delay [ms]
Unlimited 30s test (TCP iperf) TCP 2 10.3 Gbps
Bandwidth limitation to 300Mbps 30s (TCP iperf) TCP 0 282 Mbps
Bandwidth limitation to 100Mbps 30s (TCP iperf) TCP 0 94.3 Mbps
Bandwidth limitation to 10Mbps 30s (TCP iperf) TCP 152 9.72 Mbps
Bandwidth limitation to 1Mbps 30s (TCP iperf) TCP 0 972 kbps
Other Tests
Round trip link test 10Mbps, latency 2000ms, urata 3%, corrupted 10% (ping 100 measurements) ICMP 24% 4001,69
10Mbps round trip link test, latency 600ms, loss 3%, corrupted 10% (TCP iperf) TCP 23 82 kbps
10Mbps round trip link test, latency 600ms, loss 3%, faulty 10% (UDP iperf) UDP 99% 7.79 kbps
60Mbps round trip link test, 600ms latency, 5% loss (UDP iperf) UDP 98% 14.7 Mbps

Delay tests

Test without added delay

Test with added delay 10ms result from 100 measurements

test with an added delay of 100ms result from 100 measurements

test with an added delay of 1000ms result from 100 measurements

test with added delay of 5000ms result from 100 measurements

Bandwidth limitation test

Unlimited 30s test (UDP 1Gbps iperf)

Bandwidth limited to 300Mbps 30s (UDP iperf)

Bandwidth limitation to 100Mbps 30s (UDP iperf)

Bandwidth limitation to 10Mbps 30s (UDP iperf)

Bandwidth limitation to 1Mbps 30s (UDP iperf)

Unlimited test 30s (TCP iperf)

Bandwidth restriction up to 300Mbps 30s (TCP iperf)

Bandwidth limitation to 100Mbps 30s (TCP iperf)

Bandwidth limitation to 10Mbps 30s (TCP iperf)

Bandwidth limitation to 1Mbps 30s (TCP iperf)

Round trip link test 10Mbps, latency 2000ms, urata 3%, faulty 10% (ping 100 measurements)

10Mbps round trip link test, latency 600ms, loss 3%, corrupted 10% (TCP iperf)

10Mbps round trip link test, 600ms latency, 3% loss, 10% corrupted (UDP iperf)

60Mbps round trip link test, 600ms latency, 5% loss (UDP iperf)