windows-server-2012hyper-vwindows-server-2012-r2hypervisorhyper-virtualization

DHCP server not working properly windows server 2012


Hyper-V

  #Setup 

*main physical PC is using the IP address (192.168.2.2)

*Installed Windows Server 2012 R2

*DC is using (192.168.2.13 – 255.255.255.0) via external switch

*Guest PCs (Windows 7 pro x64)

*Firewall is off for Guest

*Guest has already joined the domain and current ip is dhcp using external switch (192.168.2.14 – 255.255.255.0)

*Both can ping each other and the host pc

*Installed AD DC and configured it successfully on DC

*Installed DHCP, DNS roles and configured it successfully

  #What I'm trying to achieve

AD DC with working DHCP and DNS

  #Problem

scope with 192.168.5.1-192.168.5.20 sub 255.255.255.0 not working, means client pc not receiving ip address from scope, it's getting a dhcp ip (192.168.2.14) from the external switch

DHCP log is creating error events 1035, 1036, 1045, and 10020

  #I already did

*Release and renew ip many times

*Set static ip for DC and loopback dns

*Change vSwitch for both DC & client PC to internal & private but they're not working and getting APIPA ip addresses so i revert back to external switch

*Checked for DHCP administrators and dhcp users groups and they are already there

*Adding administrator user and normal user credentials to DHCP administrators and user groups

*Unauthorize and reauthorize scope

*Deactivate and reactivate scope

*DNS configured correctly

*Deleting the DHCP file from AD Sites and services and then reauthorize the scope

*Turn off firewall for DC

*I even installed new windows server 2016 and reconfigured everything

*Many many restarts server and DHCP service but no luck

Errors 1035, 1036 is successfully gone but 1045 is still there, also 10020 is here but i don't use ipv6 so I don't care about it.


Solution

  • Do you have a static IP on the DC that you are wishing to use as the DHCP server that is on the 192.168.5.0 subnet? There must be an interface on the network that you wish to hand out IPs on.

    The only other way around this would be to add a route on your external switch (If Layer 3 capable) and add a DHCP Helper if that is an option on your particular switch.