Home » Hyper-V
Category Archives: Hyper-V
Configuring DHCP SCOPE Using GUI (Windows Server 2008 r2) & Windows Powershell (Windows Server 2012 r2)
Before we could discuss about DHCP Scope, first let’s find out what is DHCP and SCOPE
What is DHCP?
Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automatically assign an IP address to a computer
DHCP assigning an IP address to a computer from a defined range of numbers (i.e., a scope) configured for a given network is called DHCP Scope.
Benefits of DHCP
In Windows Server 2003, the DHCP Server service provides the following benefits:
- Reliable IP address configuration. DHCP minimizes configuration errors caused by manual IP address configuration, such as typographical errors, or address conflicts caused by the assignment of an IP address to more than one computer at the same time.
- Reduced network administration. DHCP includes the following features to reduce network administration:
- Centralized and automated TCP/IP configuration.
- The ability to define TCP/IP configurations from a central location.
- The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options.
- The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable computers that move to different locations on a wireless network.
- The forwarding of initial DHCP messages by using a DHCP relay agent, thus eliminating the need to have a DHCP server on every subnet.
Configuring DHCP SCOPE Using GUI (Windows Server 2008 r2)
- Make sure that you have already installed Windows Server 2008 r2 and configured with a static IP address.
- You will need to know your network’s IP address range.
- The range of IP addresses you will want to provide to your clients machines.
- Your DNS server IP addresses, and your default gateway.
- Additionally, you will want to have a plan for all subnets involved.
What scopes you will want to define, and what exclusions you will want to create.
Open the Server Manager.
Click Add Roles, you can see the New Box opened as shown below:
Select “DHCP Server” and click Next.
Click Next .
Note: Make sure that this PC should have Static IP address assigned otherwise, it will popup with “Warning Message”.
As we are configuring DHCP SCOPE, here it shows my network connection binding and we need to verify it, as shown below:
When click Next, we have to provide the details like Parent Domain, Primary DNS Server, and Alternate DNS Server (as you see below) and click Next.
When you click Next, you will be asked to Specify WINS Server.
Here I have Selected not to go WINS Server as shown below:
Now it’s time to add the IP Address range to configure the SCOPE.
Click Add to provide the IP Address range.
Please provide the SCOPE Name, Starting IP Address , Ending IP Address, Subnet mask & Default gateway.
Click Next. And now here we have to decide if we want to “Enable or Disable IPV6”
In my Scenario I have selected to Disable this option as shown below:
Now it time for Authorization.
Click Next, you can find the Summary info as shown below:
Great the Install was Successful as shown below:
Now let’s see how to Manage DHCP SCOPE
Managing your Windows Server 2008 DHCP Server
Click Start -> Administrative Tools -> DHCP
Open the MMC (DHCP) as shown below:
Let’s begin Step by Step
Expand Scope, you can find
1: Address Pool
2: Address Leases
1: Address Pool
2: Address Leases
Now Select Scope Options and check if everything is configured properly.
Now let’s discuss about Filters.
In Filters we have to options
Oops it’s showing Error message on both the Tabs “Allow and Deny”.
No problem, Right Click on Allow Tab and click Enable and same thing task to Deny Tab as well output without error on the Tabs as shown below:
Once you Enable you can see the change and shown below:
Configuration of both these two Tabs you can see after configuration of DHCP Scope on Windows Server 2012 r2 using Power Shell.
Allow : Clients who want to avail the DHCP Services.
Deny : Client who don’t want to avail the DHCP Services.
Adding the users is pretty simple Right click on Allow Tab and click on Filter and Add the MAC Addresses.
Great by this we have configure the DHCP Scope in Windows Server 2008 r2.
Configuring DHCP SCOPE Using Windows Powershell (Windows Server 2012 r2)
Open Windows Power Shell as “Run as Administrator”
Before we begin let’s install the feature using the command
We can see the Output below
If you want to Install DHCP RSAT, you can run the following command.
Install-WindowsFeature –Name RSAT-DHCP
Now the next step is to Bind the DHCP server to a network interface where it can listen for the client requests and lease out IP addresses.
This network interface should be configured with a static IPv4 or IPv6 address. The following PowerShell command would bind the DHCP server to the network interface.
Let run the below command
Add-DhcpServerv4Scope -Name ” Scope Name” -StartRange 10.x.x.x -EndRange 10.x.x.x -SubnetMask 255.0.0.0
Here it will prompt for Scope ID which is nothing but IP address for the mentioned Scope
Now we have to confirm and check if the above command was successful.
To check run the command ” Get-DHCPServerv4Statistics”
Great the output is clear.
Now Open DHCP MMC
Click Administrative Tools -> DHCP
Here we might see Error on IPV4 & IPV6, not to worry we just need to Authorize.
Right click on “dhcp.dc2.com” and select Authorize Tab to go green which indicates that we have traced out the error, on Tabs IPV4 & IPV6 as shown below:
Now let’s see how to Manage DHCP, we have already discussed about the options while configuring DHCP on Windows Server 2008 r2.
So let’s jump into the Tabs “Allow and Deny”
Allow and Deny are the Executions for the Client Machine to Connect.
For the Client that we want to avail the dhcp services.
Right click on Allow and Add New Filter, and provide the MAC Address and Description as shown below:
For the Deny please provide the MAC Address where the clients DO Not Want to Avail the DHCP Services.
Oops the Tab “Allow & Deny” indicates that those two are not configured in right way 😦
Nothing to worry, please right click on Allow Tab and click Enable and same applies to Deny as well.
Now the Tab high lighted below New Tab is to add the MAC addresses to Allow or Deny the Accounts.
Now you can see for one of the Client Allow Execution has been added, and both the options has been “Enabled” so the Red Mark on the Tabs has been traced out.
One more thing here in Windows Server 2012 r2 we can specify if we require the time to Enable this DHCP Services.
Also we can mention time as Unlimited (bases on your requirement)
Note: If you have MAC Addresses on Excel and if you wish to add all at a time the please find the command mentioned below:
Allow, <MAC ADDRESS>, Filter for ClientPC1
Allow, <MAC ADDRESS>, Filter for ClientPC2
Allow, <MAC ADDRESS>, Filter for ClientPC3
Deny, <MAC ADDRESS>, Filter for ClientPC4
The following command adds all these filters to the local DHCP Server.
Import-Csv Filter.csv | Add-DhcpServerv4Filter -Force
Great by this we have learned configuring DHCP SCOPE on Both Windows Server 2008 r2 & 2012r2.
MCSA, MCSE | Windows Server
Publisher @ Techrid.com