After you reset the Hyper-V Default Switch, mDNS-based discovery such as Bonjour or network device browsing may stop working on the host machine. The root cause is that the Default Switch reset changes the virtual network adapter’s MAC address and disrupts the multicast DNS cache. This article explains why the reset breaks mDNS, provides step-by-step fixes to restore discovery, and covers related failure patterns you may encounter.
Key Takeaways: Restoring mDNS After Hyper-V Default Switch Reset
- Flush DNS cache via Command Prompt: Running
ipconfig /flushdnsclears stale mDNS records that prevent new discovery responses from being accepted. - Restart the Host Network Service: Stopping and starting the
hnsservice resets the virtual switch stack and refreshes network bindings. - Disable and re-enable the Hyper-V virtual adapter: This forces the adapter to obtain a fresh IP configuration and re-register mDNS records.
Why Resetting the Hyper-V Default Switch Breaks mDNS Discovery
The Hyper-V Default Switch is a virtual switch that provides NAT-based networking for virtual machines. When you reset this switch through Hyper-V Manager or PowerShell, the system deletes the existing virtual switch and creates a new one. This process changes the MAC address of the virtual network adapter attached to the host. mDNS relies on a stable MAC address and IP address to identify and respond to discovery queries. After the reset, the host adapter appears as a new device on the network, but the mDNS cache on both the host and other devices still contains the old MAC-to-IP mapping. Discovery responses from the host are ignored because the cached record does not match the new adapter identity.
mDNS Cache Behavior
mDNS uses a multicast address 224.0.0.251 and UDP port 5353. Each device caches the IP address and MAC address of discovered services. When the Hyper-V Default Switch resets, the host’s virtual adapter receives a new IP from the NAT subnet, typically 172.x.x.x. Other network devices see the new IP but the cached record still points to the old IP. The host itself may also cache its own old mDNS records, causing it to ignore its own new announcements. The cache does not expire immediately because mDNS uses a time-to-live of up to 75 minutes for records.
Network Binding Changes
The Host Network Service (HNS) manages the virtual switch stack. A reset triggers HNS to unbind and rebind the virtual adapter. During this process, the adapter may lose its mDNS registration. Bonjour services such as iTunes sharing, AirPrint, or network file browsing stop responding to queries until the adapter re-registers with the mDNS responder. In some cases, the responder does not restart automatically.
Steps to Restore mDNS Discovery After a Hyper-V Default Switch Reset
Method 1: Flush DNS Cache and Restart the Host Network Service
This method clears stale cache entries and forces the network stack to reinitialize. It does not require a system restart.
- Open Command Prompt as administrator
Press Windows + X and select Terminal Admin. If prompted, click Yes. - Flush the DNS cache
Typeipconfig /flushdnsand press Enter. You should see the message “Successfully flushed the DNS Resolver Cache.” - Restart the Host Network Service
Typenet stop hnsand press Enter. Wait 10 seconds, then typenet start hnsand press Enter. The service stops and starts without errors. - Test mDNS discovery
Open a web browser or file explorer and try to browse network devices. If discovery does not work, proceed to Method 2.
Method 2: Disable and Re-enable the Hyper-V Virtual Adapter
This method forces the adapter to obtain a new IP lease and re-register with the mDNS responder. It works when the cache flush alone does not restore discovery.
- Open Network Connections
Press Windows + R, typencpa.cpl, and press Enter. - Locate the Hyper-V virtual adapter
Look for an adapter named “vEthernet Default Switch” or “Hyper-V Virtual Ethernet Adapter.” It may be labeled with a network icon showing a computer and a monitor. - Disable the adapter
Right-click the adapter and select Disable. Confirm any prompts. Wait 10 seconds. - Re-enable the adapter
Right-click the adapter again and select Enable. The adapter will obtain a new IP address from the Hyper-V NAT subnet. - Verify IP configuration
Open Command Prompt and typeipconfig /all. Ensure the adapter shows an IP address starting with 172.x.x.x and a subnet mask of 255.255.0.0. - Test mDNS discovery
Browse network shares or use a Bonjour browser app to confirm services appear.
Method 3: Restart the Bonjour Service on Windows
If you use Apple Bonjour or third-party mDNS responders, the service may have stopped after the switch reset. Restarting it forces a fresh registration.
- Open Services console
Press Windows + R, typeservices.msc, and press Enter. - Find the Bonjour Service
Scroll to Bonjour Service. Its display name is “Bonjour Service.” The service name isBonjour Service. - Restart the service
Right-click Bonjour Service and select Restart. If the service is not running, select Start. - Verify the startup type
Double-click the service, check that Startup type is set to Automatic, and click OK. This ensures Bonjour starts after future switch resets.
If mDNS Discovery Still Has Issues After the Main Fix
mDNS Discovery Works on Some Devices but Not Others
This indicates that the host adapter is properly registered, but other devices have stale cache entries. On each affected device, flush the mDNS cache. On macOS, run sudo killall -HUP mDNSResponder. On Linux, run sudo systemctl restart avahi-daemon. On Windows, use ipconfig /flushdns and restart the Bonjour service.
Hyper-V Virtual Machines Lose Network Connectivity After the Reset
The Default Switch reset can also disrupt virtual machine network connections. In each VM, release and renew the IP address. On Windows VMs, run ipconfig /release followed by ipconfig /renew. On Linux VMs, run sudo dhclient -r then sudo dhclient. Restart the VM if the issue persists.
mDNS Discovery Stops After Every Hyper-V Default Switch Reset
If the problem recurs after each reset, create a batch script that runs the three methods automatically. Save the following commands in a file named restore-mdns.bat and run it as administrator after a reset:
@echo off ipconfig /flushdns net stop hns net start hns
Place the script on your desktop for quick access.
Hyper-V Default Switch Reset vs Manual Virtual Switch: mDNS Behavior
| Item | Hyper-V Default Switch Reset | Manual External Virtual Switch |
|---|---|---|
| Switch type | NAT-based, created automatically | User-created, bridged to physical NIC |
| MAC address change | New MAC address assigned | MAC address unchanged unless manually changed |
| mDNS cache impact | Cache becomes stale immediately | Cache remains valid unless physical NIC changes |
| Host IP address | New IP from NAT subnet | Same IP as physical NIC |
| mDNS recovery | Requires cache flush and service restart | Usually works without intervention |
The two methods differ primarily in how they handle addressing. The Default Switch reset changes both MAC and IP, which breaks mDNS. A manual external switch keeps the physical NIC identity stable, so mDNS continues working after most switch operations.
You can now restore mDNS discovery after a Hyper-V Default Switch reset using DNS cache flush, HNS restart, or adapter re-enable. Next time you reset the switch, run the batch script first to avoid discovery interruptions. For persistent issues, consider using a manual external virtual switch instead of the Default Switch to keep network identity stable across reboots.