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...
cbj4074
Dec 03, 2018Brass Contributor
Bala Sundaram is correct in that the Connection type cannot be changed for the Default Switch (all of the options are grayed-out), H3ALY , even with all VMs powered-off.
In any case, I have the same problem/question as Remon li . All I'm trying to do is assign a static IP address to a guest VM so that it doesn't change on me unexpectedly. I'd really like to satisfy the following requirements:
- Be able to specify the IP address to be used in the guest VM, e.g., 192.168.10.10.
- Be able to accomplish the above programatically, so that it can be done as part of an automated provisioning process (e.g., via Vagrant).
- Give Internet access to the guest VM via NAT (exactly as is done with the Default Switch). To be clear, I am amenable to using the Default Switch (instead of creating a new one), as long as its IP address does not change on me.
It sounds as though this is a two-part problem, and the first part is fixed in Build 17763.134, so at least the subnet will no longer change at random.
Bala Sundaram , when you say, "Erratic IP address assignment issue is fixed in Build 17763. 134", how many of the four octets are now "fixed"? The first three? In other words, do you now find that the address is predictably set to 192.168.XX, where XX never changes unexpectedly (nor the 192.168 part)?
Thanks for any clarification that you're able to provide!
Bala Sundaram
Dec 05, 2018Brass Contributor
Hello cbj4074,
I do not know why I said something very wrong. Sorry for misleading. I checked again, It appears the unpredictable IP address on default switch issue exists in build 17763.104 too. Darn thing assigns CLASS C (172.17.239.XXX) or CLASS D (192.168.75.XXX). It is still unmanegable. May be I was clouded by the workaround I had in place.
Basically I created a work around to take advantage of default switch as my two Physical NICs are teamed and fault tolerant.
- Created an Internal Switch
- Also have default switch that piles up on the bridged NIC (ICS)
- Have to VNIC's on the guest.
- Internal Switch based NIC is Static 192.168.5.XXX (255.255.255.0) for guest to guest communication.
- Default switch based NIC is Dynamic for Internet access
Regards,
Bala
- cbj4074Dec 06, 2018Brass Contributor
No problem at all, Bala Sundaram . I really appreciate the info you've shared thus far, and thank you for clarifying your observations.
In Hyper-V on the mainline Enterprise branch (Build 1803 17134.345), I've only ever seen the Default Switch assign a Class B address in the 172.X.X.X range, and the last three octets seem variable.
Although, when I create a new External Switch (haven't tried the other types), it is assigned a Class C address in the 192.X.X.X range.
Are you sure that in your particular case the class B vs. class C assignment isn't based simply on the type of switch (Default, External, Internal, and Private)?
In any case, until there is some simple means by which to set these values statically, this behavior is going to be problematic for automation, period. :(
- Bala SundaramDec 06, 2018Brass ContributorAre you sure that in your particular case the class B vs. class C assignment isn't based simply on the type of switch (Default, External, Internal, and Private)?
cbj4074, I have no idea how iP is getting assigned. 17763.104 was bad, 17763.164 seems to atleast stick to Class D. I have stopped/started , rebooted at least dozen times and confirming.- cbj4074Dec 10, 2018Brass Contributor
Thanks again for sharing your observations Bala Sundaram .
I can confirm that the switch type does not determine assigned IP address class, as you suggest. Indeed, when using the Default Switch, my colleagues and I receive a mix of 192 and 172 addresses if we provision VMs repeatedly.
To work around this, we've had to implement scripts that run at the end of the provisioning process, within the VMs, to detect and set the IPv4 and gateway addresses statically.
If there's any upside to the Hyper-V Switch behavior, it's that once a static IP is hard-coded within the VM, Hyper-V seems happy to issue it to the client whenever the VM is powered-on.
That said, I have not tried rebooting the host machine, starting/stopping the Hyper-V service, etc. between VM boots to see if that behavior remains consistent...
- Remon liDec 06, 2018Copper Contributor
17763.168 released , is it fixed or not ?
- Bala SundaramDec 06, 2018Brass ContributorTook it down 17763.168 last night and was hoping it will be corrected. Confirming still has same issue and default switch is unmanagable exactly like ICS definition.
Only new thing it is assigning only class D Network ip address.
First two octet seems stabilized. 192.168.XXX.YYY. can change on every Hyper-V service start/stop- Remon liDec 06, 2018Copper ContributorBad news. I'm afraid develop team take it as new featuer instead of bug.