Skip to main content
Fixed spelling; improved grammar/wording, punctuation and formatting.
Source Link

Loosing Losing client side domain name resolution after rebooting the corresponding DHCP/DNS server based on 'dnsmasq'

As I'm far from an advanced network manager, please help me if you can.

Some weeks ago I 'reconfigured' my home network with a managablemanageable DNS/DNS relay service to allow us to use home only domains instedinstead of IP adressesaddresses (as the number of networked devices at home started to increase too much). The choosenchosen solution was the usual 'dnsmasq' setup on my RPi (latest Ubuntu based for Home Assistant), and as a possibility I set it up also as our DHCP server instead of the previously configured router, to manage all relevant things at one place. This is my first 'dnsmasq' uageusage, but at the end seemedit seemed that everything works fine... insteadexcept for one thing:

When I restart the RPi, or the corresponding network services on it, all it'sits DHCP connected clients somehow looselose the DNS until their reconnectionre-connection to the neworknetwork again. For example, after an RPi reboot, my computer still havehas the previously leased IP address (and seems all the corresponding network settings), but the name resolution not worksdoesn't work further until I disconnect and reconnect my NIC to the network. Addressing with IP addresses is working further but the name resolution not. This result is also true all of my other devices (mobiles, notebooks, etc.).

After 'reconnect' everything works fine, but without it I simply can notcannot resolve the domain names.

Thanks a lot in advance!

----- UPDATE WITH THE CORRESPONDING CONFIGS -----

  • Currently I use only the WiFi connection of the RPi...

    Currently I use only the WiFi connection of the RPi...

  • Router/gateway IP: 192.168.1.1

    Router/gateway IP: 192.168.1.1

  • 'netplan' config in /etc/netplan/50-cloud-init.yaml:

    'netplan' config in /etc/netplan/50-cloud-init.yaml:

    # This file is generated from information provided by the datasource.  Changes
    # to it will not persist across an instance reboot.  To disable cloud-init's
    # network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: true
          optional: true
      wifis:
        wlan0:
          optional: true
          access-points:
            "***":
              password: "***"
              hidden: true
            "***":
              password: "***"
              hidden: true
          dhcp4: false
          dhcp6: false
          addresses: [192.168.1.2/24]
          routes:
            - to: default
              via: 192.168.1.1
          nameservers:
            addresses: [192.168.1.2,8.8.8.8]
    
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      optional: true
      access-points:
        "***":
          password: "***"
          hidden: true
        "***":
          password: "***"
          hidden: true
      dhcp4: false
      dhcp6: false
      addresses: [192.168.1.2/24]
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [192.168.1.2,8.8.8.8]
  • All custom 'dnsmasq' settings in /etc/dnsmasq.d/ebola.conf:

    All custom 'dnsmasq' settings in /etc/dnsmasq.d/ebola.conf:

    domain-needed
    bogus-priv
    no-resolv
    server=8.8.8.8
    server=4.4.4.4
    local=/home/ebola/
    dhcp-range=192.168.1.201,192.168.1.255,255.255.255.0,168h
    dhcp-option=option:router,192.168.1.1
    dhcp-lease-max=50
    dhcp-authoritative
    cache-size=5000
    
    #------------------------------
    
    dhcp-host=...(mac,hostname,ip,infinite)
    dhcp-host=...(mac,hostname,ip,infinite)
    dhcp-host=...(mac,hostname,ip,infinite)
    
domain-needed
bogus-priv
no-resolv
server=8.8.8.8
server=4.4.4.4
local=/home/ebola/
dhcp-range=192.168.1.201,192.168.1.255,255.255.255.0,168h
dhcp-option=option:router,192.168.1.1
dhcp-lease-max=50
dhcp-authoritative
cache-size=5000

#------------------------------

dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
  • /etc/hosts

    /etc/hosts

    The devices and their IP addresses which I want to reach by their local domain names.

The devices and their IP addresses which I want to reach by their local domain names.

(Which latest requirement for me is interesting as I thoughthought the DHCP host config section in the 'dnsmasq' config will define them, in case I define the hostnames there.)

Loosing client side domain name resolution after rebooting the corresponding DHCP/DNS server based on 'dnsmasq'

As I'm far from an advanced network manager please help me if you can.

Some weeks ago I 'reconfigured' my home network with a managable DNS/DNS relay service to allow us to use home only domains insted of IP adresses (as the number of networked devices at home started to increase too much). The choosen solution was the usual 'dnsmasq' setup on my RPi (latest Ubuntu based for Home Assistant), and as a possibility I set it up also as our DHCP server instead of the previously configured router, to manage all relevant things at one place. This is my first 'dnsmasq' uage but at the end seemed everything works fine... instead one thing:

When I restart the RPi, or the corresponding network services on it, all it's DHCP connected clients somehow loose the DNS until their reconnection to the nework again. For example after an RPi reboot my computer still have the previously leased IP address (and seems all the corresponding network settings) but the name resolution not works further until I disconnect and reconnect my NIC to the network. Addressing with IP addresses is working further but the name resolution not. This result is also true all of my other devices (mobiles, notebooks, etc.).

After 'reconnect' everything works fine, but without it I simply can not resolve the domain names.

Thanks a lot in advance!

----- UPDATE WITH THE CORRESPONDING CONFIGS -----

  • Currently I use only the WiFi connection of the RPi...
  • Router/gateway IP: 192.168.1.1
  • 'netplan' config in /etc/netplan/50-cloud-init.yaml:
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      optional: true
      access-points:
        "***":
          password: "***"
          hidden: true
        "***":
          password: "***"
          hidden: true
      dhcp4: false
      dhcp6: false
      addresses: [192.168.1.2/24]
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [192.168.1.2,8.8.8.8]
  • All custom 'dnsmasq' settings in /etc/dnsmasq.d/ebola.conf:
domain-needed
bogus-priv
no-resolv
server=8.8.8.8
server=4.4.4.4
local=/home/ebola/
dhcp-range=192.168.1.201,192.168.1.255,255.255.255.0,168h
dhcp-option=option:router,192.168.1.1
dhcp-lease-max=50
dhcp-authoritative
cache-size=5000

#------------------------------

dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
  • /etc/hosts
The devices and their IP addresses which I want to reach by their local domain names.

(Which latest requirement for me is interesting as I though the DHCP host config section in the 'dnsmasq' config will define them, in case I define the hostnames there.)

Losing client side domain name resolution after rebooting the corresponding DHCP/DNS server based on 'dnsmasq'

As I'm far from an advanced network manager, please help me if you can.

Some weeks ago I 'reconfigured' my home network with a manageable DNS/DNS relay service to allow us to use home only domains instead of IP addresses (as the number of networked devices at home started to increase too much). The chosen solution was the usual 'dnsmasq' setup on my RPi (latest Ubuntu based for Home Assistant), and as a possibility I set it up also as our DHCP server instead of the previously configured router, to manage all relevant things at one place. This is my first 'dnsmasq' usage, but at the end it seemed that everything works fine... except for one thing:

When I restart the RPi, or the corresponding network services on it, all its DHCP connected clients somehow lose the DNS until their re-connection to the network again. For example, after an RPi reboot, my computer still has the previously leased IP address (and seems all the corresponding network settings), but the name resolution doesn't work further until I disconnect and reconnect my NIC to the network. Addressing with IP addresses is working further but the name resolution not. This result is also true all of my other devices (mobiles, notebooks, etc.).

After 'reconnect' everything works fine, but without it I simply cannot resolve the domain names.

  • Currently I use only the WiFi connection of the RPi...

  • Router/gateway IP: 192.168.1.1

  • 'netplan' config in /etc/netplan/50-cloud-init.yaml:

    # This file is generated from information provided by the datasource.  Changes
    # to it will not persist across an instance reboot.  To disable cloud-init's
    # network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: true
          optional: true
      wifis:
        wlan0:
          optional: true
          access-points:
            "***":
              password: "***"
              hidden: true
            "***":
              password: "***"
              hidden: true
          dhcp4: false
          dhcp6: false
          addresses: [192.168.1.2/24]
          routes:
            - to: default
              via: 192.168.1.1
          nameservers:
            addresses: [192.168.1.2,8.8.8.8]
    
  • All custom 'dnsmasq' settings in /etc/dnsmasq.d/ebola.conf:

    domain-needed
    bogus-priv
    no-resolv
    server=8.8.8.8
    server=4.4.4.4
    local=/home/ebola/
    dhcp-range=192.168.1.201,192.168.1.255,255.255.255.0,168h
    dhcp-option=option:router,192.168.1.1
    dhcp-lease-max=50
    dhcp-authoritative
    cache-size=5000
    
    #------------------------------
    
    dhcp-host=...(mac,hostname,ip,infinite)
    dhcp-host=...(mac,hostname,ip,infinite)
    dhcp-host=...(mac,hostname,ip,infinite)
    
  • /etc/hosts

    The devices and their IP addresses which I want to reach by their local domain names.

(Which latest requirement for me is interesting as I thought the DHCP host config section in the 'dnsmasq' config will define them, in case I define the hostnames there.)

added 1790 characters in body
Source Link

----- UPDATE WITH THE CORRESPONDING CONFIGS -----

  • Currently I use only the WiFi connection of the RPi...
  • Router/gateway IP: 192.168.1.1
  • 'netplan' config in /etc/netplan/50-cloud-init.yaml:
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      optional: true
      access-points:
        "***":
          password: "***"
          hidden: true
        "***":
          password: "***"
          hidden: true
      dhcp4: false
      dhcp6: false
      addresses: [192.168.1.2/24]
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [192.168.1.2,8.8.8.8]
  • All custom 'dnsmasq' settings in /etc/dnsmasq.d/ebola.conf:
domain-needed
bogus-priv
no-resolv
server=8.8.8.8
server=4.4.4.4
local=/home/ebola/
dhcp-range=192.168.1.201,192.168.1.255,255.255.255.0,168h
dhcp-option=option:router,192.168.1.1
dhcp-lease-max=50
dhcp-authoritative
cache-size=5000

#------------------------------

dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
  • /etc/hosts
The devices and their IP addresses which I want to reach by their local domain names.

(Which latest requirement for me is interesting as I though the DHCP host config section in the 'dnsmasq' config will define them, in case I define the hostnames there.)

----- UPDATE WITH THE CORRESPONDING CONFIGS -----

  • Currently I use only the WiFi connection of the RPi...
  • Router/gateway IP: 192.168.1.1
  • 'netplan' config in /etc/netplan/50-cloud-init.yaml:
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      optional: true
      access-points:
        "***":
          password: "***"
          hidden: true
        "***":
          password: "***"
          hidden: true
      dhcp4: false
      dhcp6: false
      addresses: [192.168.1.2/24]
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [192.168.1.2,8.8.8.8]
  • All custom 'dnsmasq' settings in /etc/dnsmasq.d/ebola.conf:
domain-needed
bogus-priv
no-resolv
server=8.8.8.8
server=4.4.4.4
local=/home/ebola/
dhcp-range=192.168.1.201,192.168.1.255,255.255.255.0,168h
dhcp-option=option:router,192.168.1.1
dhcp-lease-max=50
dhcp-authoritative
cache-size=5000

#------------------------------

dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
dhcp-host=...(mac,hostname,ip,infinite)
  • /etc/hosts
The devices and their IP addresses which I want to reach by their local domain names.

(Which latest requirement for me is interesting as I though the DHCP host config section in the 'dnsmasq' config will define them, in case I define the hostnames there.)

Source Link

Loosing client side domain name resolution after rebooting the corresponding DHCP/DNS server based on 'dnsmasq'

As I'm far from an advanced network manager please help me if you can.

Some weeks ago I 'reconfigured' my home network with a managable DNS/DNS relay service to allow us to use home only domains insted of IP adresses (as the number of networked devices at home started to increase too much). The choosen solution was the usual 'dnsmasq' setup on my RPi (latest Ubuntu based for Home Assistant), and as a possibility I set it up also as our DHCP server instead of the previously configured router, to manage all relevant things at one place. This is my first 'dnsmasq' uage but at the end seemed everything works fine... instead one thing:

When I restart the RPi, or the corresponding network services on it, all it's DHCP connected clients somehow loose the DNS until their reconnection to the nework again. For example after an RPi reboot my computer still have the previously leased IP address (and seems all the corresponding network settings) but the name resolution not works further until I disconnect and reconnect my NIC to the network. Addressing with IP addresses is working further but the name resolution not. This result is also true all of my other devices (mobiles, notebooks, etc.).

After 'reconnect' everything works fine, but without it I simply can not resolve the domain names.

Could anybody point me to the right direction what could be the reason of the problem if it is familiar?

Thanks a lot in advance!