Hyper-V Default switch IP address range change. Ver 1809 Build 17763.1

Brass Contributor

Can one confirm IP address range changed to 192.168.X.Y Subnet 255.255.255.240 from 172.X.X.X

 

Also changes the subnet randomly on every Hyper-V services startup. 192.168.X.Y . X can change from 51 thru 180.

 

Although this is working on DHCP based IP assignment on guests, It is causing issues on static IP as it keeps changing after every boot

 

Regards,

Bala

135 Replies
Hi,
This thread is really old and in a few days Windows 10 1909 is being released for the public use.
currently Windows 10 1903 is globally available for both home and businesses. lot of things have improved ever since.

so which Windows 10 build are you using?
I personally use Windows 10 insider fast ring build 18990 (2001).

okay so for you special situation, I would use 2 physical NICs, which is very normal for configurations like yours.
1 physical NIC would provide connection for the Host only (Internet connection + communication with other LAN devices on your real network) and the other physical NIC would be tied to all of your VMs as an (External) virtual network adapter.

this way your VMs would be isolated from the host and other devices on your LAN, as they all have access to the physical NIC 2 only (through an external virtual network adapter).


Another possibility would be to set up 2 virtual network adapters. 1 private (for inter-VM communications) and the other to give VMs Internet access which is again the 2nd physical NIC as an external network adapter).

@HotCakeX 

 

Is the default switch's crazy behavior of re-creating its vEthernet adapter on every reboot fixed in 1909 (or later)? 

@mlmathews 

 

Nope,

if you need to use the default switch you can create your own persistent route from the powershell.

 

what is actually crazy is that when someone decides to setup servers and then use the default switch for that server, after that complain why the default switch gets a new IP address after each reboot!!!

 

Microsoft never designed the default switch for long term usage or advanced usage like on a virtual server (VM). the default switch, as the name applies, is just a set up and forget virtual network adapter, made by Default, for Anyone without Any networking experience, to setup a quick VM using the quick VM creation in Hyper-V.

 

Any serious server admin knows Not to use the default switch for any server.

 

I don't know why some people fail to understand this.

 

Default switch changes IP address after every reboot because it is Smart, it evaluates the network environment and chooses a free and routable temporary IP address for the user to use it on their VM.

a user that doesn't need or doesn't know how to go through more advanced setups like External virtual network adapter.

 

 

 

@HotCakeX 

 

So Microsoft provide a feature that they don't want you to use ? Why don't they just delete it or give option to delete it ?

 

It's not smart way to change IP after each reboot for routing, not at all , it is just a stupid bug may never be fixed.

Who said they don't want you to use the default switch?
read my post again, it's for people who don't know much about networking so Hyper-V creates a pre-made virtual network adapter called default switch for them to help get internet connection on their VM.
people might be behind multiple NATs, different subnets and have multiple NICs, default switch is Smart so it identifies the difficulties of the network and creates a non-persistent route for the moment to give that user an Internet connection at any cost. the reason it chooses a non-persistent route is to Reevaluate the network environment for any changes. the random addresses gives it flexibility.

if the default switch is bugging you then you're doing it Wrong.
you're probably relying on an static IP address and instead of doing the proper and correct work of creating an external network adapter, you just used the default switch.
that's Not the right way.

this is something that I use for work and personal everyday and I've worked with lots of other professionals either IRL or collaborated over the Internet, Learned from them and experienced myself, nobody, I say again, Nobody chooses the default switch for a Virtual Server that needs a static IP address.
you can't do something wrong, get a bad result and then say it's a bug....

Yeah, I'd be fine if I could just remove the default. It's a real headache when I need to connect my work laptop to the corporate network. I can't get on the corporate WLAN if there are any other unauthenticated adapter connections...and the vEthernet adapter is not authenticated. I know a registry hack to get around this issue...but the dang vEthernet adapter gets recreated on every boot and I have to re-apply the hack. I could write a script to do it, but its madness that I can't just get rid of the thing.

@HotCakeX 
Please stop speaking for MS, it is stated nowhere that 
Microsoft never designed the default switch for long term usage or advanced usage like on a virtual server (VM)

The documentation said nothing about it. I've spent hours just to figure out that it's simply broken. 

Any serious server admin knows Not to use the default switch for any server.
It's not true again. You could use any default switch from every other software vendor except MS no matter are you serious or not. 
Why don't you just understand that it's not a feature, it's a bug, nobody doing this stuff except MS. Nobody period.  

@sn00p 

 

 “Hyper-V has a Default Switch for easy networking.” Having just tried it out myself, I can affirm that this Default Switch makes Hyper-V networking dead simple.

 

https://searchenterprisedesktop.techtarget.com/blog/Windows-Enterprise-Desktop/Default-Switch-Makes-...

 

if you don't believe me, I can give you thousands of guides and YouTube videos to show everyone setting up a virtual servers uses External/Internal/Private network adapters, Not the default one.

 

 

@mlmathews 


@mlmathews wrote:
Yeah, I'd be fine if I could just remove the default. It's a real headache when I need to connect my work laptop to the corporate network. I can't get on the corporate WLAN if there are any other unauthenticated adapter connections...and the vEthernet adapter is not authenticated. I know a registry hack to get around this issue...but the dang vEthernet adapter gets recreated on every boot and I have to re-apply the hack. I could write a script to do it, but its madness that I can't just get rid of the thing.

You can disable it from the network settings or device manager.

 

@sn00p 

 

Previously you had to mess around using virtual switch manager to create a connection to network. Now you just select default switch if you like.

This option is essential for quick creating a new hyper-v session.

It is only used in existing sessions if you explicitly add it to a particular VM session.

Deleting it will not provide any additional security, or prevent other users creating a virtual switch.

Deleting things without understanding their functionality is surefire way to break things!

 

the 2nd comment

 

https://www.tenforums.com/virtualization/96064-hyper-v-cannot-delete-default-switch-after-fall-creat...

 

 

 

 

True, but I have to re-disable it after every boot.

@sn00p 

you said stop speaking for MS (Microsoft),

ok sure, of course, why not.

 

here is what Microsoft says, Not me:

 

Hyper-V has a Default Switch for easy networking

 

https://techcommunity.microsoft.com/t5/Virtualization/What-s-new-in-Hyper-V-for-Windows-10-Fall-Crea...

 

Does a professional user who wants to setup a Virtual Server for serious work use something that is made for easy network? if he/she does then he/she is No longer called professional, but amateur. and for amateurs, Microsoft created the Default switch.

 

 

 

@HotCakeX It's not a documentation. It's just a tech blogs with workarounds for an extremely buggy software. 
The default switch is not usable in almost every scenario except 2 minutes demo session and I bet it could fail even in this case. 
It's like a car moving randomly in every direction possible no matter the actual driver wants to drive.  


And the thing that you have to add more objects to make it works doesn't make it a feature, it's still a bug. And even more, it's completely undeletable. 
Please try Linux or simply VirtualBox so you could compare a MS mess and working solution from other vendors. Few hours for MS to make it work and few clicks on VB or few lines of configuration on Linux really makes a difference and MS is not a winner here. 

The reality is something else, I'm sorry that you feel it's a bug but the fact is different. you're free to have your opinion.

Default switch is usable in Every scenario except those that require static IP addresses such as servers.

the majority of the computer users/home users in the world use dynamic IP address, ISPs all around the world give their subscribers dynamic IP addresses, they only lease static IP address only to those clients that pay more and explicitly ask for it.

there is no win or loss, it's not a race, the correct way is shown, now if someone decides to go the wrong way, then it's their fault.
Well. HyperV doesn't have innate shared folders. Would you be so kind as to describe a procedure for sharing folders with Linux VM on the default switch?
It's not possible in the current implementation. There are hundreds of details you didn't take into account saying
"Default switch is usable in Every scenario except those that require static IP addresses such as servers".
It's not true, you can't even share folders. You can't use firewalls, you can't use ACLS or another wide used technics. It requires different third party software (all premium) and hours of configuring to be usable. Just compare it to simple two clicks in virtualbox before advocating weird and buggy MS implementation of the simplest thing ever widely available in every other similar software.
It's also annoying that you have to switch your network from public to private every time the IP range changes for no reason.

A fixed range that changes only if there's a collision with the host's network would be enough. There is absolutely no need to randomize the IP range every time the host reboots.
Not me.
you talked about another subject so I tried to stick to the topic and do not deviate. if you wanna talk about other subject you can open another topic.
It's for easy networking and quick VM creation, anything in particular and more advanced feature you need you have to use other types of virtual network adapters.

@HotCakeX How is it "advanced networking" if I just wanna attach a computer to a network, but need it to be designated a private network so the firewall just works.

 

At this point you're just defending your own point of view. You can't make a statement anymore where you don't feel personally attacked. It's become very tedious. Just let go.

Nope,
attach your VM to the virtual network adapter, no problem, set the virtual network adapter Inside the VM to private, no problem, set the default network location for all known and unknown networks in Group Policy to private, no problem.


instead of talking about imaginary things about me, please stay on topic and Don't be rude.

so again,
1. use group policy, the local one, not the group policy management, to change network locations.
2. if you change the virtual network adapter INSIDE the VM, it WON'T change after reboot of the host.
computers on a network using DHCP do NOT change their network locations when the DHCP server gives them a different IP address.