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.)