Skip to content
FALCON CORETECHNOLOGIES

// Lesson 35 of 49 · IP services

DNS

How names are resolved, common record types, and using DNS on clients and IOS devices.
2 min read#dns

People use names; packets use addresses. DNS translates between them. When "the internet is down" but pinging an IP address works, the problem is almost always DNS.

How a lookup works

  1. The client asks its configured DNS server (the recursive resolver) for www.example.com.
  2. If the resolver has no cached answer, it asks a root server, which refers it to the .com servers, which refer it to example.com's authoritative servers.
  3. The authoritative server answers; the resolver caches the answer for the record's TTL and returns it to the client.

DNS uses UDP port 53 for normal queries and TCP 53 for large responses and zone transfers.

Record types

Record Purpose
A Name → IPv4 address
AAAA Name → IPv6 address
CNAME Alias → another name
MX Mail servers for a domain
PTR Address → name (reverse lookup)
NS Authoritative name servers
TXT Text, e.g. SPF and verification records

Testing from clients

C:\> nslookup www.example.com
C:\> nslookup www.example.com 8.8.8.8      ! ask a specific server
C:\> ipconfig /displaydns
C:\> ipconfig /flushdns
$ dig www.example.com AAAA

Comparing answers from two servers quickly shows whether your internal DNS is the problem.

DNS on IOS

R1(config)# ip domain-lookup
R1(config)# ip name-server 192.168.1.10
R1(config)# ip domain-name corp.example
R1# ping www.example.com

On lab devices you normally disable lookups (no ip domain-lookup) so typos are not treated as hostnames. A router can also act as a simple DNS server (ip dns server with ip host entries).

Key points

  • DNS resolves names to addresses (A, AAAA) and more (MX, CNAME, PTR).
  • UDP 53 for queries, TCP 53 for large answers and zone transfers.
  • nslookup / dig to test; flush caches when records change.
  • IP works but names do not → think DNS first.

Sign in to save your lesson progress across devices. You can read every published lesson without an account.