Hi papibe, thanks for the response.
I've provided the results which you requested below.
Additionally, I noticed that if I manually add 192.168.40.20 as a nameserver to /etc/resolv.conf, name resolution works as expected. However, the comments in the file say not to edit because the file is managed by systemd-resolved. Therefore, I think my specific question becomes how to add a nameserver to systemd-resolved. I thought this was done by configuring a nameserver in /etc/netplan/50-cloud-init.yaml, but that does not work.
Code:
# apt policy netplan
netplan:
Installed: (none)
Candidate: 1.10.1-5build1
Version table:
1.10.1-5build1 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Code:
# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:50:56:8f:44:e6 brd ff:ff:ff:ff:ff:ff
inet 192.168.40.6/24 brd 192.168.40.255 scope global ens160
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe8f:44e6/64 scope link
valid_lft forever preferred_lft forever
3: idrac: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 44:a8:42:10:6c:b1 brd ff:ff:ff:ff:ff:ff
Code:
# ip route
default via 192.168.40.1 dev ens160 proto static
192.168.40.0/24 dev ens160 proto kernel scope link src 192.168.40.6
Code:
# cat /etc/network/interfaces
# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown
Code:
# 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
Code:
# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat systemd
group: compat systemd
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Code:
# nslookup ubuntu.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: ubuntu.com
Address: 91.189.94.40
Code:
# dig ubuntuforums.com
<<>> DiG 9.11.3-1ubuntu1-Ubuntu <<>> ubuntuforums.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34584
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;ubuntuforums.com. IN A
;; ANSWER SECTION:
ubuntuforums.com. 598 IN A 91.189.94.12
ubuntuforums.com. 598 IN A 91.189.94.16
;; Query time: 162 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Wed May 09 14:05:14 UTC 2018
;; MSG SIZE rcvd: 77
Code:
# ping 192.168.40.20
64 bytes from 192.168.40.20: icmp_seq=1 ttl=128 time=0.132 ms
64 bytes from 192.168.40.20: icmp_seq=2 ttl=128 time=0.101 ms
64 bytes from 192.168.40.20: icmp_seq=3 ttl=128 time=0.165 ms
--- 192.168.40.20 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2052ms
rtt min/avg/max/mdev = 0.101/0.132/0.165/0.029 ms
Bookmarks