0

I have set up a simple http server on my local Windows 7 machine and I can access it from my Mac using the ip address and port number. However I can not access it using Windows machine's network name from Mac. At the same time I CAN access a smb share by name on the same computer from the same Mac. So if I go to smb://dell-pc/ I will get connected, however, if I try this in browser http://dell-pc:8000 or a simple ping dell-pc in terminal I will get an error

ping: cannot resolve dell-pc: Unknown host

So apparently my Mac can resolve the name when accessing smb but fails to resolve it when pinging or accessing a web server. What's the logic here?

2

Windows sharing uses multicast to let other computers know it's existence. It is not the same as domain name in DNS - that's why it's working only in file sharing. To have name on mac just add your Windows machine IP to OSX hosts file:

  1. Lookup your local IP on Windows by running ipconfig command
  2. On OSX edit hosts file sudo nano /private/etc/hosts put line <IP of Windows computer> dell-pc

On local router you can also put static IP for Windows machine to not change it in future.

2
  • is there any way I could make my dell-pc advertise it's name? I would like to avoid editing hosts file, because I will also need to access this address from iPad, smart TV's browser and other devices. Btw, the pc already has a static ip address. – casper Nov 15 '14 at 17:37
  • you need to run local DNS here you can read about it su – botmonster Nov 15 '14 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.