I'm using Ubuntu 18.04. Setting up my work PC to connect to the network and domain.
I've been working on switching to Netplan from using /etc/network/interfaces
I've created the yaml file and run
netplan generate netplan apply
without any errors eventually. I've checked my config file located at /run/systemd/network for my interface, and it matches the correct details.
I've masked network-manager, and networking as I read that these can get in the way when using networkd.
The network runs fine, I can connect to the internet and to internal servers and ping / nslookup other servers. My issue is that after 5-10minues, I'm no longer able to ping other servers or nslookup other internal machines using their names, only IP. The name service seems to fail.
I then run
And it is fixed again! What is going on? Does anyone know a way to fix this permanently? I'm confident my yaml file is okay, but maybe something else is getting in the way or causing issues? I did think it may be network-manager, so I masked it.
I only have one yaml file located in /etc/netplan/01-network-card.yaml and it's format is:
network: version: 2 renderer: networkd ethernets: eno1: dhcp4: false addresses: [ip.add.xx.xx/20] gateway4: xxx.xxx.xxx.x nameservers: search: [redacted.local] addresses: [xxx.xxx.xxx.xxx] addresses: [188.8.131.52] enp14s0: dhcp4: false addresses: [xxx.xxx.xxx.xx/24] gateway4: xxx.xxx.xxx.x
Any ideas with this? Netplan is a pain. Also the connection enp14s0 is an admin connection to our network. I'm trying to configure eno1.
Edit: thanks to commenters for help. Adding in extra info:
ls -al /etc/resolv.conf lrwxrwxrwx 1 root root 39 May 24 16:48 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf cat /etc/resolv.conf # This file is managed by man:systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients to the # internal DNS stub resolver of systemd-resolved. This file lists all # configured search domains. # # Run "systemd-resolve --status" to see details about the uplink DNS servers # currently in use. # # Third party programs must not access this file directly, but only through the # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way, # replace this symlink by a static file or a different symlink. # # See man:systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf. nameserver 127.0.0.53 options edns0 search redacted.local
Just as a note, the nameserver 127.0.0.53 is not one that I input into the netplan file - not sure where this comes from? imaginariumuk cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8) #auto lo #iface lo inet loopback #auto eno1 #allow-hotplug eno1 #iface eno1 inet dhcp
Commented all the above out after attempting to switch to netplan.
systemd-resolve --status results before and after.
Global DNSSEC NTA: 10.in-addr.arpa 16.172.in-addr.arpa 168.192.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa corp d.f.ip6.arpa home internal intranet lan local private test Link 3 (eno1) Current Scopes: DNS LLMNR setting: yes MulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: serverfromnetplan.240 184.108.40.206 DNS Domain: redacted.local Link 2 (enp14s0) Current Scopes: none LLMNR setting: yes