There are a lot of similar questions, but all of them ask about prioritizing traffic (with metric as a solution). I want to use only one network card at the same time. For example, if the external card (wlan1
) is plugged try to use it, else use the internal one (wlan0
). I tried to use connection.autoconnect-priority
in /etc/NetworkManager/system-connections/*.nmconnection
files, but it doesn't prioritize connections with different interfaces.
Here is my connection
section of /etc/NetworkManager/system-connections/my_home_from_usb.nmconnection
:
id=my_home_usb
uuid=c481eb20-a299-4703-9537-e2e4849e4983
type=wifi
autoconnect-priority=10
interface-name=wlan1
permissions=
timestamp=1581203793
and /etc/NetworkManager/system-connections/my_home.nmconnection
:
[connection]
id=my_home_internal
uuid=9d4cdada-1550-497e-b3b7-a82619bbd072
type=wifi
autoconnect-priority=5
interface-name=wlan0
permissions=
timestamp=1581203793
and nmcli -f NAME,UUID,AUTOCONNECT,AUTOCONNECT-PRIORITY,ACTIVE,DEVICE,STATE,ACTIVE-PATH c
output
NAME UUID AUTOCONNECT AUTOCONNECT-PRIORITY ACTIVE DEVICE STATE ACTIVE-PATH
lan 153501bf-9e36-43e8-b63e-67d2d6d18076 yes 3 yes eth0 activated /org/freedesktop/NetworkManager/ActiveConnection/2
my_home_internal 9d4cdada-1550-497e-b3b7-a82619bbd072 yes 5 yes wlan0 activated /org/freedesktop/NetworkManager/ActiveConnection/4
my_home_usb c481eb20-a299-4703-9537-e2e4849e4983 yes 10 yes wlan1 activated /org/freedesktop/NetworkManager/ActiveConnection/5
So, how can I use only one network card simultaneously?