Installing DHCP Server Role On Windows 2008 R2 Core Services
This article provides the steps to install the DHCP Server role on to a Windows 2008 R2 Core Services server.
To install DHCP Server role perform the following steps.
- At the command prompt execute the following command to install the DHCP Server role :-
start /w ocsetup DHCPServerCore
- Next execute the following command to configure the DHCP Server Service to start Automatically :-
sc config dhcpserver start = auto
- Next start the DHCP Server Service by executing the following command :-
net start dhcpserver
- If your DHCP Server is part of an Active Directory Domain execute the following command to Authorise the server :-
netsh dhcp add server %computername% {DHCP Server IP Address}
E.G. netsh dhcp add server %computername% 10.20.30.40
Configuring A DHCP Scope
To configure a new DHCP Scope on the server once it’s installed perform the following steps.
- At the command prompt execute the following command to add a new scope :-
netsh dhcp server {DHCP Server IP Address} scope xxx.xxx.xxx.0 add iprange xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx {Scope Name Required}
E.G. netsh dhcp server 10.20.30.40 scope 10.20.30.0 add -iprange 10.20.30.100 10.20.30.200 OfficeScope
- Next to activate the DHCP Scope execute the following command :-
netsh dhcp server {DHCP Server IP Address} scope
Configuring An Exclusion Range
To add an Exclusion Range to the scope perform the following steps.
- At the command prompt execute the following command to add an Exclusion Range :-
netsh server {DHCP Server IP Address} scope xxx.xxx.xxx.0 add excluderange xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
E.G. netsh dhcp server 10.20.30.40 scope 10.20.30.0 add -iprange 10.20.30.150 10.20.30.175
Configuring A Default Gateway
Depending on the DHCP Scope you’re creating you may need to add the Default Gateway Option.
To add the Default Gateway Option perform the following steps.
- At the command prompt execute the following command :-
netsh server {DHCP Server IP Address} scope xxx.xxx.xxx.0 set Optionvalue 003 IPADDRESS xxx.xxx.xxx.xxx
E.G. netsh server 10.20.30.40 scope 10.20.30.0 set Optionvalue 003 IPADDRESS 10.20.30.1
Configuring A DNS Server
Depending on the DHCP Scope you’re creating you may need to add the DNS Server Option.
To add the DNS Server Option perform the following steps.
- At the command prompt execute the following command :-
netsh server {DHCP Server IP Address} scope xxx.xxx.xxx.0 set Optionvalue 006 IPADDRESS xxx.xxx.xxx.xxx
E.G. netsh server 10.20.30.40 scope 10.20.30.0 set Optionvalue 006 IPADDRESS 10.20.30.250