DNS Issues on Windows VM to Host

Status
Not open for further replies.

s25a

Explorer
Joined
Jan 16, 2016
Messages
76
Hi,

maybe someone here can help. I setup a Windows VM (Bhyve) on a Freenas 11 U3 System. Everything works except it is not possible to get a Network connection from the VM to the Host.
If you Ping the Host by Ipadress it works but if you try to ping it by Name it does not find the Host. Every other device in the network can be pinged by Name or Ipaddress.
You can also only connect a network share by \\IP-Adress-Host\Share but not by \\Name of Host\Share.

I tried with 2 different systems and reinstalled the VM several time but did not find a solution yet. There's anything wrong with the Name-Service

Any idea how to solve that?

Thanks S
 
D

dlavigne

Guest
Have you added an entry for the host in the VM's /etc/hosts file?
 

s25a

Explorer
Joined
Jan 16, 2016
Messages
76
Hi,

thanks a lot for your answer. No I have not. Where is this file? You mean the /etc/hosts on the Freenas? On the VM is Windows installed.

Thanks again for the help

S
 
D

dlavigne

Guest
In that case, you'll need to add an entry to the VM's Windows lmhosts file. Google for "lmhosts" and the specific version of Windows for examples and where to find the file.
 

s25a

Explorer
Joined
Jan 16, 2016
Messages
76
Hi,

thanks again for your help.

This specific host file in Windows 10 is located in C:\Windows\System32\drivers\etc

I added:

192.168.27.150 nas
and this immediatlely solved it. So I now have access also on the SMB Shared without problems. Thanks

However just to understand - Why ist this? And moch more interesting if the IP Adress of the Host will change you have to update of course. Is there any method taht will keep this up to date and make it easier?

Again...Thanks a lot for this - it helped and solved the problem but I am interested in more details

Cheers

S
 
D

dlavigne

Guest
In order to have name resolution you have 2 choices: either all of the entries you need in your DNS server, or if you don't have control of a DNS server, put the entries you need into a hosts file on each client that needs it. On Unix-based systems, that file lives in /etc/hosts and on Windows systems it lives in lmhosts. Something (either hosts or DNS) has to know the IP address to hostname mapping. And, having static addresses (or ones that rarely change) definitely helps as it saves you having to remember to update the entries.
 

s25a

Explorer
Joined
Jan 16, 2016
Messages
76
Hi,

thanks for explaining that. That helps. However I thought this is automatically done by the DNS which sits inside the router. My understanding is that each of the clients in the network receives the necessary data by the Router. By DHCP it gets the Ip-Adress the Gateway and also the Nameserver. When I look into the details of the network configuration of the VM this data is present (see Screenshot 1). It is pretty much the same than on another (NON-VM) Windows 10 client in the Network (see Screenshot 2). I never had any problems within my network. Each client could reach the server by name or IP except the VM.

So my question is more...Why does the name resolution work for every client in the network without editing any host file but on the VM it does not. And even that is a bit strange because on the VM it works for all other connections except to the host. If that is the "normal" behavior because of VM-Host I am fine but if not I want to understand to avoid any problems in the network.

Thanks again

S

screenshot.6.jpg


screenshot.7.jpg
 
D

dlavigne

Guest
Good question. It may be that the only way to answer it is to remove the lmhosts entry, start a packet sniffer, and try to access another host by name to see where the name resolution is failing.
 

s25a

Explorer
Joined
Jan 16, 2016
Messages
76
Hi,

I am not really experienced in Networks. I am not sure how to do this analyse but I have another information that maybe help. I installed a Linux systems in parallel and there the connection to the host does work without any problems. So it seems this is a specific Windows on BHyve Issue. And as decribed earlier - it happened on every install I did so far.

Maybe someone here who is more qualified in networks can help to get this solved?

Thanks a lot

S
 
Status
Not open for further replies.
Top