[CentOS] From network-scripts to NetworkManager on a router : questions

Tue Feb 18 15:52:55 UTC 2020
Johnny Hughes <johnny at centos.org>

On 2/18/20 9:37 AM, Nicolas Kovacs wrote:
> Le 18/02/2020 à 12:28, Anand Buddhdev a écrit :
>> Neither. The DNS configuration should not normally be bound to a
>> specific interface, so don't configure it with any interface. If you do,
>> and that interface goes down, your DNS config also disappears.
> 
> I would like to do that very much, only NetworkManager makes you jump
> through burning loops to do so.
> 
> With network-scripts, it was just a matter of editing resolv.conf with
> nameserver and search domain directives.
> 
> I can't do that anymore, because /etc/resolv.conf gets squashed by
> NetworkManager. If I don't fill in DNS information for the interfaces,
> then all I get is an empty "#Generated by NetworkManager" line.
> 
> On the other hand, using nmtui, the only place where I can actually fill
> in DNS information is in the interface-specific dialogs.

Or use 'nmcli con mod <interface_name> ipv4.dns "8.8.8.8"'

or edit:

/etc/sysconfig/network-scripts/ifcfg-<interface-name>

> 
> After googling around for this problem, it looks like I'm not the only
> one scratching my head.
> 
> Any suggestions ?
> 
> Niki
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20200218/c2cb57dc/attachment-0005.sig>