nmcli
Jerry Geis
jerry.geis at gmail.com
Fri Feb 19 14:48:34 UTC 2021
On Fri, Feb 19, 2021 at 9:37 AM Tom H <tomh0665 at gmail.com> wrote:
> On Fri, Feb 19, 2021 at 3:19 PM Jerry Geis <jerry.geis at gmail.com> wrote:
> > On Fri, Feb 19, 2021 at 9:11 AM Tom H <tomh0665 at gmail.com> wrote:
> >> On Fri, Feb 19, 2021 at 3:05 PM Jerry Geis <jerry.geis at gmail.com>
> >> wrote:
> >>> On Fri, Feb 19, 2021 at 8:56 AM Tom H <tomh0665 at gmail.com> wrote:
> >>>>
> >>>> Two ways.
> >>>>
> >>>> 1) Change "/etc/netplan/00-installer-config.yaml" to
> >>>>
> >>>> network:
> >>>> ethernets:
> >>>> <your_nic>:
> >>>> addresses:
> >>>> - 192.168.1.2/23 ## is "23" a typo?
> >>>> dhcp4: false
> >>>> gateway4: 192.168.1.1
> >>>> nameservers:
> >>>> addresses:
> >>>> - 8.8.8.8
> >>>> renderer: NetworkManager
> >>>> version: 2
> >>>>
> >>>> 2) Delete "/etc/netplan/00-installer-config.yaml" and let your
> >>>> config under "/etc/NetworkManager/system-connections" set up NM.
> >>>> (I'm assuming that NM's enabled systemd-wise, which it should be
> >>>> by default.]
> >>>
> >>> I tried removing /etc/netplan/00-installer-config.yaml - and
> >>> rebooting and everythign was messed up then.
> >>> Not DHCP address no X no nothing.
> >>> So I put the file back - and rebooted - back to normal.
> >>> Not the behaviour I expected.
> >>
> >> Very strange. I'm sure that if I set up a 20.04 VM it would work
> >> for me, LOL.
> >>
> >> Then use the first method. I used the settings that you'd passed
> >> to nmcli.
> >>
> >> But before you do anything, (1) does "dig" work? (2) check the
> >> output of "resolvectl" to find out which nameserver you're
> >> querying.
> >
> > Dig shows:
> > ; SERVER: 127.0.0.53#53(127.0.0.53)
> >
> > I was hoping "not" to edit netplan files - that is why I was
> > trying to use nmcli to set the IP/ DNS etc... Everything works
> > except setting DNS.
>
> dig's simply going to show you what's in "/etc/resolv.conf". Does
> "dig" suceed or fail?
>
> The way that resolved works is that it sets up a dns forwarder at
> "127.0.0.53" and forwards your queries to the nameserver(s) with which
> it's been set up.
>
> Given that NM's using DHCP, you must be receiving nameserver addresses
> from your dhcp server and they're being stored in
> "/run/systemd/resolve/resolv.conf". If the dhcp-supplied dns settings
> are failing, ...
>
> If you'd prefer not to edit "/etc/netplan/<name>.yaml", you can
> configure resolved directly.
>
> You can either edit "/etc/systemd/resolved.conf" or create an
> "/etc/systemd/resolved.conf.d" directory and an
> "/etc/systemd/resolved.conf.d/<name>.conf" file and set
>
> [Resolve]
> DNS=8.8.8.8
>
> I'm unsure how that'll interact with dhcp.
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Ok - lets try this route.. I created the /etc/systemd/resolved.conf.d
directory
made a file in there lsi.conf
[Resolve]
DNS=192.168.1.14
I am actually using static address on this box and have an internal DNS of
192.168.1.14
I then rebooted and my internal DNS still not being used.
/etc/resolv.conf is still as it was - with nameserver 127.0.0.53
Do I need to issue a command after creating the file ?
Thanks,
Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20210219/b9da7868/attachment.html>
More information about the ubuntu-users
mailing list