{{tag>nmcli network}}
====== NetworkManager troubleshooting ======
===== DNS not working =====
nmcli c s eth0
shows correct DNS servers however the **/etc/resolv.conf** is not being updated and ''nmcli'' doesn't show DNS configuration.
Make sure you check if you are managing the correct connection name. You can have a situation like this
# nmcli c s
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0
lo 7b0fa53f-8c26-4186-8c8a-6c1fc5cff9bf loopback lo
wg0 fffee1be-44fc-4572-b553-5e38d2c5d3bc wireguard wg0
ens3 4776df96-6212-4b3d-b341-7d08273c7039 ethernet --
eth0 cb50fb91-7e06-49d3-973d-4b8513bbcb24 ethernet --
You can see that the actual connection name is "System eth0" and not eth0. Run
nmcli c up eth0
It should now show:
# nmcli c up eth0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
# nmcli c s
NAME UUID TYPE DEVICE
eth0 cb50fb91-7e06-49d3-973d-4b8513bbcb24 ethernet eth0
lo 7b0fa53f-8c26-4186-8c8a-6c1fc5cff9bf loopback lo
wg0 fffee1be-44fc-4572-b553-5e38d2c5d3bc wireguard wg0
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet --
ens3 4776df96-6212-4b3d-b341-7d08273c7039 ethernet --
''nmcli'' should now show DNS configuration:
[root@x509m ~]# nmcli
...
DNS configuration:
servers: 8.8.8.8 8.8.4.4 1.1.1.1
interface: eth0
servers: 2001:4860:4860::8888 2001:4860:4860::8844 2606:4700:4700::1111
interface: eth0
...
and **/etc/resolv.con** should be populated.
====== Tested on ======
* AlmaLinux 9.8
====== See also ======
====== References ======