What are some of the scripts we used?
Script Used In The Third Experiment
This SQM script configures the network interfaces enp3s0 and enxc0a0bb58a8d1 to use the cake queuing discipline, which is designed to minimize latency while still ensuring that bandwidth is fairly allocated among competing flows. Here's a step-by-step breakdown of how the script works.
tc qdisc delete root dev enp3s0 - This deletes any existing queue disciplines on the enp3s0 interface.
tc qdisc add root dev enp3s0 cake bandwidth 100Mbit ethernet - This adds the cake queuing discipline to the enp3s0 interface, with a bandwidth setting of 100Mbit and ethernet as the underlying link layer.
tc -s qdisc show dev enp3s0 - This displays the queue discipline settings for the enp3s0 interface, which should now show the cake queuing discipline with the specified settings.
ip link add name br0 type bridge - This creates a bridge interface named br0.
ip link set dev br0 up - This brings the br0 interface up.
ip link set dev enp3s0 master br0 - This adds the enp3s0 interface to the br0 bridge.
ip link set dev enxc0a0bb58a8d1 master br0 - This adds the enxc0a0bb58a8d1 interface to the br0 bridge.
dhclient br0 - This requests an IP address for the br0 bridge via DHCP.
modprobe sch_cake - This loads the sch_cake kernel module, which provides the cake queuing discipline.
tc qdisc delete root dev enxc0a0bb58a8d1 ; tc qdisc add root dev enxc0a0bb58a8d1 cake bandwidth 90Mbit docsis - This deletes any existing queue disciplines on the enxc0a0bb58a8d1 interface and adds the cake queuing discipline with a bandwidth setting of 90Mbit and docsis as the underlying link layer.
tc qdisc delete root dev enp3s0 ; tc qdisc add root dev enp3s0 cake bandwidth 25Mbit docsis - This deletes any existing queue disciplines on the enp3s0 interface and adds the cake queuing discipline with a bandwidth setting of 25Mbit and docsis as the underlying link layer.
tc qdisc show - This displays the queue discipline settings for all interfaces, which should now show the cake queuing discipline with the specified settings on both enp3s0 and enxc0a0bb58a8d1.
Script Used In The Last Experiment
This script sets up a traffic control policy for the eno1.2 interface that prioritizes traffic based on filters and ensures that the delay and congestion are kept under control using a combination of HTB and fq_codel algorithms.
tc qdisc add dev eth1 root handle 1: htb default 1 - This sets up a hierarchical token bucket (HTB) queuing discipline on the eth1 network device, with a root class ID of 1 and a default class ID of 1.
tc class add dev eth1 parent 1: classid 1:1 htb rate 950kbit quantum 1514 - This adds a new child class under the root class, with a class ID of 1:1. The class is assigned a rate of 950 kbit/s and a quantum value of 1514.
tc qdisc add dev eth1 parent 1:1 fq_codel target 15ms noecn - This adds a Fair Queuing (fq_codel) discipline to the 1:1 class under eth1. This helps manage and prioritize network traffic by controlling packet scheduling. The "target 15ms" option sets the target queuing delay to 15 milliseconds, while "noecn" disables Explicit Congestion Notification (ECN) marking.
tc qdisc add dev eth2 root handle 1: htb default 1 - This sets up a HTB queuing discipline on the eth2 network device, similar to what was done for eth1.
tc class add dev eth2 parent 1: classid 1:1 htb rate 950kbit quantum 1514 - This adds a new child class under the root class on eth2, with the same rate and quantum values as the previous class.
tc qdisc add dev eth2 parent 1:1 fq_codel target 15ms noecn - This adds a fq_codel discipline to the 1:1 class under eth2, similar to what was done for eth1.