Inspect QoS config in /etc/network
In the previous steps, you used the tc
command to view the currently active QoS configurations. While tc
shows the runtime state, the configuration files often determine how these settings are applied when the system starts or network interfaces are brought up.
On Debian-based systems like Ubuntu, network interface configurations are often managed in the /etc/network/interfaces
file and files within the /etc/network/interfaces.d/
directory. These files can include commands to be executed when an interface is configured, including tc
commands to set up QoS.
Let's inspect the main network configuration file. Open the terminal and use the cat
command to view the contents of /etc/network/interfaces
:
cat /etc/network/interfaces
Press Enter.
You will see the basic network interface configuration. In this LabEx environment, the output might look something like this:
## interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
This file defines the loopback interface (lo
) and the primary network interface (eth0
), which is configured to use DHCP to obtain an IP address.
QoS configurations are not typically placed directly in /etc/network/interfaces
for complex setups. Instead, they are often included in separate scripts or configuration snippets that are executed when the interface is brought up. These snippets might be located in the /etc/network/if-up.d/
directory. Scripts in this directory are executed after a network interface has been brought up.
Let's list the files in the /etc/network/if-up.d/
directory to see if there are any scripts related to QoS or traffic control:
ls /etc/network/if-up.d/
Press Enter.
The output will show the files present in that directory. You might see various scripts related to network configuration, but likely none specifically for complex QoS setups in this basic environment.
## Example output (may vary)
avahi-autoipd ethtool mountnfs ntp openssh-server resolvconf upstart
If there were scripts designed to apply tc
rules at boot time, they would typically reside here. For example, a script named qos-setup
in this directory could contain tc
commands to configure qdiscs and classes.
While you didn't find explicit QoS configurations in these standard locations in this basic environment, knowing where to look (/etc/network/interfaces
, /etc/network/interfaces.d/
, and /etc/network/if-up.d/
) is essential for understanding how QoS is persistently configured on a Linux system.
Click Continue to complete this lab.