0

I have alocal setup bind9 on a 16.04 server with a domain and can .test it with a windows client and an ubuntu 16.04 desktop client. This is the setup which is according to How do I do a complete BIND9 DNS Server Configuration with a hostname?:

domain is "test.lan"

srv       192.168.0.1, IP configured via /etc/network/interfaces. Hosts 
                       file contains domain test.lan and srv entry.

linuxpc,  192.168.0.2, IP configured via desktop: static IP with DNS and search 
                       domain magrathea.lan. Hosts file contains domain test.lan 
                       and own and srv entries.

winpc,    192.168.0.3, IP configured via desktop: static IP with DNS and domain 
                       suffix for this connection: magrathea.lan

What I see on the clients:

linuxpc$ ping winpc
PING winpc.test.lan (192.168.0.3) 56(84) bytes of data
64 bytes from winpc.test.lan (192.168.0.3): icmp_seq=1 ttl=...

linuxpc$ ping winpc.test.lan
PING winpc.test.lan (192.168.0.3) 56(84) bytes of data
64 bytes from winpc.test.lan (192.168.0.3): icmp_seq=1 ttl=...

linuxpc$ ping winpc.test
ping: unknown host winpc.test


C:>ping linuxpc
Pinging linuxpc.test.lan [192.168.0.2] with 32 bytes of data:
Reply from 192.168.0.2: bytes =32 time>1ms TTL=64

C:>ping linuxpc.test.lan
Pinging linuxpc.test.lan [192.168.0.2] with 32 bytes of data:
Reply from 192.168.0.2: bytes =32 time>1ms TTL=64

C:>ping linuxpc.test
Ping request could not find host linuxpc.test. Please check the name...
Reply from 192.168.0.2: bytes =32 time>1ms TTL=64

On the server (same with winpc as ping target):

serv$ ping linuxpc
ping: unknwon host linuxpc

serv$ ping linuxpc.test.lan
PING linuxpc.test.lan (192.168.0.2) 56(84) bytes of data
64 bytes from linuxpc.test.lan (192.168.0.2): icmp_seq=1 ttl=...

serv$ ping linuxpc,test
ping: unknwon host linuxpc.test

I did try to add to the interface file of the server serv the line dns-search test.lan, but this did not change the result above.

Questions

  • 1) Why does the server ping only work with the fully qualified domain name?
  • 2) Why can neither PC resolve ".test" without ".lan"? And what can I do about it?
  • 3) Can I use "test" for a intranet domain and what is are the disadvantages compared to "test.lan"?

Thanks for your help

0

In the meantime I did find out what the problem was and how to fix it. I will answer the last question first:

3) Can I use "test" for a intranet domain and what is are the disadvantages compared to "test.lan"? Answer: Yes. The network setup works with full services (LAMP) and multiple clients only with the name "test". No idea, though why one would add the additional ".lan". Maybe someone else knows.

1) Why does the server ping only work with the fully qualified domain name? Answer: Because exactly for this problem there is

a) the line "dns-search" in the file '/etc/network/interfaces'

b) the field "search domains" in the desktops network connection. Its in /Edit/IPv4 Settings/SearchDomains. Might be visible only for manual IP definition.

Use either one. It is never really explained in the examples I found on this site or the wiki. Maybe because its deemed too trivial. It means that for all addresses in that domain the domain part ofthe fully qualified domain name (FQDN) is considered optional. One can just omit it. Without that statement, there are only aliases in the bind9 configurations, but they do not help the server for its own address.

The server works fine now. Here is my full interface definition file:

 sudo nano /etc/network/interfaces
 auto enp2s0f1
 iface enp2s0f1 inet static
    address 192.168.10.10
    netmask 255.255.0.0
    gateway 192.168.10.1
    network 192.168.0.0
    broadcast 192.168.255.255
 dns-nameservers 192.168.10.10
 dns-search test

Obviously that file is for a C-class network. It should be easy to modify the addresses for a D class network as in almost every other examples on this site. You might note the strange network ID. It is the most up to date standard enforced by Ubuntu, so it was automatically generated that way. It is suppose to encode where on the device the port is. It kind of solves a problem that I never had and I fail to see the benefits over "eth0", but it seemed too much trouble to set it back to "eth0" again, so I just left it.

2) Why can neither PC resolve ".test" without ".lan"? And what can I do about it? I guess the key to this is in the detailed function of the dns-search parameter, but I could not experiment, since my network was already running unter "test" instead of "test.lan". So the problem vanished.

Hope it helps someone.

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.