Debian: ping unknown host but DNS works
Hello.
Today I bumped into a problem with ping:
1
2
kassner@brian$ 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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
kassner@brian$ 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:
1
kassner@brian$ 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:
1
kassner@brian$ sudo apt-get remove avahi-daemon
Bye.