I'm on Windows 10 Pro Build 1803, and my default Hyper-V HNSNetwork is assigning IPs to my virtual machines correctly. However, the IPs are seemingly leased for some time, even if the VMs are turned off and unregistered. If multiple different machines are imported/exported, my network runs out of IPs to lease, and the VMs get a non-routable IP until I restart Windows.
I have found that Get-HnsNetwork
returns Subnets: {@{AddressPrefix=172.18.254.96/28; GatewayAddress=172.18.254.97}}
Clearly, the /28
mask is limiting my network to very few IPs for my use case (15?) and I'd like to change it to /24
.
What is the correct way to do this? I cannot find any current documentation on the matter.
EDIT: I am aware I can create a new virtual switch and use that. I'm interested in whether the settings for the default switch can be changed.
Alternatively, is there a way to "reset" the service that leases the IPs? Is there a DHCP server that can be reset without rebooting?