1
cat /etc/netplan/00-installer-config.yaml
    # This is the network config written by 'subiquity'
    network:
      ethernets:
        eno1:
          dhcp4: true
      version: 2

But my resolv.conf looks like this:

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53

I just want to get DHCPv4 address automaticaly and I want to put staticaly to /etc/resolv.conf few nameservers to resolve and it will be fine. How can I do it? I already googled many solutions, but many of those solutions work only with 18.04 LTS not with 20.04 LTS. Official documentation does not contain examples of how to setup dhcp address automaticaly and DNS staticaly. Override settings in netplan did not work. It did not accept with error like "nameservers:" does not belong there.

Any help will be appreciated. systemd-resolver works. Where does it take the 127.0.0.53 address? When I put nameserver 8.8.8.8 into /etc/resolv.conf it works fine. When I restart computer, the configuration file /etc/resolv.conf remains clear or contains nameserver 127.0.0.53.

1 Answer 1

1

The 127.0.0.53 mechanism seems to be the proper setting.

Maybe try this alternative approach:

Perhaps you have configured Ubuntu to rely on the DNS server configured in the router.
Often the router has DNS servers of your Internet Service Provider (ISP) pre-configured. If the DNS of your ISP is disturbed, you will not have internet connectivity.

In this case, pinging IP adresses in the public internet will work. Name resolution will not.

I have had a similar problem. What I did was looking up (via Smartphone) how to configure alternative DNS servers (e.g. Google's) in the Web interface of the router.

Then ubuntu will have working DNS again and everything is fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.