nmcli

Chris Green cl at isbd.net
Fri Feb 19 13:48:12 UTC 2021


On Fri, Feb 19, 2021 at 07:49:05AM -0500, Jerry Geis wrote:
> On Fri, Feb 19, 2021 at 6:47 AM Tom H <tomh0665 at gmail.com> wrote:
> >
> > So "/etc/resolv.conf" is provided by resolved and is a symlink to
> > "/run/systemd/resolve/stub-resolv.conf".
> >
> > If you really want to use "resolvconf", you have to change
> > "/etc/resolv.conf" to be a symlink to "/run/resolvconf/resolv.conf".
> >
> > But I wouldn't use "resolvconf" if I were you. Ubuntu already has a
> > more multi-layered network setup than other dostros, and adding
> > "resolvconf" to the mix can only be a source of head-scratching. I've
> > tested using "resolvconf" in the past and I've found that the
> > integration with resolved isn't full. "resolvectl" lists the
> > resolvconf nameserver for "global" and MetworkManager/networkd
> > nameserver for "link", and, it's the "global" value that's queried
> > when you run "dig".
> >
> > It looks to me that you're using "netplan" and that you should edit
> > "/etc/netplan/<yaml>" to change NIC's setup. The "nmcli" command that
> > you ran wrote the config to
> > "/etc/NetworkManager/system-connections/<conn>" and, apart from the
> > fact that the dns settings are listed in "nmcli c sh id <conn>", they
> > aren't taken into account; and they're ignored after a reboot.
> >
> 
> 
> You right: netplan says use NetworkManager
> /etc/netplan/00-installer-config.yaml
> # This is the network config written by 'subiquity'
> network:
>   version: 2
>   renderer: NetworkManager
> 
> I removed resolvconf - but now I'm back to /etc/resolv.conf not getting
> updated.
> Your correct that the dns settings were saved to the /etc/NetworkManager
> path file - but how do I get that to be part of /etc/resolv.conf ?
> 
/etc/resolv.conf should be a symbolic link to either
/run/systemd/resolve/stub-resolv.conf (the default) or
/run/systemd/resolve/resolv.conf

Both of these files are created at boot time by systemd.

Read 'man systemd-resolved' which does explain how it works (though
not in the easiest way to understand IMHO).

-- 
Chris Green




More information about the ubuntu-users mailing list