Forum Discussion
Hyper-V Default switch IP address range change. Ver 1809 Build 17763.1
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
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...
- Bala SundaramDec 11, 2018Brass Contributor
I am glad you got it sorted out. Pretty cool.
BTW...Regarding your comment "I can confirm that the switch type does not determine assigned IP address class, as you suggest"
One needs to be on Insider Build 17763.168 to get consistent CLASS D IP address on Hyper-V Stop/Starts. Sorry do not know the build number for W2K16 which I am told is also based on same code path of Windows 10K.
Regards,
Bala