Saturday, 2 February 2019

windows - Create Local DNS Record


I created a new VM, and was able to ping it using its IP address. However, I can't ping it by name - even though it belongs to the same "WORKGROUP" as my other windows machines. What makes this particularly strange is the result of the following command:


C:\>ping -a 192.168.0.20

Pinging WIN-AOHA8MSD3D0 [192.168.0.20] with 32 bytes of data:
Reply from 192.168.0.20: bytes=32 time<1ms TTL=128
...

So the machine name can be queried, as indicated above, but when I turn around with that name it fails:


C:\>ping WIN-AOHA8MSD3D0
Ping request could not find host WIN-AOHA8MSD3D0. Please check the name and try
again.

In case it is relevant, the VM is in VMWare Workstation 7.1 using a bridged network adapter. The guest OS is Windows 2008 R2 SP1. The host is Windows 7 x64. Originally the ping of the IP address had not worked either, but I had created an ICMP rule on the guest OS that allowed the echo request.


What is necessary to make the machine name "pingable?"



Answer



On the host, make sure Network Discovery is enabled.


On the guest (and host if necessary), configure your firewall to allow the following protocols:




  • LLMNR: UDP to port 5355


    Used by Windows Vista, 7, and 2008. Uses multicast.




  • NetBIOS: UDP to port 137 for the name service.


    Optionally UDP/138 for NetBIOS datagrams, in order for browsing to work. Not needed for name resolution.


    Used by all Windows versions, also OS/2 and LAN Manager for MS-DOS. Uses broadcast, does not support IPv6. My recommendation is to not enable this if LLMNR works. On the other hand, NBNS is still better than manual /etc/hosts editing, and is supported by many operating systems (including Linux through Samba).




  • Apple's mDNS is not part of Windows, but fairly common nevertheless and available for Windows (Bonjour) and Linux (Avahi), also the only officially open protocol in this list. If you decide to install it, open UDP port 5353.




If name resolution still fails, use Wireshark to monitor the network traffic.


No comments:

Post a Comment

Where does Skype save my contact&#39;s avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...