[SOLVED] Windows machines suddenly can't reach Proxmox VMs by hostname

mtlynch

Member
Sep 30, 2020
3
0
6
38
mtlynch.io
My Windows workstation and my Proxmox server are connected via a wired LAN. I've always SSHed into my Proxmox VMs via hostname, but hostname resolution suddenly stopped working, and I can't figure out why.

This began immediately after I physically moved my router. I had to disconnect all the cables and reconnect the router in a different location a few feet away in my office. As far as I can tell, nothing about my setup changed except maybe the ordering of the network cables in my router.

After I reconnected everything, I could no longer connect to my VMs by hostname from any of my Windows workstations. I have a Win10 desktop and laptop. Both can ping my PVE VMs by IP address, but when I try to ping/ssh by name, I get:

Code:
> ping python-dev
Ping request could not find host python-dev. Please check the name and try again.

From a Raspberry Pi connected via Wi-Fi, everything still works the same. If I SSH into the Pi, I can ping and ssh VMs by hostname as normal.

Other details:
  • There were no software/configuration changes around the time this stopped working. It started after a physical router move.
  • The VMs can ping each other by hostname.
  • The VMs can ping my Windows desktop by hostname.
  • Windows can ping/ssh my Proxmox VMs by IP, but fails to resolve them by hostname.
  • The VM hostnames appear in the DHCP client table on my router.
  • There are no firewall rules configured on my PVE datacenter or node.
  • If I hardcode VMs by IP in the hosts file on my Windows machine, I can access the VMs again, but this is a pain.
  • The Windows machines can access other physical Linux boxes on the network by hostname, just not my Proxmox VMs.
Steps I've tried (made no difference):
  • Rebooted my Windows workstation
  • Ran ipconfig /flushdns, ipconfig /release, ipconfig /renew from my Windows workstation
  • Rebooted Proxmox and restarted all of my VMs
  • Flushed my router's DHCP table
  • Rebooted my router
  • Factory reset my router
Versions:
  • PVE version: 6.2-4
  • Router: Linksys WRT1900ACS v1 with latest stock firmware
  • VMs: All Ubuntu 18.04 server
  • Workstation: Win10 Pro 1903
Any suggestions about why my Windows machines can no longer route my VMs by hostname would be greatly appreciated.
 
hi,

what does ipconfig /all say on your windows machines? are the DNS servers set correctly?
 
DNS seems set correctly on my Windows machine:

Code:
Ethernet adapter Ethernet:


   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection (2) I218-V
   Physical Address. . . . . . . . . : [redacted]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.0.0.38(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, November 19, 2020 4:12:12 PM
   Lease Expires . . . . . . . . . . : Sunday, November 22, 2020 4:15:20 AM
   Default Gateway . . . . . . . . . : 10.0.0.1
   DHCP Server . . . . . . . . . . . : 10.0.0.1
   DNS Servers . . . . . . . . . . . : 10.0.0.1
   NetBIOS over Tcpip. . . . . . . . : Disabled

I tried a few different routers, and I get different behavior depending on the router, but I always run into issues routing my VMs by hostname.

I'm now running a Ubiquiti EdgeRouter 4, and my VMs correctly show up under DHCP client leases on the router, but I can't ping them by hostname from any other host on my network. I get the same behavior whether I test from a physical Windows host or physical Linux host:

Here's the behavior I see:

* Ping by hostname - non-VM host to non-VM host: works
* Ping by hostname - non-VM host to PVE VM: Name or service not known
* Ping by hostname - PVE VM to PVE VM: Name or service not known
* Ping by hostname - PVE VM to non-VM host: Name or service not known
* Ping by IP - non-VM host to non-VM host: works
* Ping by IP non-VM host to PVE VM: works
* Ping by IP - PVE VM to PVE VM: works
* Ping by IP - PVE VM to non-VM host: works

If I inspect traffic on my Windows machine in Wireshark, I see that it resolves other hosts via NBNS. My Windows machine sends out an NBNS query for a particular hostname and the host responds via NBNS, but the Proxmox VMs don't seem to respond to such queries.
 
Update: I finally figured this out.

I used Wireshark to capture packet traces while using a Ubiquiti Security Gateway 3 as my router, the only router where pinging Proxmox VMs by hostname did work. The difference in that one as opposed to the others was that when I pinged through the USG-3, my Windows host would do a DNS query to <VM name>.localdomain and get the IP that way. On other routers, my Windows machine would skip the DNS query and try other protocols like NBNS and MDNS.

The solution was to enable dnsmasq on my EdgeRouter 4 so that the DHCP server provides local DNS. I also upgraded to the latest firmware, but I'm not sure if that was related.
 
great, thank you for explaining the solution as well!

you can mark the thread [SOLVED] by editing the first post title prefix
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!