Understanding DHCP on Windows

Dynamic Host Configuration Protocol (DHCP) automates the assignment of IP addresses, subnet masks, gateways, and other network parameters to devices on a network. Windows provides built-in DHCP client and server services that can be managed through graphical tools or PowerShell.

Configuring DHCP Client

To configure a network interface to obtain an IP address automatically via DHCP, use the Settings app or the following PowerShell command:

Get-NetAdapter | Where-Object {$_.Status -eq "Up"} | Set-NetIPInterface -Dhcp Enabled

Installing DHCP Server Role

On Windows Server, the DHCP Server role can be added via Server Manager or PowerShell:

Install-WindowsFeature -Name DHCP -IncludeManagementTools

Creating a Scope

After installing the role, create a DHCP scope to define the pool of IP addresses:

Add-DhcpServerv4Scope -Name "OfficeScope" -StartRange 192.168.10.100 -EndRange 192.168.10.200 -SubnetMask 255.255.255.0

Common Troubleshooting

Leave a Comment