CS331 · Chapter 10 · Annotated SlidesApplication Layer: DNS
Original
Overview

Application Layer: DNS

The Domain Name System: why names, the hierarchical name space and its labels, domains, FQDN vs. PQDN, name servers (root, primary, secondary, zone transfer, caching), and recursive vs. iterative resolution, traced step by step for lab.CS.PSU.EDU.SA looking up sales.mcgraw.com. Rebuilt from the highlighted copy of the deck until a clean one is uploaded.

How to read this page

Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.

All 21 slides
  1. 1 Application Layer
  2. 2 Domain Name System
  3. 3 Name Space
  4. 4 Table 10.12 Generic domain labels
  5. 5 The DNS Name Space
  6. 6 Domains (Figure 10.38)
  7. 7 Domain names and labels
  8. 8 FQDN and PQDN
  9. 9 Distribution of Name Spaces
  10. 10 Hierarchy of name servers
  11. 11 Note: primary and secondary servers
  12. 12 Root servers
  13. 13 DNS Caching
  14. 14 Purpose of DNS
  15. 15 Name resolution
  16. 16 Recursive resolution: example
  17. 17 1- Recursive resolution – Example (cont’d.)
  18. 18 2- Iterative resolution (mapping)
  19. 19 Iterative resolution: example
  20. 20 2- Iterative resolution – Example (cont’d.)
  21. 21 Note: DNS ports
Slide 1 / 21

Application Layer

Slide 1: Application Layer

Notes

  1. Why DNS → name space and labels → domains, FQDN/PQDN → name servers → recursive vs. iterative resolution.

Slide 2 / 21

Domain Name System

Slide 2: Domain Name System

Notes

  1. Seen again Ch 7, slide 62: Every host is configured with a DNS server address

Exam angle

PredictionQ1

Mapping a host name to its IP address is called:

PredictionQ2

DNS is a client-server application.

Slide 3 / 21

Name Space

Slide 3: Name Space

Notes

  1. Siblings must have different labels → every full name is unique.

Exam angle

PredictionQ1

Children of the same node in the DNS tree must:

Slide 4 / 21

Table 10.12 Generic domain labels

Slide 4: Table 10.12 Generic domain labels

Notes

  1. Generic top-level domains; country domains (sa, us, jp…) are the other kind.

Exam angle

PredictionQ1

The generic label for nonprofit organizations is:

Slide 5 / 21

The DNS Name Space

Slide 5: The DNS Name Space

Notes

  1. Domain = a subtree under ONE administrative authority. Leaves have no subdomains (a host or a whole company).

Slide 6 / 21

Domains (Figure 10.38)

Slide 6: Domains (Figure 10.38)
Slide 7 / 21

Domain names and labels

Slide 7: Domain names and labels

Notes

  1. Read from the leaf UP: aComputer → bDept → topUniversity → edu → root (the final dot).

Exam angle

PredictionQ1

In the name sales.mcgraw.com., the top-level domain is:

Slide 8 / 21

FQDN and PQDN

Slide 8: FQDN and PQDN

Notes

  1. FQDN = complete, ends with a dot, can be resolved. PQDN = partial; the resolver adds the local suffix.

  2. Memory trick Fully qualified = goes all the way to the root (the final dot).

Exam angle

PredictionQ1

Which name can be mapped directly to an IP address?

PredictionQ2

A PQDN is completed by the resolver on the client.

Slide 9 / 21

Distribution of Name Spaces

Slide 9: Distribution of Name Spaces

Notes

  1. One central DNS server would be overloaded, a single point of failure, and hard to maintain.

Exam angle

PredictionQ1

Why isn’t the DNS database stored on one central server?

Compare with the model answer

It would get heavy traffic from all over the world, its failure would make every name unavailable, and it would be hard to maintain. DNS is a distributed, hierarchical database spread over many name servers.

Slide 10 / 21

Hierarchy of name servers

Slide 10: Hierarchy of name servers
Slide 11 / 21

Note: primary and secondary servers

Slide 11: Note: primary and secondary servers

Notes

  1. Primary: loads its data from its own disk file. Secondary: copies it from the primary → zone transfer.

Exam angle

PredictionQ1

A secondary DNS server downloading data from the primary is called:

Slide 12 / 21

Root servers

Slide 12: Root servers

Exam angle

PredictionQ1

How many root servers are there in the slides?

Slide 13 / 21

DNS Caching

Slide 13: DNS Caching

Notes

  1. Caching: servers remember recent answers so the next lookup skips the search.

Slide 14 / 21

Purpose of DNS

Slide 14: Purpose of DNS

Notes

  1. App gives the name to the DNS client (resolver) → query → response → IP address back to the app.

Slide 15 / 21

Name resolution

Slide 15: Name resolution

Notes

  1. Recursive: each server that doesn’t know asks the NEXT server itself, and the answer travels back down the same chain.

Slide 16 / 21

Recursive resolution: example

Slide 16: Recursive resolution: example

Notes

  1. 1–4: the query is passed along from server to server. 5–8: the answer comes back along the same chain.

Slide 17 / 21

1- Recursive resolution – Example (cont’d.)

Slide 17: 1- Recursive resolution – Example (cont’d.)

Notes

  1. Each server in the chain asks the next one on the host’s behalf.

Exam angle

PredictionQ1

In RECURSIVE resolution for sales.mcgraw.com from lab.CS.PSU.EDU.SA, who contacts DNS.com?

Compare with the model answer

The root name server. In recursive resolution the local server asks the root, the root asks DNS.com, and DNS.com asks DNS.McGraw.com; the answer then flows back through each of them to the host.

Slide 18 / 21

2- Iterative resolution (mapping)

Slide 18: 2- Iterative resolution (mapping)

Notes

  1. Iterative: a server that doesn’t know REPLIES with the address of the next server, and the LOCAL server does all the asking itself.

  2. Memory trick Recursive = “I’ll find out for you.” Iterative = “Ask him instead.”

  3. Trap In iterative resolution the root never contacts DNS.com; it only tells the local server where DNS.com is.

Exam angle

PredictionQ1

In iterative resolution, the root server answers the local server with:

PredictionQ2

Compare recursive and iterative DNS resolution.

Compare with the model answer

Recursive: each server that lacks the answer queries the next server itself, and the answer is passed back along the same chain. Iterative: a server that lacks the answer replies with the address of the next server to ask, and the local name server sends each query itself until it gets the mapping, then answers the host.

Slide 19 / 21

Iterative resolution: example

Slide 19: Iterative resolution: example

Notes

  1. All the arrows start or end at the LOCAL server DNS.PSU.EDU.SA.

Slide 20 / 21

2- Iterative resolution – Example (cont’d.)

Slide 20: 2- Iterative resolution – Example (cont’d.)

Notes

  1. Count: the local server sends three queries (root, DNS.com, DNS.McGraw.com).

Exam angle

PredictionQ1

In the iterative example, which server sends the query to DNS.McGraw.com?

Slide 21 / 21

Note: DNS ports

Slide 21: Note: DNS ports

Notes

  1. DNS uses UDP or TCP on well-known port 53 (UDP for normal queries).

  2. Seen again Ch 9, slide 46: Why DNS fits UDP

Exam angle

PredictionQ1

DNS uses well-known port: