FoundationLesson 1 of 3 in Network EssentialsFree preview

DNS Records

DNS turns names into the data clients need. The records you will touch as a DevOps engineer:

TypePoints toExample use
AIPv4 addressapi.shop.com → 203.0.113.10
AAAAIPv6 addresssame, for IPv6
CNAMEanother name (alias)www → shop-lb.cloudprovider.net
MXmail servers, with prioritywhere email for the domain goes
TXTfree textdomain verification, SPF, DKIM
NSthe zone's name serversdelegating a domain or subdomain
PTRname for an IP (reverse DNS)mail server reputation, logs

Every record has a TTL in seconds: how long resolvers may cache it. A resolver that cached a record with TTL 3600 can keep answering with it for up to an hour after you change it. Before a migration, lower the TTL a day ahead (say to 60), switch, then raise it again.

CNAME traps:

  • A name with a CNAME cannot have any other record. The zone apex (shop.com itself) must have NS and SOA records, so it cannot be a CNAME. Providers offer ALIAS/ANAME or "flattening" for that.
  • A CNAME adds a lookup step: the resolver follows it to the target's A record.
;; ANSWER SECTION:
www.shop.com.        300  IN  CNAME  shop-lb.cloud.example.
shop-lb.cloud.example. 60 IN  A      203.0.113.10

In interviews: "You updated a DNS record and some users still hit the old server. Why?" Caching until the old TTL expires.

Practice

Solve 3 of 4 to complete this lesson.

0/4 solved

Solve 3 more to complete this lesson, or move on and come back later.

Skip to next: Ports and Protocols