netplan render does not set DNS nameservers correctly

Bug #1798107 reported by pseudonomous
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I've got a netplan file:

# cat /etc/netplan/00-static-ip.yaml
# Let systemd-netword manage all devices on this system
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: no
      dhcp6: no
  bridges:
    br0:
      dhcp4: no
      dhcp6: no
      interfaces:
        - enp3s0
      addresses:
        - 192.168.1.122/24
      gateway4: 192.168.1.1
      nameservers:
        addresses:
          - 192.168.1.1

I can do a:

netplan generate
netplan apply

but this does not result in a configuration where my queries will be resolved by my nameserver, which happens to be mikrotik router. Instead, queries appear to be answered by the systemd-resolved on localhost and it's unclear to me what nameserver that is using to resolve queries, but I'm certain that it is not 192.168.1.1 because:

host mikrotik 192.168.1.1

will return:

Using domain server:
Name: 192.168.1.1
Address: 192.168.1.1#53
Aliases:

mikrotik has address 192.168.1.1

while

host mikrotik

will return

Host mikrotik not found: 2(SERVFAIL)

While I'm not 100% sure the root cause of this bug lies in the netplan code-base vs. either systemd-resolved or one of the myriad other tools which have complicated DNS resolution in recent years but, in practical terms, the result is that netplan does not work like the documentation suggests it should.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: netplan.io 0.36.3
ProcVersionSignature: Ubuntu 4.15.0-36.39-lowlatency 4.15.18
Uname: Linux 4.15.0-36-lowlatency x86_64
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 16 09:17:58 2018
InstallationDate: Installed on 2018-10-16 (0 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: netplan.io
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
pseudonomous (fdruec1) wrote :
Revision history for this message
Lukas Märdian (slyon) wrote :

Netplan is supposed to set up systemd-resolved to make use of your configured DNS settings.
Then systemd-resolved will be used as a local DNS resolver. This seems to be the expected behavior on Ubuntu. Please re-open if you feel otherwise.

Changed in netplan.io (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.