LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 10-30-2020, 02:37 PM   #1
tpirapokin
LQ Newbie
 
Registered: Oct 2020
Posts: 5

Rep: Reputation: Disabled
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"
 
Old 10-30-2020, 07:09 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Secondary DNS does not resolve the nslookup client requests when the primary DNS is off. To learn Linux - Newbie 3 09-22-2016 06:15 AM
[SOLVED] WEBMIN - Setting up CENTOS 7 as Secondary DNS (Primary Windows 2008 R2) - ??? Tex47Wilson Linux - Server 1 05-10-2015 02:32 AM
DNS Bind CentOS 5 primary CentOS 6 secondary loadedmind Linux - Server 0 07-24-2014 06:45 PM
[SOLVED] repolication between primary DNS and secondary DNS issue Gil@LQ Linux - Server 10 05-27-2012 02:28 PM
how to set up a primary and secondary dns server alek66 Linux - Networking 3 06-23-2008 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration