Forum Discussion
Bala Sundaram
Sep 24, 2018Brass Contributor
Hyper-V Default switch IP address range change. Ver 1809 Build 17763.1
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 5...
cappac
Oct 04, 2020Copper Contributor
19-kilo
Oct 04, 2020Copper Contributor
Excellent! Hope it stays working! I still haven't tested after Windows updates.
I guess we'll see!
-Jake
I guess we'll see!
-Jake
- Peter_H0Dec 09, 2020Copper Contributor
I was so happy when I found your "solution" for this default switch nightmare...
Unfortunately it didn't help. The default switch just don't want to be deleted. As far as I'm aware it cannot be deleted. Though your solution did create another default switch. So what if I just change the priority and then lower the "grey"/unmodifiable default switch to be the lowest priority?
But anyway anyone can get this work?
My original issue is kind of the same as the original topic.
I would like to create an internal network of Servers on one laptop for testing / migration purposes.
Main connection to internet Wifi Network.
Default Switch would provide internet connection. Currently unable to set IP or fix address, just doesn't work if you move your laptop, connect to another WIFI network. So this cannot be touched, I have t leave it on automatic.
I have to create 2-3 separate Servers, with their own internal network card.
The problem is that as soon as I would like to set static ip for internal network, I'm unable to get internet connection. Default Switch constantly changing ip address/range (really silly ranges every computer restart even). Targeting the default switch as default gateway doesn't work.
What should be the proper topology/setup for this please? I really don't even know how others do this, in data centers, with hundreds of VMs, with different ip addresses, ranges, etc. when I'm struggling with 2-3 lousy server emulation. 😄 I might have very limited knowledge.
All help appreciated.
- Ethan_CDec 09, 2020Copper Contributor
Peter_H0 This is getting a little off topic, but I hope this helps:
The 'default switch' is an internal network inside hyper-v on your machine that changes every reboot (but that should not matter for your use case) which has NAT access to the "real" network via your wifi card. The VM's on your machine on the default switch should be able to talk to one another, and again have internet access via network address translation to your machines wifi address.
If you want your VM's to have addresses on the wifi network, you need to add a new switch in the Hyper-V Virtual Switch Manager, and set it to 'external' - this will make the servers you build act like real clients with their own IP addresses on the same network as your wifi card. So now instead of having 1 IP address for your machine, you will need 3 to run your machine and the two servers.
If you absolutely want the servers to have their own private (but fixed IP address range) network; that is NOT part of the "real" network; but you want that network to have a route to the internet, you will need to make a new switch in the Hyper-V Virtual Switch Manager, and set it to 'internal' and add those servers to that new network switch. You will also need a separate external virtual switch, and a 3rd VM attached to both the internal and the external virtual networks, and you'll have to install and manage a (free) virtual firewall appliance (or OS with routing capabilities) on that 3rd VM and set it up to do NAT or routing between the networks. In this scenario you will need 2 IP addresses on the "real" wifi network no matter how many VM's you add to your internal virtual switch, and their IP's can be static on that private internal network.
- Peter_H0Apr 19, 2021Copper Contributor
Ethan_C Hi,
Yes I've solved this issue in a way. I've set up a nat, that works well with multiple VMs.
However not perfect, since I have issues via Wifi still. Namely, OpenVPN game me silly errors, had to disable virtual network in order to use through Wifi, etc. Kind of a nuisance but well, hyper-v is "free" vs. the other solution that others mentioned above. 🙂
Not to mention if you want to know better the azure cloud you should know hyper-v better too so thats my other reason why I muck around with Hyper-v.