CentOS 8.2 how to set Primary DNS/Secondary DNS without connection
I want to set DNS1/DNS2 for the system and not per nic. Is it possible with NetworkManager? All the example I see is
nmcli con mod <connectionName> ipv4.dns "8.8.8.8 8.8.4.4" |
nmcli doesn't define nameservers per NIC, but per connection. A given NIC can have more than one connection associated with it. This becomes important e.g. when you have a laptop that needs different nameservers at home, in the office and on the road.
nmcli enters nameservers in /etc/resolv.conf, which is a global configuration file. That file contains all nameservers from all active connections (to be honest, I don't know what happens if more than three nameservers are defined). Their ordering depends on priorities as documented at https://access.redhat.com/documentat...ing-networking. |
All times are GMT -5. The time now is 02:29 PM. |