DNS translates human‑friendly hostnames into IP addresses (and vice versa), ensuring seamless communication over IP networks. It operates at the Application Layer (OSI Layer 7) and uses UDP 53 by default, falling back to TCP 53 for larger responses or zone transfers.
https://www.youtube.com/watch?v=HnUDtycXSNE
Each record consists of: Name, Type, Data, and TTL (Time to Live).
example.com. IN A 192.0.2.1example.com. IN AAAA 2001:db8:85a3::8a2e:370:7334www.example.com. IN CNAME example.com.<name> IN MX <preference> <mail-server>example.com. IN MX 10 mail.example.com.example.com. IN NS ns1.example.com.1.2.0.192.in‑addr.arpa. IN PTR example.com.Purpose: Zone metadata and zone‑transfer parameters.
Fields: Primary NS, admin email, serial, refresh, retry, expire, minimum TTL.
Example:
example.com. IN SOA ns1.example.com. hostmaster.example.com. (
2025052201 ; serial
3600 ; refresh
900 ; retry
1209600 ; expire
3600 ; minimum TTL
)
Record stores administrative information about a DNS zone
Used for metadata and verification (e.g., SPF, DKIM, DMARC).
"v=spf1 include:_spf.example.com ~all"
"v=DKIM1; k=rsa; p=PUBLIC_KEY"
"v=DMARC1; p=reject; rua=mailto:[email protected]"