You are not logged in.
I'm trying this network configuration because my streaming server sometimes "jams" (it's a second or less) when playing something.
It is necessary to replace the root qdisc to cake diffserv4 with the command:
/sbin/tc qdisc replace root dev enp1s0 cake ethernet diffserv4 wash
But these changes are not sustained by rebooting the system.
What is the proper/optimal way to specify these changes in boot time?
Last edited by j1simon (2020-08-17 09:40:29)
Offline
I have created a systemd service to do this:
[Unit]
Description=Replace the root qdisc to cake diffserv4
After= network-online.target
[Service]
ExecStart=/sbin/tc qdisc replace root dev enp1s0 cake ethernet diffserv4 wash
[Install]
WantedBy=multi-user.target
It works but is this the optimal way?
Offline
Sure why not?
You don't need to wait for network-online.target, network.target should suffice, but it doesn't make a practical difference as you just want that to be set whenever as long as it's set before you use the network.
Offline
It doesn't work well with systemd service. If the network is restarted, the tc qdisc cake is activated but with defaults: diffserv3 nowash.
It would be necessary for that script to be run every time the network is started, not just at system startup.
Offline
Have a look at BindsTo=.
Last edited by schard (2020-08-17 07:21:37)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Have a look at BindsTo=.
Thanks, but it doesn't work. My system unit:
[Unit]
Description=Replace the root qdisc to cake diffserv4
Wants=network-online.target
After=network-online.target
BindsTo=network-online.target
[Service]
Type=oneshot
ExecStart=/sbin/tc qdisc replace root dev enp1s0 cake ethernet diffserv4 wash
[Install]
WantedBy=multi-user.target
Offline
Solved. In this case the use of a systemd unit it isn't useful. It is necessary use a NetworkManager Dispatcher script.
In the folder "/etc/NetworkManager/dispatcher.d/pre-up.d/" I have created this script:
#!/usr/bin/env sh
[[ $1 == "enp1s0" ]] || return 0
/sbin/tc qdisc replace root dev enp1s0 cake ethernet diffserv4 wash
Now it works even when the network connection restarts.
Offline