nmcli connection show NAME UUID TYPE DEVICE Wired connection 1 24d23ba5-8d44-30b6-807e-fa5034338cb0 ethernet eno1 lo f05d5882-f439-44c0-bd2c-de4bceae8c6e loopback loThis could be abbreviated "nmcli c s". In general "c" can be used as an abbreviation for "connection". Also, much to my surprise, you can use autocompletion on "Wired connection 1" in the following commands, typing only "W and then letting a tab finish the command To get lots of details, use either:
nmcli connection show "Wired connection 1" nmcli con show "Wired connection 1" nmcli c s "Wired connection 1"
nmcli con down "Wired connection 1" nmcli con up "Wired connection 1"
su nmcli connection edit "Wired connection 1"
set ipv4.addresses 196.168.0.5/24 save quitDoing just this causes trouble, perhaps I must also set a gateway?
service network-manager restart systemctl restart network.service systemctl restart NetworkManager.serviceIs this lame, or what? No consistency on the names of such things.
nmcli con down "Wired connection 1" nmcli con add type ethernet con-name Bill ifname eno1And to my amazement, this gets me back on the air! I had expected to have to declare this as auto via "set ipv4.method auto" but that seemed to just happen when I added the new connection. And I did not need to do an "up" on Bill either.
This persists after a reboot, which is nice. I may set up two connections "Wired-dhcp" and "Wired-static". Or maybe just "Wired" for the second. Then I can do up/down on the two while experimenting.
With Bill up and things working, the route command yields:
tom@trona:/u1/home/tom$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default agate 0.0.0.0 UG 100 0 0 eno1 192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 eno1
nmcli con down Bill nmcli con delete Bill nmcli con add type ethernet con-name Wired-dhcp ifname eno1 nmcli con up Wired-dhcpThe above worked perfectly and I am back online. I may as well get rid of the overly verbose "Wired connection 1":
nmcli con del "Wired connection 1"This works fine and does no harm to my existing connection. Now lets try setting up a static "Wired"
nmcli con add type ethernet con-name Wired ifname eno1 ip4 192.168.0.5/24 gw4 192.168.0.1It adds this without trashing my existing connection (nice!).
nmcli con down Wired-dhcp nmcli con up WiredAnd this works!! I think I am done.
systemd-resolved resolvectl statusThe latter shows:
resolvectl status Global Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: stub Link 2 (eno1) Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: fd4d:b11d:6fb4::1 DNS Servers: fd80:1456:1955::1 fdd5:c7f2:5d07::1 fd4d:b11d:6fb4::1So it has several DNS servers specified via ipv6 addresses. I am just going to not worry about it. It works and that is all that matters.
cd /etc/NetworkManager/system-connections ls -l -rw------- 1 root root 186 Dec 18 13:46 Wired-dhcp.nmconnection -rw------- 1 root root 219 Dec 18 13:53 Wired.nmconnection
Adventures in Computing / tom@mmto.org