LearnViz CompSci
Home / Learn / Computer Networks / DHCP

Beginner Topic 14 of 50 Computer Networks

DHCP

Protocol automatically assigning addresses to hosts.

How it works

The Dynamic Host Configuration Protocol automatically gives devices the network settings they need: an IP address, subnet mask, default gateway, DNS servers and lease duration. A client broadcasts a Discover, a server offers an address, the client requests it and the server acknowledges, often remembered as DORA. Leases expire and are renewed, and address pools or reservations bind addresses to MAC addresses.

Step-by-step walkthrough

  1. The client broadcasts a Discover message.
  2. The server offers an address and settings.
  3. The client requests the offered address.
  4. The server acknowledges with a lease time.
  5. The client configures its IP, gateway and DNS server automatically.

Where it is used

Home routers, office networks, Wi-Fi hotspots and cloud virtual networks use DHCP, which saves manual configuration and avoids conflicts.

Common pitfall

A rogue DHCP server can redirect clients and cause attacks or outages. Exhausted pools leave new devices without addresses. Short leases create churn, while long leases waste addresses. Servers and infrastructure usually need static addresses or reservations. Use DHCP snooping on switches to block unauthorized servers.

Where it fits in the course

DHCP is topic 14 of 50 in Computer Networks, rated Beginner. It follows DNS. The next topic is HTTP.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is DHCP?
Protocol automatically assigning addresses to hosts. It belongs to Computer Networks and is a beginner-level topic.
Where do people use DHCP?
Home routers, office networks, Wi-Fi hotspots and cloud virtual networks use DHCP, which saves manual configuration and avoids conflicts.
What is the most common mistake with DHCP?
A rogue DHCP server can redirect clients and cause attacks or outages.
What should I learn before this topic?
Start with DNS, the topic just before it in Computer Networks.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Networks quiz.
Is DHCP hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn DHCP?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to DHCP?
DNS, HTTP, Routers are closely connected. The full list is in the related topics section of this page.
What should I study after DHCP?
Continue with HTTP, the next topic in Computer Networks.

Related topics