Windows Server 3d ago 9 views 5 min read

How to configure a DHCP scope and range in Windows Server

Learn to create a new DHCP scope, define the address pool, and set lease times on Windows Server 2022 using Server Manager or PowerShell.

Roy S
Updated 2h ago
Sponsored

Cloud Hosting — blazing fast websites

Fully managed cloud hosting with free SSL, auto-backups and a friendly cPanel. Built for WordPress, Laravel and custom PHP apps.

This tutorial explains how to configure a DHCP scope and address range on a Windows Server. The steps cover Windows Server 2022 and Windows Server 2019. You will create a new scope, define the start and end IP addresses, set lease durations, and configure exclusions.

Prerequisites

  • Windows Server 2022 or Windows Server 2019 with the DHCP Server role installed.
  • Administrative privileges on the server.
  • A valid subnet mask and network configuration for the target subnet.
  • Knowledge of the IP address range required for client devices.

Step 1: Open Server Manager and the DHCP Console

Open Server Manager by clicking the Start menu and selecting Server Manager. In the left navigation pane, click Tools, then click DHCP. If the DHCP console is not listed, ensure the DHCP Server role is installed via Server Manager > Manage > Add Roles and Features.

Server Manager > Tools > DHCP

Right-click the server name in the left pane and select Manage > Add Server to the DHCP console if it is not already listed.

Step 2: Create a New DHCP Scope

Expand the server name in the left pane, then expand IPv4. Right-click IPv4 and select New Scope. A wizard will open to guide you through the process.

Right-click IPv4 > New Scope

Click Next on the welcome screen. Enter a descriptive name for the scope, such as "Office-Subnet-10", and click Next.

Step 3: Configure the IP Address Range

On the IP Address screen, enter the starting IP address for the scope. For example, enter 192.168.10.100. Enter the ending IP address, such as 192.168.10.200. This defines the pool of addresses available for lease to clients.

Start IP: 192.168.10.100
End IP: 192.168.10.200

Click Next to proceed. Ensure the subnet mask matches your network configuration, typically 255.255.255.0 for a /24 network.

Step 4: Set the Lease Duration

On the Lease Duration screen, select the appropriate lease time. The default is usually 8 days. You can adjust this based on your network stability requirements. For high-mobility devices like laptops, a shorter lease time like 2 days might be appropriate. For static devices, a longer lease time like 30 days is common.

Lease Duration: 8 days (Default)

Click Next to continue.

Step 5: Configure Exclusions

On the Exclude IP Addresses screen, define IP addresses that should not be assigned to clients. This is essential for static IPs reserved for servers, printers, or network equipment. Enter the start and end IP addresses for the exclusion range.

Exclusion Start: 192.168.10.1
Exclusion End: 192.168.10.99

Click Next to proceed. This ensures that the DHCP server does not assign these addresses to dynamic clients.

Step 6: Configure DHCP Options

On the DHCP Options screen, configure essential settings. Select the option to specify the default gateway. Enter the router IP address, such as 192.168.10.1. Select the option to specify the DNS servers. Enter the primary and secondary DNS server IP addresses.

Default Gateway: 192.168.10.1
DNS Server 1: 8.8.8.8
DNS Server 2: 8.8.4.4

You can also configure WINS servers, domain name, and other options if required. Click Next to continue.

Step 7: Activate the Scope

On the Activate scope screen, select the option to activate the scope immediately. This makes the scope available for clients to request IP addresses. If you prefer to activate it later, you can uncheck this option and activate it manually later.

Activate scope: Yes

Click Next and then Finish to complete the wizard. The new scope will now be active and ready to assign IP addresses.

Step 8: Verify the Scope Configuration

Expand the server name and then expand IPv4. Click the scope you just created. In the right pane, you will see the scope properties. Verify the scope is active by checking the status column. Ensure the IP address range and lease duration match your configuration.

Status: Active
Scope Name: Office-Subnet-10
Start IP: 192.168.10.100
End IP: 192.168.10.200
Lease Duration: 8 days

Troubleshooting

If clients do not receive IP addresses, check the scope status in the DHCP console. Ensure the scope is active. Verify that the IP address range does not overlap with other scopes or static assignments. Check the exclusion ranges to ensure they do not block the intended client addresses.

Review the DHCP server event logs for errors. Open Event Viewer, expand Windows Logs, and select System. Look for events related to the DHCP Server service. Common errors include database corruption or permission issues.

Restart the DHCP Server service if the scope does not appear to be functioning correctly. Use the following command in PowerShell to restart the service:

Restart-Service DhcpServer

Ensure that the DHCP server has the correct network interface bindings. Right-click the server name in the DHCP console, select Properties, and verify that the correct network adapter is selected for the DHCP service.

Check the DNS settings on the DHCP server. Ensure that the DNS server addresses configured in the scope are reachable from the clients. Verify that the DNS servers themselves are functioning correctly and can resolve names.

If using PowerShell to manage scopes, ensure that the DHCP Server module is installed. Use the following command to check the status of the DHCP service:

Get-Service DhcpServer | Select-Object Name, Status

Verify that the scope is authorized in Active Directory if the DHCP server is a member of a domain. An unauthorized scope will not function correctly. Use the following command to check the authorization status:

Get-DhcpServerv4Scope -ComputerName  | Select-Object ScopeId, ScopeName, IsAuthorized

Ensure that the DHCP server has sufficient permissions to manage the scope. Run PowerShell commands as an administrator. Use the following command to grant administrative privileges to the current user:

Add-LocalGroupMember -Group "Administrators" -Member (whoami)

Finally, ensure that the network infrastructure supports DHCP. Check that switches and routers are configured to forward DHCP requests to the server. Verify that no firewall rules are blocking DHCP traffic on ports 67 and 68.

Sponsored

Windows Dedicated Server

High-performance Windows dedicated servers with licensed Windows Server, Remote Desktop access and enterprise-grade hardware.

Tags: NetworkingWindows ServerDHCPAdministration
0
Was this helpful?

Related tutorials

Comments 0

Login to leave a comment.

No comments yet — be the first to share your thoughts.