Score:0

static ip DNS not working

ar flag

i am have problem with the configuration of the DNS in file /etc/network/interfaces:

auto eth0
  iface eth0 inet static
  address 192.168.0.10
  netmask 255.255.255.0
  gateway 192.168.0.1
  dns-nameservers 192.168.0.1 192.168.1.1

the net is working but the dns is not, checking file /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 directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# 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.

# No DNS servers known.

this is appearing when i reboot the system, but it will work again if i restart the networking service. how can i solve it?

heynnema avatar
ru flag
What version Ubuntu? Desktop or Server? Edit your question and show me `cat /etc/netplan/*.yaml` and `sudo lshw -C network`. Start comments to me with @heynnema or I'll miss them.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.