Ref: https://learn.cantrill.io/courses/2022818/lectures/45637092
YouTube: https://www.youtube.com/watch?v=xf01fJQsagQ
DNS flow when typing “www.netflix.com” in your browser

- Your machine checks your local cache and your Hosts file
- If valid* IP address for
www.netflix.com
is stored inside → browser queries the IP address (overrides any DNS request)
- If valid* IP address not found, go to 2.
- Query DNS Resolver
- 🔧 DNS Resolver = Server that sends DNS requests (maybe your router or your ISP)
- Resolver checks its local cache
- If valid* IP address for
www.netflix.com
is stored inside → return IP address to client
- If valid* IP address not found, go to 4.
- We start to walk the DNS tree: Resolver queries Root Zone, asking for IP address of
www.netflix.com
- ❗ IP addresses of Root Zone are hard-coded in every DNS Resolver
- 💡 OS vendors maintain the IP addresses of the Root Zone in their resolvers
- Root Zone doesn't have that IP address, but returns IP address for
.com
NS to resolver
- Resolver queries
.com
TLD's NS for IP address of www.netflix.com
.com
TLD doesn't have that IP address, but returns IP address for netflix.com
NS to resolver
- Resolver queries
netflix.com
NS for IP address of www.netflix.com
netflix.com
NS returns IP address for www.netflix.com
to resolver (🎉 finally!!)
- Resolver caches the result locally
- Resolver returns IP address for
www.netflix.com
to client
- Client caches the result locally
- Client's browser queries the IP address for
www.netflix.com