Member-only story

What is dns and how it works?

Aditya
3 min readMay 7, 2020

What is DNS ?

Computers talk to each other using IP addresses. Since humans cannot memorize thousands of strings of numbers, we have to use domain names instead of IP addresses.

It is much easier to remember to type sprinkletwinkles.com into your browser than 198.24.170.115.

DNS keeps the record of all domain names and the associated IP addresses. When you type in a URL in your browser, DNS resolves the domain name into an IP address.

DNS cache exists in our browser, computer(which we flush by firing commands ipconfig/flushdns et.c), router e.t.c

How does it work?

Step 1 — Resolve a Domain Name

When you type sprinkletwinkles.com into a browser, in order to load the webpage, your computer asks for the IP address. Computers/mobile/routers do not know in advance where they can find the necessary information, so they try searching through the DNS cache and any available external source.

Step 2 — Search IP Locally

Before going externally, your computer/mobile/router loads the local DNS cache database to see if you already requested the IP for that domain name. Every computer/mobile/router has a temporary cache with the most recent DNS…

Create an account to read the full story.

Or, continue in mobile web

Already have an account? Sign in

Aditya
Aditya

Written by Aditya

Principal data engineer → Distributed Threat hunting security platform | aws certified solutions architect | gssp-java | Chicago-IL

No responses yet

Write a response