0

Background

I have a system running Ubuntu which has two interfaces eno1 and enp4s0. I have created an OVS bridge using:

ovs-vsctl add br s1

I added the two physical interfaces eno1 and enp4s0 to the bridge using:

ovs-vsctl add-port s1 eno1

ovs-vsctl add-port s1 enp4s0

I verified that the ports were added using:

ovs-ofctl show s1

To check the queueing disciplines attached to the two interfaces using:

ip link

The queueing discplines attached to the interfaces were:

eno1: fq_codel

enp4s0: mq

I want to change the qdisc attached to them to htb. So I changed them on both the interfaces using:

tc qdisc add dev eno1 root handle 1: htb default 12

tc qdisc add dev enp4s0 root handle 1: htb default 12

The problem

After issuing the commands for changing the qdisc of both the interfaces to htb, I verified whether it actually got changed using ip link. Initially, both of them reported htb as I want them to be. However, after some time, it automatically gets changed to their default qdiscs (fq_codel and mq).

I tried changing their qdiscs to htb multiple times, and issued ip link to check if they are changing. They changed to their default qdisc after a short time everytime.

Question

How do I permanently change the qdiscs of eno1 and enp4s0 to htb. What is causing them to reset to their default qdiscs after a short time?

0

I will answer my question since I have fixed the issue

This happens because probably NetworkManager (or some other process) is controlling the interface. They periodically reset the interface configuration. To solve the issue:

Check which interfaces are being managed by NetworkManager:

nmcli dev status

If the test interfaces are listed in the output of the above command as managed, then they are being controlled by NetworkManager. Else they will be listed as unmanaged. If they are listed as managed, then we have two options:

  • Option A: Edit NetworkManager configuration file and add interfaces to exclude from being managed by NetworkManager:

sudo nano /etc/NetworkManager/NetworkManager.conf Add the following lines to the conf file:

[keyfile]
unmanaged-devices=mac:00:11:22:33:44:55;mac:66:77:88:99:00:aa

Replace the mac addresses, with the mac addresses of the test interfaces. On newer versions of NetworkManager, we can use interface names to do this:

[keyfile]
unmanaged-devices=interface-name:eno1,interface-name:enp4s0

Restart NetworkManager:

systemctl stop NetworkManager
systemctl start NetworkManager

Check if the interfaces are now unmanaged:

nmcli dev status

  • Option B: Stop NetworkManager.

Stop for current session (it will start again on next boot):

systemctl stop NetworkManager

OR disable NetworkManager (it will NOT start again by default on next boot):

systemctl disable NetworkManager


If they are not listed in NetworkManager as managed, then they might be leased by dhclient. To check that:

sudo cat /var/lib/dhcp/dhcpd.leases

If the interface is being leased by dhclient, then it will be listed in the output. If it is, either find PID of dhclient and kill it, OR edit configuration file of dhclient and exclude the test interfaces.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.