# Active Directory - Installing DHCP Server Role

## Objective

This weekend's exercise was focused on installing and configuring the **DHCP (Dynamic Host Configuration Protocol)** role on a Windows Server that's part of an **Active Directory (AD)** environment. DHCP is essential in network management because it automates the assignment of IP addresses to client machines on the network.

## Lab Setup

* **Host Machine:** Windows 11 with Hyper-V enabled
    
    * **Virtual Machines:**
        
        * `DC01`: Windows Server 2022 (Domain Controller + DHCP Server)
            
        * `WIN11`: Windows 11 (Client)
            
    * **Virtual Network:** Private virtual switch (Hyper-V)
        
    * **Tools Used:** Server Manager, DHCP Management Console (`dhcp.msc`)
        
    

1\. Open Server Manager &gt; Add roles and features

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749305311576/946c1aaf-771b-46a4-b74f-db420e691004.png align="center")

2. Choose Role-based or feature-based installation
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749305464308/17c2f469-7087-4efc-b46b-df49ef2c7935.png align="center")

3. Select Destination Server
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749305549531/2b29ddc7-6433-4ce3-a0d6-b7cfe083905a.png align="center")

4. Select Server Role - DHCP Server &gt; Add Features &gt; Choose features
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749305604708/a79a1a43-914c-4f0c-aa28-c4f40ced6e60.png align="center")

5. Confirm Installation Selections &gt; select restart the destination server automatically if required
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749305772800/dceaf162-3874-4d98-a39a-536e22d15d61.png align="center")
    
    6. Complete Post-deployment Configuration
        
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749305989733/fec2a7e2-6fba-4547-90d7-669f83565903.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749306044333/f3bbfb06-e0d1-498d-a143-0e0091bb38df.png align="center")

**Create new DHCP Scope**

Select Tools &gt; DCHP

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749308044293/b295ac9e-b36f-4af0-821a-3152a2d007e5.png align="center")

In this example, the scope will be IPV4. Right click and choose new scope &gt; Select scope name

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749308168283/44fa393b-ab60-4e60-81b2-c5b2409819a4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749308246403/4a19ecb7-dccb-497e-b058-7e26e812ee4a.png align="center")

Select scope range

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749310068076/316e438f-a25c-48eb-abd5-687da2dbf316.png align="center")

Choose exclusion - Added Domain Controller to exclusion list

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749310127778/9ac85cc4-5376-46dd-8704-47918e010025.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749308867109/f59954e9-23d5-4aa3-a55b-77107ebad48c.png align="center")

Select Scope Options

Add the Router (Default Gateway) and any other relevant options if needed.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749308974461/f320b4fe-b89d-4dae-9b62-3212ce058969.png align="center")

## Testing the Setup

After activating the scope, I powered on the Windows 11 client VM (WIN11), which is also connected to the same **Private virtual switch**.

* Ran `ipconfig` on the client and confirmed it received a **192.168.0.x** address from the DHCP server.
    
* Verified the lease appeared under **Address Leases** in the DHCP Manager on `DC01`.
    

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749310267810/b8284d16-051e-40ca-98c1-a6f4fe8deda8.png align="center")

Confirmed inside of DCHP manager as well.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749310317242/bce1d9f0-36e7-4d17-8b56-51bf3f7b3195.png align="center")

## Lessons Learned

* DHCP does **not** require the client to be joined to the domain—just on the same network.
    
* A **Private virtual switch** in Hyper-V simulates a small, isolated network—perfect for AD labs.
    
* If you get an APIPA address (`169.254.x.x`), check the DHCP server’s authorization, firewall, and whether the client can reach the server at all.
