---
title: "Short note: DHCP"
subject: "Computer Networks and Security"
chapter: 6
key: "semester_7/computer_networks_and_security:dhcp-note"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/dhcp-note
site: BCT Engineering
---

# Short note: DHCP

Computer Networks and Security · Chapter 6: Application Layer

- Asked in: 2073 Chaitra, 4 marks
- Video: [DHCP Explained | Step by Step](https://www.youtube.com/watch?v=S43CFcpOZSI) — CertBros
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/dhcp-note
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-6

## Question

Write a short note on DHCP.

## Short answer

DHCP automatically assigns IP addresses and network settings via DORA process (Discover, Offer, Request, Acknowledge) using UDP ports 67/68. It provides lease-based allocation with renewal at 50% lease time, supports dynamic/automatic/manual allocation, and uses relay agents for cross-subnet communication.

## Answer

**DHCP (Dynamic Host Configuration Protocol, RFC 2131)** automatically assigns an IP address and other network settings to a host when it joins a network, so an administrator need not configure every host manually. It runs on UDP: the server uses port 67 and the client uses port 68. It is an extension of BOOTP.

#### Information supplied
IP address, subnet mask, default gateway, DNS server addresses, lease time.

#### Operation: DORA
```text
 Client                        DHCP server
   |--- DISCOVER (broadcast) ------>|
   |<-- OFFER (IP, mask, lease) ----|
   |--- REQUEST (accept offer) ---->|
   |<-- ACK (confirmed) ------------|
```
1. **Discover:** client broadcasts (src 0.0.0.0, dest 255.255.255.255) to find servers.
2. **Offer:** server offers an unused IP address and lease time.
3. **Request:** client requests the offered address (and informs other servers).
4. **Acknowledge:** server confirms and the client configures its interface.

#### Features
- **Lease:** the address is given for a limited time; the client renews at 50 % of the lease (T1). On expiry the address returns to the pool.
- Allocation methods: dynamic, automatic, manual (static by MAC).
- A **relay agent** on a router forwards DHCP messages to a server on another subnet.
- Advantages: less configuration work, fewer address conflicts, efficient reuse of addresses, mobile users supported.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. DHCP is used to:
   A. Resolve names
   B. Automatically assign IP and network settings
   C. Route packets
   D. Send mail
   Answer: B. It auto-configures hosts. (Key point: Purpose)

2. The DHCP message order is:
   A. Discover, Offer, Request, Acknowledge
   B. Offer, Discover, Ack, Request
   C. Request, Offer, Discover, Ack
   D. Discover, Request, Offer, Ack
   Answer: A. DORA. (Key point: DORA)

3. DHCP server and client ports:
   A. 67 and 68
   B. 68 and 67
   C. 53 and 80
   D. 25 and 110
   Answer: A. Server 67, client 68 over UDP. (Key point: Ports)
