I have three machine in my home network connected by a wireless router. One is server installed linux at 192.168.1.1, another is Thinkpad with MS Windows XP at 192.168.1.2, last one is MacBook Pro with Mac OS X 10.6.3 at 192.168.1.3.

When I ping the Linux Server from Thinkpad (MS Windows XP) I can get the correct ip address, but when I ping it from Mac I get the global address of my router, like 61.135.181.175.

Could you tell me why this happen? And how do I get same ping result on Mac and Windows.

Thanks

link|improve this question
feedback

migrated from stackoverflow.com Jun 3 '10 at 9:43

This question came from our site for professional and enthusiast programmers.

1 Answer

It is possible that your linux box announces its name on the local network via NetBIOS Name Service (WINS), which is primarily used by windows machines. This can happen if you are for instance running samba on the linux server. Your mac would not be able to see the NetBIOS name, and use DNS instead. If you don't have a DNS server locally, this will result in a lookup at a public DNS, which will probably be set to the publically reachable router address (depending on what you set it to). If this is your situation, the easiest solution is probably to install a proxy DNS, DHCP combo on your router, like dnsmasq. This will work 'automatically' if your linux server gets its IP via DHCP on your router. If not, you will need to configure entries manually. Dnsmasq can do this too, but there are other options as well, like BIND.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown