When you enable the Hyper-V role on Windows 11, the system creates a virtual switch called the Default Switch. This switch automatically assigns IP addresses to virtual machines using its own built-in DHCP server. Over time, especially after creating and deleting many VMs, the DHCP lease pool can become exhausted or fragmented. This article explains why the Default Switch DHCP range gets stuck and how to force a renewal of the IP address pool so your VMs can connect to the network again.
Key Takeaways: Renewing the Hyper-V Default Switch DHCP Range
- Hyper-V Default Switch: A virtual switch created automatically when you enable Hyper-V. It provides DHCP and NAT for VMs without manual configuration.
- PowerShell cmdlet
Reset-VMSwitch: The primary method to delete and recreate the Default Switch, forcing a fresh DHCP range. Requires admin rights. - Windows Settings > Network & internet > Advanced network settings > More network adapter options: Manual path to remove stale virtual NICs that can interfere with DHCP renewal.
How the Hyper-V Default Switch DHCP Range Works
The Hyper-V Default Switch uses the 192.168.137.0/24 subnet by default. The built-in DHCP server assigns addresses from 192.168.137.1 to 192.168.137.254. The switch itself takes 192.168.137.1 as the gateway, and the host machine gets 192.168.137.1 as its IP on the virtual adapter.
Each time a virtual machine starts, it requests a DHCP lease. When the VM shuts down, the lease is not always released immediately. If you create and delete VMs frequently, the DHCP server may run out of available addresses. The system does not automatically garbage-collect old leases from the Default Switch. The DHCP range becomes full, and new VMs fail to obtain an IP address.
The only reliable way to renew the DHCP range is to delete the Default Switch and let Hyper-V recreate it. This process clears all stale DHCP leases and resets the IP pool to its initial state.
What Happens When the DHCP Range Is Exhausted
When the DHCP pool is full, a VM boots with an APIPA address in the 169.254.x.x range. The VM cannot reach the internet or the host. You may also see the following symptoms:
- The VM network icon shows a yellow warning triangle.
- Running
ipconfig /allinside the VM shows no DHCP server. - The Hyper-V Manager displays the VM network status as “Not connected” or “Limited”.
Steps to Renew the Default Switch DHCP Range Using PowerShell
This method deletes the existing Default Switch and recreates it. All VMs will lose network connectivity temporarily. After the switch is recreated, restart each VM to obtain a new IP address.
- Open PowerShell as Administrator
Click Start, type PowerShell, right-click Windows PowerShell or Terminal, and select Run as administrator. Confirm the User Account Control prompt. - Identify the Default Switch
Run the commandGet-VMSwitch | Where-Object {$_.SwitchType -eq 'External' -or $_.Name -eq 'Default Switch'}. Look for the switch named Default Switch. Its SwitchType will be Internal. - Delete the Default Switch
RunRemove-VMSwitch -Name "Default Switch" -Force. The-Forceparameter removes the switch even if VMs are using it. Those VMs will lose their virtual NIC connection. - Recreate the Default Switch
RunNew-VMSwitch -Name "Default Switch" -SwitchType Internal. This creates a new internal switch. The system automatically assigns a new DHCP range, typically starting at 172.x.x.x or 192.168.x.x depending on the host network configuration. - Restart Each Virtual Machine
Start each VM from Hyper-V Manager. Inside the VM, open a command prompt and runipconfig /renew. Verify the new IP address falls within the 192.168.137.0/24 or the newly assigned subnet.
Alternative: Reset the Default Switch Using the Hyper-V Manager GUI
If you prefer not to use PowerShell, you can reset the switch through the Hyper-V Manager interface. However, the GUI method is less reliable because it may not fully clear the DHCP cache.
- Open Hyper-V Manager
Press Windows + R, type virtmgmt.msc, and press Enter. - Delete the Default Switch
In the left pane, click Virtual Switch Manager. Select Default Switch from the list. Click the Remove button. Confirm the deletion. - Create a New Internal Switch
Click New virtual network switch. Choose Internal as the connection type. Name it Default Switch. Click Apply and then OK. - Restart VMs
Shut down and restart each VM. The VM should receive a new DHCP lease.
Common Issues After Resetting the Default Switch
VMs Still Have APIPA Addresses After Switch Recreation
If a VM still shows a 169.254.x.x address after the switch reset, the problem is likely a stale virtual NIC inside the VM. Open the VM settings in Hyper-V Manager. Remove the existing network adapter and add a new one. Restart the VM. This forces the VM to request a fresh DHCP lease.
Cannot Delete the Default Switch Because VMs Are Running
The Remove-VMSwitch command with the -Force parameter works even if VMs are running. If you are using the GUI and get an error, shut down all VMs first. Alternatively, use the PowerShell method with -Force.
Default Switch Does Not Reappear After Deletion
Hyper-V automatically recreates the Default Switch when the Hyper-V service restarts or when you create a new VM. If the switch does not reappear after running New-VMSwitch, restart the Hyper-V Virtual Machine Management service. Open Services (services.msc), find Hyper-V Virtual Machine Management, right-click it, and select Restart.
Default Switch DHCP Range vs Manual Virtual Switch Configuration
| Item | Default Switch | Manual Internal/External Switch |
|---|---|---|
| DHCP server | Built-in, automatic | Must be configured manually or via a separate DHCP server |
| IP address range | 192.168.137.0/24 by default | Any subnet you define |
| NAT (Network Address Translation) | Automatic, allows VM internet access | Requires manual NAT or Internet Connection Sharing |
| Renewal method | Delete and recreate the switch | Edit switch properties or restart the DHCP server |
| Best for | Quick testing and development | Production or static IP environments |
You can now reset the Hyper-V Default Switch DHCP range on Windows 11 using PowerShell or the GUI. After the reset, verify that each VM receives a valid IP address from the new pool. If you need more control over IP assignments, consider creating a manual internal or external switch with a static DHCP server. As an advanced tip, use the Get-VMNetworkAdapter -VMName cmdlet to inspect the MAC address and IP address assignments of a VM before and after the switch reset.