2

I am trying to determine whether rules put in place using tc persist beyond a reboot (I do not believe they do by default), and whether there is any way to cause them to persist, or if the best you can do is to re-execute the commands at boot in order to put them in place again.

Also: how/where do these rules get persisted? (assuming there is in fact a way to do so)

2
  • 3
    Any rules are persisted by rerunning the commands. This is true for IP addresses, mounts, netfilter rules etc. In some cases, there are files like /etc/fstab or /etc/network/interfaces that describe the config, but in the end commands are executed to turn those descriptions into a configuration. I am not aware of such files specifically for tc, but as an example, you can put any commands into /etc/networks/interfaces. Commented May 5, 2021 at 0:24
  • 2
    Your distro may or may not have a recommended way to persist such things; it entirely depends on the distro (which you didn't tell us). And yes, the only way of "persisting" that is to execute commands at boot, using the stored state on disk. That's how all kinds of "persisting" work. Commented May 5, 2021 at 5:12

1 Answer 1

1

Consolidating comments into an answer

Based on comments from @dirkt and @berndbausch, it seems like the bottomline is:

There is no tc-specific way of persisting rules that are put in place using tc. The specifics of how to do so the Right Way will vary depending on your distro, but it will come down to re-running the tc commands as part of some file at boot time (for example, /etc/network/interfaces).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.