Debian: ping unknown host but DNS works post

Hello.

Today I bumped into a problem with ping:

[email protected]$ ping git.company.local
ping: unknown host git.company.local

Of course, it’s a local address, so maybe I forgot to add the local DNS server. Let’s check:

[email protected]$ dig A git.company.local

; < <>> DiG 9.8.4-rpz2+rl005.12-P1 < <>> A git.company.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 15746
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;git.company.local. IN A

;; ANSWER SECTION:
git.company.local. 86400 IN A 192.168.0.150

;; Query time: 0 msec
;; SERVER: 10.0.0.1#53(10.0.0.1)
;; WHEN: Thu Nov 14 12:05:45 2013
;; MSG SIZE rcvd: 249

WTF? Oh, of course. I’m using a .local suffix, so Avahi will take action. Needless for my local network, I just disabled it on Debian Wheezy:

[email protected]$ sudo update-rc.d -f avahi-daemon remove

This should disable Avahi temporarely (until reboot). But, if you need to get rid of Avahi, just uninstall:

[email protected]$ sudo apt-get remove avahi-daemon

Bye.

Tags: avahi, dns, icmp, linux, network, ping

Comments

comments powered by Disqus