Persistent network configurations across reboots

I do the following and it lasts for a single boot:

ip link set multicast on dev eth0

I want to do the same thing, but have it persist across boots. I’m having trouble figuring out how to do that. It doesn’t appear to be nmcli, and I don’t know if there is a config file I’m supposed to edit or some script I have to write. Hold my hand: what exactly should I do to achieve this?

The link option “multicast on” is the default and set on every normal interface. You should investigate why your system behaves differently and uses not the default.
If you can revert this behavior back to normal you don’t need to set it, because it is already on.

Thank you, I have an interface where it is turned off. It is not eth0, I just put that there.

So, how do you do? It’s not already done. Do you want the output of ip a? The interface options are <POINTOPOINT,NOARP,UP,LOWER_UP>

Thank you.

This looks like a VPN device. It depends if the software for your VPN has an option for it. Usually not.

Since it can only applied after the device is set up you need to find a way to run some kind of script or service after the main setup routine.

For example, if you use the WireGuard wg-quick command, I would create my own version of the script and add the command maybe in the add_default function.

But there is no general solution. It highly depends on your way of setting everything up, since the command needs to be execute at the correct time.

If nothing else you can try writing a script for NetworkManager-dispatcher in /etc/NetworkManager/dispatcher.d/

This was what I was looking for.

I created the script /etc/NetworkManager/dispatcher.d/99-wg-mcast.
My script is dead simple:

#!/bin/sh -e

case "$2" in
    if [ $1 = "myinterface" ]; then
        ip link set multicast on dev myinterface
    # Do nothing
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.