- Image Types:
- basesdk-amd64 / sdk-amd64 / target-armhf-internal / target-amd64
- Image Deployment:
Test basic traffic control support. This test does not use tcmmd but it could catch missing support in the kernel or misbehaving traffic control.
- A web server with a large file to download.
- Ensure Rootfs is remounted as read/write.
- Install dependencies
- Restart the system to restore the filesystem state to read-only before running the test.
- Check whether tcmmd >= 0.1.6 is installed:
- Check that tcmmd is not running (kill it if it was launched from a previous test)
- Check you have connectivity to your web server:
- Check what is your main network interface (eth0, ens32, wlan0...) and note your IP.
$ sudo mount -o remount,rw /
$ sudo apt install wget
$ sudo reboot
$ dpkg -l tcmmd
$ ps aux | grep tcmmd
$ wget http://$SERVER_IP/file
- As root, run the script:
- The script will install traffic control rules with different ingress bandwidth for TCP connections using the source port 12345 and other TCP connections. The rules will wait and you will have time to check the bandwidth with wget in another terminal.
- Check bandwidth usage from a random TCP source port:
- Check bandwidth usage with a specific TCP source port:
$ sudo MAIN_LINK=$NET_INTERFACE PORT=12345 /usr/share/tcmmd/tests/manual-test.sh
$ wget http://$SERVER_IP/file -O /dev/null
$ wget --bind-address=$SOURCE_IP --bind-port=12345 http://$SERVER_IP/file -O /dev/null
There should be no error.
Bandwidth usage with a random TCP source port should be around 4.8KB/s.
Bandwidth usage with a specific TCP source port should be around 78KB/s.
- If the script was interrupted, the traffic control rules can be removed with:
$ sudo tc qdisc del dev $NET_INTERFACE ingress