Hyper-V - Default Switch & DHCP Server

I want to create a virtual test environment (in Hyper-V [I know, some may say a bad choice but reality calls for it]) to play with things like Domain/DC, DHCP, etc.

Thus far I know that the "Default" Switch of Hyper-V will provide a guest with a 172.xxx.xxx.xxx IP address and also allow the guest to access the internet via the host. I guess that what you call a network bridge and I'd assume it may behave the same on KVM, or even Container Networking like LXD.

The question I have is: would a DHCP server running inside a VM with a bridged Network Adapter (aka the Default Switch) conflict with other clients (in terms of assigning IP addresses to them) on the local network of the Hyper-V host, or only affect clients of the same internal virtual Network?

4

1 Answer

The virtual switch is a standalone LAN that is NATTED to the outside world by a virtual router that is also part of Hyper-V. It is NOT bridged.

Hyper-V also provides DHCP to this LAN. That will obviously conflict with your own DHCP server on the virtual LAN. It will not affect other virtual LANs unless you explicitly configure the vritual router to do DHCP relay (no idea if that is even possible in Hyper-V).

In order to be able to safely play with your own DHCP in the virtual environment you need to configure Hyper-V not the do DHCP for that virtual LAN. (I'm no Hyper-V expert. I'm a VMWare guy. I don't know if Hyper-V can be configured such, but any decent virtualization product should be able to do that.)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like