Difference between DNS and DHCP

A Domain Name System (DNS) server translates domain names to IP addresses and vice versa. A Dynamic Host Configuration Protocol (DHCP) server automatically assigns IP addresses and other network configuration to devices on a network. Both are essential networking services but serve very different purposes.

What is DNS?

DNS is a hierarchical and decentralized naming system for computers and other resources connected to a private network or the Internet. It transforms human-readable domain names (like www.example.com) into numerical IP addresses (like 192.168.1.1) that computers use to locate each other.

DNS uses UDP (and TCP for larger responses) and operates on port 53. It has been a crucial component of the Internet's operation since 1985.

By delegating authoritative name servers for each domain, DNS distributes the responsibility of name resolution across many servers worldwide, providing a fault-tolerant and scalable service.

What is DHCP?

DHCP is a client/server protocol that automatically assigns IP addresses and other configuration parameters to devices on a network. It eliminates the need for manually configuring each device's network settings.

When a device connects to a network, it sends a DHCP request. The DHCP server responds with an IP address, subnet mask, default gateway, and other settings. DHCP uses port 67 (server) and port 68 (client) over UDP.

DHCP provides the following to each device −

  • IP Address
  • Subnet Mask
  • Default Router (Gateway) Address
  • DNS Server Address
DNS Browser DNS Server example.com → ← 93.184.216.34 Translates names ↔ IPs Port 53 | UDP/TCP Decentralized DHCP New Device DHCP Server Need IP → ← IP: 192.168.1.50 Assigns IP automatically Port 67/68 | UDP only Centralized

Difference between DNS and DHCP

Feature DNS DHCP
Full Form Domain Name System Dynamic Host Configuration Protocol
Purpose Translates domain names to IP addresses Assigns IP addresses to devices automatically
Port 53 67 (server), 68 (client)
Protocol UDP and TCP UDP only
Architecture Decentralized (distributed servers) Centralized (single server per network)
Function Name resolution (name ↔ IP) Network configuration (IP, mask, gateway)

Conclusion

DNS resolves human-readable domain names into IP addresses so that browsers and applications can locate servers on the Internet. DHCP automatically assigns IP addresses and network settings to devices when they join a network. Together, they form the backbone of network connectivity − DHCP gives devices their address, and DNS helps them find other devices by name.

Updated on: 2026-03-14T09:33:56+05:30

13K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements