Re: dig knows while ping doesn't
On Jo, 17 feb 11, 03:20:58, T o n g wrote: FYI: $ cat /etc/resolv.conf # for interface eth0 search local 'local' is used for zeroconf, you might want to choose something else instead. nameserver 192.168.2.100 nameserver 192.168.2.1 nameserver 192.168.2.100 Third entry is a duplicate. I doubt it is the problem though, it's just useless. Regards, Andrei -- Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic signature.asc Description: Digital signature
Re: dig knows while ping doesn't
T o n g mlist4sunt...@yahoo.com wrote: $ dig maroon maroon. 0 IN A 192.168.2.100 $ ping maroon ping: unknown host maroon $ cat /etc/resolv.conf search local All host lookups are modified by the hosts entry in /etc/nsswitch.conf. This should generally be files dns (or files {stuff} dns {stuff}). First you need to check that. Next you need to consider what's actually happening here. 1. Dig is explicitly looking for the name maroon.. 2. Ping, on the other hand, is using the resolver library that honours the search directive in /etc/resolv.conf. This means that the value will be appended to each unqualified request prior to lookup, i.e. ping will expect to find maroon.local. My recommendation would be either to change your local DNS server so that it adds .local to all unqualified hostnames, or to remove the search directive from your resolv.conf. I think your next posting mentions that you're using dnsmasq, in which case the options to consider would be domain and expand-hosts, and possibly domain-needed. See the example dnsmasq configuration file at /usr/share/doc/dnsmasq-base/examples/dnsmasq.conf.example. Chris -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/iohv28xk3c@news.roaima.co.uk
Re: dig knows while ping doesn't
On Thu, 17 Feb 2011 03:59:55 +, T o n g wrote: On Thu, 17 Feb 2011 03:20:58 +, T o n g wrote: I can't explain the following myself: . . . -- dig knows the host maroon. -- yet ping doesn't know the host maroon. - It actually happens to all of my local hosts short names, unless the domain name is appended. (...) What is the output of hostname -f? Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.02.17.15.08...@gmail.com
dig knows while ping doesn't
Hi, I can't explain the following myself: $ dig maroon ; DiG 9.7.1-P2 maroon ;; global options: +cmd ;; Got answer: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 34832 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;maroon.IN A ;; ANSWER SECTION: maroon. 0 IN A 192.168.2.100 ;; Query time: 0 msec ;; SERVER: 192.168.2.100#53(192.168.2.100) ;; WHEN: Wed Feb 16 22:16:20 2011 ;; MSG SIZE rcvd: 40 -- dig knows the host maroon. $ ping maroon ping: unknown host maroon -- yet ping doesn't know the host maroon. What could be the reason? Thanks FYI: $ cat /etc/resolv.conf # for interface eth0 search local nameserver 192.168.2.100 nameserver 192.168.2.1 nameserver 192.168.2.100 $ ifconfig eth0 Link encap:Ethernet HWaddr 00:e0:4d:b8:98:ef inet addr:192.168.2.106 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4dff:feb8:98ef/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1 RX packets:3085169 errors:2 dropped:0 overruns:0 frame:2 TX packets:3707445 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1244271976 (1.2 GB) TX bytes:2176532830 (2.1 GB) Interrupt:43 Base address:0xc000 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:232195 errors:0 dropped:0 overruns:0 frame:0 TX packets:232195 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:21797691 (21.7 MB) TX bytes:21797691 (21.7 MB) -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/iji46q$1s5$1...@dough.gmane.org
Re: dig knows while ping doesn't
On Thu, 17 Feb 2011 03:20:58 +, T o n g wrote: I can't explain the following myself: . . . -- dig knows the host maroon. -- yet ping doesn't know the host maroon. - It actually happens to all of my local hosts short names, unless the domain name is appended. - My DNS server is DNSmasq, the whole setup is blogged at http://sfxpt.wordpress.com/2011/02/06/providing-dhcp-and-dns-services- with-dnsmasq/ Thanks -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/iji6fr$92f$1...@dough.gmane.org
Re: dig knows while ping doesn't
On Thu, 2011-02-17 at 03:59 +, T o n g wrote: On Thu, 17 Feb 2011 03:20:58 +, T o n g wrote: I can't explain the following myself: . . . -- dig knows the host maroon. -- yet ping doesn't know the host maroon. - It actually happens to all of my local hosts short names, unless the domain name is appended. - My DNS server is DNSmasq, the whole setup is blogged at http://sfxpt.wordpress.com/2011/02/06/providing-dhcp-and-dns-services- with-dnsmasq/ For me... tixy@computer2:~$ ping computer1 PING computer1.home (192.168.2.11) 56(84) bytes of data. so the domain 'home' is getting automatically added. What does cat /etc/resolv.conf return? I have domain home search home nameserver 192.168.2.1 I believe the 'search' entry is what makes it work for me. This file is automatically generated by the dhcp client. -- Tixy () The ASCII Ribbon Campaign (www.asciiribbon.org) /\ Against HTML e-mail and proprietary attachments -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1297927464.2312.8.ca...@computer2.home