Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 12410  / 1 Year ago, fri, december 2, 2022, 12:34:16

When I try to ping or browse using a web browser certain domains names that we host on our local network, it does not work. Yet, dig and nslookup correctly return their details. What do I need to do to fix this?



The DNS server and DHCP server at our local network work fine on the Windows clients.



$ ping ns1.domain.local
ping: unknown host ns1.domain.local
aaron@aaron-laptop:~
$ nslookup ns1.domain.local
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: ns1.domain.local
Address: 172.16.0.254

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search domain.local

$ nm-tool

NetworkManager Tool

State: connected (global)

- Device: eth0 [Wired connection 1] -------------------------------------------

IPv4 Settings:
Address: 172.16.0.93
Prefix: 24 (255.255.255.0)
Gateway: 172.16.0.2

DNS: 172.16.0.254

</pre>

**Added additional info**

As per http://askubuntu.com/a/146310/10998
> For some reason avahi-daemon interferes with name resolver
<pre>
ping ns1
PING ns1.domain.local (172.16.0.254) 56(84) bytes of data.
64 bytes from ns1.domain.local (172.16.0.254): icmp_req=1 ttl=64 time=0.381 ms

More From » networking

 Answers
7

Edit the /etc/nsswitch.conf file.



cat /etc/nsswitch.conf
...
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts: files mdns4_minimal dns [NOTFOUND=return] mdns4
...


That change fixed it for me. mdns is a particular implementation of DNS services which is meant to be faster than DNS. It does not resolve the names correctly and with the [NOTFOUND=return] option standard DNS is never used. This works fine for most of the Internet at large, but for some reason it is not working for our office resolutions.



By changing the resolution to include DNS, I can now ping the domain controller as I expected. As well as the other services we are running on our local office domain.



ping ns1.bidorbuy.local
PING ns1.domain.local (172.16.0.254) 56(84) bytes of data.
64 bytes from controler.domain.local (172.16.0.254): icmp_req=1 ttl=64 time=0.394 ms

ping office-blog.domain.local
PING officewebserver.domain.local (172.16.0.252) 56(84) bytes of data.
64 bytes from officewebserver.domain.local (172.16.0.252): icmp_req=1 ttl=64 time=0.914 ms

[#37974] Saturday, December 3, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inciplyies

Total Points: 10
Total Questions: 114
Total Answers: 93

Location: French Polynesia
Member since Sun, Dec 20, 2020
3 Years ago
;