Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a linksys router which runs "tomato" Linux and serves as the local DNS server. It runs dnsmasq.

I recently upgraded from OS X 10.4 to 10.6. Since then, resolution of hostnames on my local network works in some cases but not others. Previously, this all worked as expected.

Here's an example:

tesla:~ cell$ ping watt
ping: cannot resolve watt: Unknown host

tesla:~ cell$ ping watt.local
ping: cannot resolve watt.local: Unknown host

tesla:~ cell$ ping -c1 192.168.42.1
PING 192.168.42.1 (192.168.42.1): 56 data bytes
64 bytes from 192.168.42.1: icmp_seq=0 ttl=64 time=0.659 ms

--- 192.168.42.1 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.659/0.659/0.659/0.000 ms

tesla:~ cell$ host watt.local
watt.local has address 192.168.42.1

tesla:~ cell$ host watt
watt.local has address 192.168.42.1

My guess is that the host command is querying the DNS server directly, whereas ping and any GUI apps (ie. Safari) are using some sort of Mac DNS resolution routines, which are not working properly.

Please let me know if there's any other info I should provide.

Edit: included pinging ip directly in above example

Edit 2: My domain is using .local

share|improve this question
1  
ZOMG!!! "By default, any hostname ending in .local is treated as a Bonjour host rather than by querying the DNS server entries in Network preferences." ARGH!!! why couldn't they have picked something like ".bonjour"? see support.apple.com/kb/HT2385?viewlocale=en_US –  Jason Pepas Sep 12 '10 at 1:55
    
ugh, you can't simply disable bonjour because of tech.karbassi.com/2007/11/06/… –  Jason Pepas Sep 12 '10 at 2:08
    
does pinging the IP directly work? –  Kyle Cronin Sep 12 '10 at 2:12
    
indeed, changing your domain name appears to be the path of least resistance. I'm surprised -- apple typically makes very smart decisions in how they choose to implement things. this is the first implementation decision I've come across which I'd really consider to be quite a boner. I mean seriously, picking ANYTHING other than ".local" to special-case for bonjour would have been better. –  Jason Pepas Sep 12 '10 at 2:12
    
@Kyle yes, it does. I should have thought to mention that. I'll update the question. –  Jason Pepas Sep 12 '10 at 2:14
add comment

2 Answers 2

If you're serving .local via unicast DNS (instead of multicast DNS, as specified in this draft internet standard), include an SOA record for .local; as of v10.6, OS X detects this and switches .local resolution to unicast DNS. Earlier versions of OS X have other methods of forcing unicast resolution - see Apple's KB article #HT3473 for details.

share|improve this answer
add comment

solution: don't use '.local' as your domain name. lame.

share|improve this answer
1  
This is really a comment, not an answer to the question. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  CajunLuke Aug 20 '12 at 22:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.