Home  Previous page


Hyper-V and DHCP Guard Feature (EN)

With Windows Server 2012, Microsoft added Hyper-V DHCP Guard feature. This feature can be enabled onVM NICs and it discardsDHCPOffer messages.

Below is a figure about DHCP Lease process:



When DHCP Offer packets are blocked, a DHCP server cannot offer anIPaddress.

How DHCP Technology Works:http://technet.microsoft.com/en-us/library/cc780760(v=ws.10).aspx

In other words, this feature blocks virtual machines from acting as DHCP servers. This feature is very useful to prevent rogue DHCP servers running on VMs in your Hyper-V environment.

How to enable Hyper-V DHCP Guard feature using UI?

  • UsingHyper-V Manageradministrative tool, do a right click on your VM and then click onSettings


  • Go toAdvanced featuresunder the VM NIC and then checkEnable DHCP Guardoption. Once done, click onOK


How to enable Hyper-V DHCP Guard feature using PowerShell?

Set-VMNetworkAdapterwithDhcpGuardswitch can be used to enable DHCP guard on VM NICs.

Set-VMNetworkAdapter:http://technet.microsoft.com/en-us/library/hh848457.aspx
We can take the following example which enables DHCP Guard feature on all NICs for Server1 VM:


Get-VMNetworkAdapter –VMName Server1 | Set-VMNetworkAdapter –DhcpGuard on


See Also