traffic-control-basic manual

low

Image Types:
basesdk-amd64 / sdk-amd64 / target-armhf-internal / target-armhf / target-amd64
Image Deployment:
APT
Type:
functional

Description

Test basic traffic control support. This test does not use tcmmd but it could catch missing support in the kernel or misbehaving traffic control.


Resources

  • A web server with a large file to download.

Pre Conditions

  1. Ensure Rootfs is remounted as read/write.
  2. $ sudo mount -o remount,rw /

  3. Install dependencies
  4. $ sudo apt install wget

  5. Restart the system to restore the filesystem state to read-only before running the test.
  6. $ sudo reboot

  7. Check whether tcmmd >= 0.1.6 is installed:
  8. $ dpkg -l tcmmd

  9. Check that tcmmd is not running (kill it if it was launched from a previous test)
  10. $ ps aux | grep tcmmd

  11. Check you have connectivity to your web server:
  12. $ wget http://$SERVER_IP/file

  13. Check what is your main network interface (eth0, ens32, wlan0...) and note your IP.
  14. $ ifconfig


Execution Steps

  1. As root, run the script:
  2. $ sudo MAIN_LINK=$NET_INTERFACE PORT=12345 /usr/share/tcmmd/tests/manual-test.sh

  3. 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.
  4. Check bandwidth usage from a random TCP source port:
  5. $ wget http://$SERVER_IP/file -O /dev/null

  6. Check bandwidth usage with a specific TCP source port:
  7. $ wget --bind-address=$SOURCE_IP --bind-port=12345 http://$SERVER_IP/file -O /dev/null


Expected

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.


Post Conditions

  1. If the script was interrupted, the traffic control rules can be removed with:
  2. $ sudo tc qdisc del dev $NET_INTERFACE ingress