Domain Resolution with DNS

Ch. 9 of 1015 mins4 Tasks

Connect the logical network to human-friendly applications. Discover how DNS resolves human names to IP addresses, and how HTTP serves web applications.

Track Series

Chapters in this Track (Ch. 9 of 10)

9Domain Resolution with DNS
15m

Up to this point in your networking journey, every connection has required memorizing and typing numerical IP addresses like 192.168.1.10 or 203.0.113.1. While computers are mathematically optimized to parse 32-bit binary integers, human beings are terrible at remembering long lists of numbers. You do not tell a colleague to "email me at user@142.250.190.46" or "read our intranet wiki at 192.168.1.100"; you say google.com or portal.corp.

To bridge the gap between human language and binary routing, computer networks rely on the global phonebook of the Internet: the Domain Name System (DNS).

The Two-Step Web Journey

When you type a web URL like http://portal.corp into a browser address bar and press Enter, your computer cannot immediately send a web request. The Ethernet card and IP stack have no idea how to deliver a packet to the word "portal". Before a single byte of web content can be requested, a two-stage transaction takes place:

  1. Stage 1: Name Resolution (UDP Port 53): The computer drafts a small DNS query packet asking: "What is the IPv4 address for portal.corp?" It dispatches this query to its configured DNS Server (e.g., 192.168.1.53) over UDP Port 53. The DNS server consults its database of Resource Records, finds that portal.corp maps to 192.168.1.100, and returns the answer.
  2. Stage 2: Application Data Transfer (TCP Port 80): Now that the browser knows the numerical destination (192.168.1.100), it establishes a TCP three-way handshake with the target Web Server on HTTP Port 80 and sends an HTTP GET / request. The web server reads the requested HTML document from its storage and streams the web page back to your screen.

If Stage 1 fails because the DNS server address is misconfigured or the domain name is misspelled, Stage 2 can never begin. Your browser will instantly display a DNS_PROBE_FINISHED_NXDOMAIN error before a single packet ever reaches the web server. That is why network administrators always verify name resolution using nslookup before assuming a web server is offline.

Layer Dimension DNS Service (BIND9) Web Service (HTTP Daemon)
Default Transport Port UDP Port 53 (Fast, lightweight queries) TCP Port 80 (Reliable, ordered web stream)
Core Database / Content Resource Records (A, CNAME, MX) HTML, CSS, JavaScript, and Media files
Client Application OS Resolver, nslookup, dig Web Browser (Chrome/Firefox), curl
Failure Symptom "DNS_PROBE_FINISHED_NXDOMAIN" "HTTP 404 Not Found" or "Connection Refused"

Core DNS Resource Record Types

A DNS server organizes host mappings using standardized Resource Records (RRs):

  • A-Record (Address Record): The foundational mapping linking a Fully Qualified Domain Name (FQDN) directly to a 32-bit IPv4 address (e.g., portal.corp → 192.168.1.100).
  • CNAME (Canonical Name): An alias that points one name to another name (e.g., www.portal.corp → portal.corp). This allows multiple hostnames to share a single server without duplicating IP addresses.
Why DNS Uses UDP Instead of TCP

DNS queries are tiny: usually under 100 bytes. If DNS required a full TCP connection (SYN, SYN-ACK, ACK, Query, Reply, FIN, ACK), loading a single web page with twenty embedded images and analytics scripts would introduce massive latency. Using stateless UDP allows queries and replies to resolve in a single round-trip transmission.

Field Story: The Stale DNS Cache

One of the most frequent support questions in office networks is: "We migrated the company wiki to a new IP address this morning, but half the staff still sees the old error page!"

This happens because client operating systems and web browsers remember DNS replies in a local cache according to a parameter called the TTL (Time to Live). If the TTL was set to 24 hours, client laptops will keep trying the old server IP for a full day. Running ipconfig /flushdns on Windows or restarting the browser cache forces the computer to ask the DNS server for the fresh IP immediately.

The Bridge to the Capstone Network

You have now mastered all nine foundational building blocks of computer networking: physical cabling, IPv4 subnets, ping reachability, MAC address resolution, Layer 2 star switches, automated DHCP leases, default gateway routers, SOHO NAT translation, and DNS name resolution.

In our final chapter, you will assemble all of these pieces into a complete, professional corporate office network from scratch. You will connect workstations, configure gateways, run network services, and verify full end-to-end communication across the entire campus.

Hands-On Practice Checklist

Progress:0 / 4

Perform actions on the practice lab canvas on the right. Tasks automatically check off as you connect cables and run commands.

Task 1: Inspect DNS Server Resource Records

Click Local DNS Server on the canvas, switch to the Services tab, select DNS, and confirm that an A-Record exists mapping "portal.corp" to IP 192.168.1.100.

Task 2: Configure PC-1 DNS Resolver

Click Workstation PC-1, navigate to the Config tab, enter 192.168.1.53 in the "DNS Server" field, and click "Save Configuration".

Task 3: Verify Name Resolution with nslookup

Open PC-1 Terminal and run "nslookup portal.corp" to query the DNS server and confirm it returns IP address 192.168.1.100.

Task 4: Access Corporate Portal via Web Browser

On PC-1, click the Desktop tab, open the Web Browser app, enter "http://portal.corp" in the URL bar, and click Go to load the corporate homepage.