question

GloriaGu-MSFT avatar image
GloriaGu-MSFT asked ·

Change Hyper-V (Default Switch) IP address range

Hello,

Is it possible to change the IP address range used by the Hyper-V (Default Switch) that is 172.x.x.x to 192.168.x.x ?

This is for Hyper-V on windows 10 1809 to 1909

Thread source link: https://social.technet.microsoft.com/Forums/windowsserver/en-US/6b2a9042-c590-4b5d-aa4c-60eb3f7901e8/change-hyperv-default-switch-ip-address-range?forum=winserverhyperv

windows-10-virtualization
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaoweiHe-MSFT avatar image
XiaoweiHe-MSFT answered ·

Hi LMichel,

We are unable to remove default Switch on windows 10 and unable to change the IP address range.

"The Hyper-V Default Switch will randomly use one these IP address ranges based on the host system IP address:
- Start IP: 192.168.0.0 – End IP: 192.168.255.255

  • Start IP: 172.17.0.0 – End IP: 172.31.255.255

The Default Switch has a built-in local collision detection mechanism to determine if IP address in these ranges is already assigned to a network interface on the Local Host system and will try to find a (/28 – 255.255.255.240) address space within one of these ranges that is not already allocated to any network interfaces.

The Default Switch on the Host system always assign the first IP address of the chosen range to the virtual Ethernet Adaptor on the Host, and use this address as the Default Gateway and DNS server provided to the hosted VMs connected to it.

You cannot remove or manage "DHCP" on the default switch."

Thanks for your time!

Best Regards,

3 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The problem is with a VPN client; sometime after the collision detection mechanism; addresses and routes are added that overlap with the network selection made by the hyper-v default switch. It would be MUCH more practical to allow users to exclude network ranges that are known to be incompatible with their environments; instead of making them play reboot roulette over and over again hoping that it magically picks a network segment that is "stable" and can allow them to both be connected to a VM and to a VPN at the same time.

In my case; if I could "pin" hyper-v default switch to 192.168.128.0 /17 it would solve my current challenges; however I'm a sure that others have different requirements.

Please don't assume you know more than your users about their networking needs. :)

0 Votes 0 · ·

Hi Xiaowei

Just to re-iterate Ethans point on this, it's causing issue with an AO VPN, It would be useful to have an option to set it to something that we can control. Is there anything we can do to request this feature?

Thanks

1 Vote 1 · ·

That would be great idea as it generates a lot of conflicts on my machine especially with docker desktop when it uses the a sbunet of 192.168.0.0

0 Votes 0 · ·
SalamELIAS-8667 avatar image
SalamELIAS-8667 answered ·

I am not sure if this staement
will try to find a (/28 – 255.255.255.240)
is correct
In my envirenment, Default switch configured itself with the subnet

172.22.0.0 mask 225.225.240.0

its ip is
172.22.144.1

1st machine IP is
172.22.159.156 mask 255.255.240.0

broadcast ip
172.22.159.255

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.