S
S
Sergey Prokhorov2019-04-18 14:21:03
linux
Sergey Prokhorov, 2019-04-18 14:21:03

Why don't pings go through the full name?

I'm trying to set up a dns server (bind9)
When I try to ping the client host by the short name (client), pings go through, and if I use the full name (client.test.local), pings do not go.
resolv.conf:

search test.local
nameserver 192.168.10.10

nslookup client:
Server:         192.168.10.10
Address:        192.168.10.10#53

Name:   client.test.local
Address: 192.168.10.11

nslookup client.test.local:
Server:         192.168.10.10
Address:        192.168.10.10#53

Name:   client.test.local
Address: 192.168.10.11

ping client:
PING client.test.local (192.168.10.11) 56(84) bytes of data.
64 bytes from client.test.local (192.168.10.11): icmp_seq=1 ttl=64 time=2.12 ms
64 bytes from client.test.local (192.168.10.11): icmp_seq=2 ttl=64 time=1.42 ms
...

ping client.test.local
ping: client.test.local: Name or service not known
Most likely the problem is in the zone table:
test.local.hosts
$ttl 38400
$ORIGIN test.local.
test.local.     IN      SOA     192.168.10.10 admin.test.local. (
                        1555580033
                        10800
                        3600
                        604800
                        38400 )

test.local.             IN      NS      ns1.test.local.
ns1                     IN      A       127.0.0.1
server.test.local.      IN      A       192.168.10.10
client.test.local.      IN      A       192.168.10.11
test.local.             IN      A       192.168.10.10
client                  IN      A       192.168.10.11
@                       IN      A       192.168.10.10

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Samoilov, 2019-04-18
@NeonTheOne

.local is by default an mDNS domain, and host resolving may be ignored depending on the OS.
There is an opinion that it is bad practice to use .local even for tests.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question