You are not logged in.
Hi there,
i currently trying to solve a problem within a heterogeneous network (linux servers with arch, windows clients).
Current Situation:
I got a nat gateway which runs dnsmasq as dns and dhcp server. It got 3 interfaces (wan, home, guest) with different networks. Interfaces got static ips via systemd-networkd. The files are located at /etc/systemd/network/eth*.network:
eth0 (wan):
[Match]
Name=eth0
[Network]
Address=192.168.0.4/24
Gateway=192.168.0.254
DNS=192.168.0.254
eth1(guest):
[Match]
Name=eth1
[Network]
Address=172.17.0.254/16
eth2(home):
[Match]
Name=eth2
[Network]
Address=172.16.0.254/16
nsswitch.conf looks like that:
# Name Service Switch configuration file.
# See nsswitch.conf(5) for details.
passwd: files mymachines systemd
group: files mymachines systemd
shadow: files
publickey: files
hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: files
dnsmasq is setup this way:
domain-needed
bogus-priv
no-resolv
dhcp-sequential-ip
interface=lo
interface=eth1
interface=eth2
bind-interfaces
domain=local
expand-hosts
local=/local/
server=192.168.0.254
#server=8.8.8.8
#server=8.8.4.4
dhcp-range=eth1,172.17.2.1,172.17.2.200,255.255.0.0,168h
dhcp-range=eth2,172.16.2.1,172.16.2.200,255.255.0.0,168h
dhcp-option=eth1,3,172.17.0.254
dhcp-option=eth2,3,172.16.0.254
dhcp-option=eth1,6,172.17.0.254
dhcp-option=eth2,6,172.16.0.254
Behind the nat gateway there is another router (192.168.0.254) which provides DNS-Services. I got another Linux-Server on 172.16.0.1 (server01).
I configured the /etc/hosts on the nat gateway like this:
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
172.16.0.254 server02
172.17.0.254 server02
192.168.0.4 server02
172.16.0.1 server01
There is nothing written in /etc/resolv.conf on nat gateway. I can ping www.google.de or similiar from every device within my network and it resolves fine. if i use drill with any hostname (no matter if they are looking for local hosts or in the internet) on my linux machines i get this error:
Error: error sending query: No (valid) nameservers defined in the resolver
if i use nslookup on my linux machines they time out (no matter if its looked for local hosts or in the internet). pinging www.google works. pinging for server02 (or server02.local, .lan or whatever) on server01 isnt. I am using systemd-resolved as my dns-service on server01. Interface config for server01 is this:
[Match]
Name=eth0
[Network]
Address=172.16.0.1/16
Gateway=172.16.0.254
DNS=172.16.0.254
resolvectl status on server01:
Global
LLMNR setting: yes
MulticastDNS setting: yes
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
Fallback DNS Servers: 1.1.1.1
9.9.9.10
8.8.8.8
2606:4700:4700::1111
2620:fe::10
2001:4860:4860::8888
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 2 (eth0)
Current Scopes: DNS LLMNR/IPv4
DefaultRoute setting: yes
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
Current DNS Server: 172.16.0.254
DNS Servers: 172.16.0.254
If i use nslookup on my windows machines i get a resolution for any hostname (server01, server01.local, etc) (no matter if they are local or in the internet). if i ping for server02 it cant resolve. if i ping for server02.local or server01.local it resolves.
I really cant explain this behavior. My best guess is that it has something todo with another dns server that is running somewhere hidden in my network. But this must be a client or whatever, since there are only two servers with very minimal setup. i have looked for avahi-daemons running anywhere but i dont find any or i am doing it the wrong way.
Can some1 give me a hint where to look at to solve my problems? My biggest problem is that i want to access my samba shares at server01 via hostname resolution, which doesnt work
Last edited by merasil (2019-06-08 12:05:06)
Offline