Search The Site

How To Add the DHCP Server Role with netsh

What is DHCP? An IP address is dynamically assigned from a server that contains a pool of addresses. The server leases the computer one of the available addresses for a specified amount of time. Once the specified time has expired, the computer renews the lease or requests a new IP address.

To install the DHCP Server role do the following

  • At a command prompt, complete the following steps by typing:
  • Start the dhcp service with the following command: start /w ocsetup DHCPServerCore
  • Set the service type to automatic by entering sc config dhcpserver start= auto
  • To start the dhcp service type: net start dhcpserver
  • Authorize the DHCP server in Active Directory by typing: netsh dhcp add server DC1.seowebz.local
  • Add a scope by typing: netsh dhcp server \\DC1 add scope SCOPENAME
  • Add a lease range by typing: netsh dhcp server \\DC1 scope add iprange
  • Add the default gateway by setting optionvalue 3: netsh dhcp Server \\DC1 Scope set optionvalue 3 IPADDRESS
  • Add the DNS servers by setting optionvalue 6: netsh dhcp Server \\DC1 Scope set optionvalue 6 IPADDRESS