[Dnsmasq-discuss] Ping does not work but nslookup works (Use dnsmasq on Mac OS X)

Simon Kelley simon at thekelleys.org.uk
Mon Dec 23 16:22:48 GMT 2013


On 23/12/13 16:09, Peng Yu wrote:
> When I run "dig oxygen.yulab", I see the following log.
>
> Dec 23 10:05:35 dnsmasq[51588]: query[A] oxygen.yulab from 127.0.0.1
> Dec 23 10:05:35 dnsmasq[51588]: forwarded oxygen.yulab to 192.168.1.25
> Dec 23 10:05:35 dnsmasq[51588]: reply oxygen.yulab is 192.168.1.163
>
> When I run "dig @192.168.1.25 oxygen.yulab", I see the following log.
>
> Dec 23 10:07:24 dnsmasq[51588]: query[A] oxygen.yulab from 127.0.0.1
> Dec 23 10:07:24 dnsmasq[51588]: cached oxygen.yulab is 192.168.1.163
>
> So this means dnsmasq is running correctly? Does mac's ping use
> something else to resolve ip addresses? Thanks.

No idea. You clearly don't have a DNS problem.

Any MAC experts out there?


Simon.

>
> On Mon, Dec 23, 2013 at 9:59 AM, Simon Kelley<simon at thekelleys.org.uk>  wrote:
>> On 23/12/13 15:52, Peng Yu wrote:
>>>>
>>>> Use --log-queries to see check that the queries for *.oxygen.yulab are
>>>> going
>>>> to the right place. If they are, then check that 192.168.1.25 is givving
>>>> the
>>>> right answer.
>>>
>>>
>>> I now added "log-queries"
>>>
>>> /etc$ grep log-queries /opt/local/etc/dnsmasq.conf
>>> log-queries
>>> /etc$ sudo port unload dnsmasq
>>> /etc$ sudo port load dnsmasq
>>>
>>> I don't find where the log is from the manual. Would you please let me
>>> know to check it?
>>
>>
>> It goes to the standard system log. If you can't find that then add
>> something like
>>
>> log-facility=/tmp/dnsmasq_log
>>
>> and it will go to that file.
>>
>>
>> Simon.
>>
>>
>>>
>>>> dig @192.168.1.25 oxygen.yulab
>>>
>>>
>>> Here is the current output.
>>>
>>> /etc$ ping oxygen.yulab
>>> ping: cannot resolve oxygen.yulab: Unknown host
>>> /etc$ nslookup oxygen.yulab
>>> Server:        127.0.0.1
>>> Address:    127.0.0.1#53
>>>
>>> Name:    oxygen.yulab
>>> Address: 192.168.1.163
>>>
>>> /etc$ dig @192.168.1.25 oxygen.yulab
>>>
>>> ;<<>>   DiG 9.8.5-P1<<>>   @192.168.1.25 oxygen.yulab
>>> ; (1 server found)
>>> ;; global options: +cmd
>>> ;; Got answer:
>>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43460
>>> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
>>>
>>> ;; QUESTION SECTION:
>>> ;oxygen.yulab.            IN    A
>>>
>>> ;; ANSWER SECTION:
>>> oxygen.yulab.        604800    IN    A    192.168.1.163
>>>
>>> ;; AUTHORITY SECTION:
>>> yulab.            604800    IN    NS    ns.yulab.
>>>
>>> ;; ADDITIONAL SECTION:
>>> ns.yulab.        604800    IN    A    192.168.1.25
>>>
>>> ;; Query time: 3 msec
>>> ;; SERVER: 192.168.1.25#53(192.168.1.25)
>>> ;; WHEN: Mon Dec 23 09:48:53 CST 2013
>>> ;; MSG SIZE  rcvd: 79
>>> /etc$ dig oxygen.yulab
>>>
>>> ;<<>>   DiG 9.8.5-P1<<>>   oxygen.yulab
>>> ;; global options: +cmd
>>> ;; Got answer:
>>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9105
>>> ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>>>
>>> ;; QUESTION SECTION:
>>> ;oxygen.yulab.            IN    A
>>>
>>> ;; ANSWER SECTION:
>>> oxygen.yulab.        604605    IN    A    192.168.1.163
>>>
>>> ;; Query time: 0 msec
>>> ;; SERVER: 127.0.0.1#53(127.0.0.1)
>>> ;; WHEN: Mon Dec 23 09:52:01 CST 2013
>>> ;; MSG SIZE  rcvd: 46
>>>
>>
>
>
>




More information about the Dnsmasq-discuss mailing list