I am on Fedora v33 Server edition (no GUI) and I have setup 2 network connections. One is Ethernet, which I use to connect my Macbook to the Linux machine, the other is the WLAN connection the machine uses to connect to the internet.
So now whenever I do
nmcli con up eno1
I lose access to the Internet (ping www.google.com does not return any packets)
When the ethernet is down everything works, but I cannot use ethernet obviously.
Something similar can happen on a Mac OS where I can simply "drag" a network to set the priority. How do I do the same using only the terminal on a unix system like Fedora?
Ok after some research I ran into this great tool called
nmtuisudo dnf install NetworkManager-tuiAnd after installing the tool and running it with
sudo nmtuiI edited my ethernet connection and saw the option calledNever use this network for default routewhich translates to the optionnever-default=trueinside the[ipv4]in the/etc/NetworkManager/system-connections/config file.After that I ran
sudo nmcli con down eno1 && sudo nmcli con up eno1and after runningnmcliagain I can see that the order of connections charged, where now my WLAN is first and my ethernet connection is second.