[Networkmanager] Putting device administratively up/down
petr.gotthard at centrum.cz
Thu May 18 09:26:40 UTC 2023
Ethernet interfaces can be put administratively down (ip link set eth0 down). Although the NetworkManager controls a large amount of interface parameters, it does not control the up/down status.
When an interface is administratively down, the NetworkManager:
- shows device status NM_DEVICE_STATE_UNAVAILABLE, and in GUI "Cable unplugged" (which does not reflect reality when the cable is plugged-in),
- respects the status and does not bring the device/interface up even when there is a connection with auto-connect=true.
When an interface is up, the NetworkManager does not (seems to not) offer any mechanism to put it administratively down.
This feels like setting the "up/down" status is out of scope of the NM. This makes sense when we say that NM is here to establish connections and not to control devices. (Although it can control other Ethernet parameters like speed/duplex). Is my understanding correct, or you might accept a patch implementing setting device up/down in one way or another?
More information about the Networkmanager