Table of contents
No headings in the article.
πππ ππππππππππ "Mostly about getting an IP for a domain name"
Steps involved in the lookup....
βοΈ A user types 'example.comβ into a web browser.
βοΈ The browser parses the information contained in the URL. This includes the protocol (βhttpsβ), the domain name (βexample.comβ) and the resource (β/β). In this case, there isnβt anything after the β.comβ to indicate a specific resource.Browser tries to find the IP address.
βοΈ Browser cache: The browser caches DNS records for some time. Interestingly, the OS does not tell the browser the time-to-live for each DNS record, and so the browser caches them for a fixed duration (varies between browsers, 2 β 30 minutes).
βοΈ OS cache: If the browser cache does not contain the desired record, the browser makes a system call (getaddrinfo in Linux). The OS has its own cache.
βοΈ Router cache: The request continues on to your router, which typically has its own DNS cache.
βοΈ ISP DNS cache: The next place checked is the cache ISPβs DNS server has.
βοΈ The resolver mostly your ISP then queries a DNS root nameserver (.).
βοΈ The root server then responds to the resolver with the address of a Top Level Domain (TLD) DNS server (such as .com or .net), which stores the information for its domains. When searching for example.com, our request is pointed toward the .com TLD.
βοΈ The resolver then makes a request to the .com TLD.
βοΈ The TLD server then responds with the IP address of the domainβs nameserver, example.com.
βοΈ Lastly, the recursive resolver sends a query to the domainβs nameserver.
βοΈ The IP address(or rather addresses) for example.com is then returned to the resolver from the nameserver. Note : (DNS can return the list of IP addresses for the same domain name. When a web-browser requests a web-site, it will try these IP addresses one-by-one, until it gets a response.)
βοΈ The DNS resolver then responds to the web browser with the IP address of the domain requested initially. The DNS lookup have returned the IP address(or addresses) for example.com, the browser is able to make the request for the web page:
βοΈ The browser makes a HTTP request to the IP address(Choose an IP from the set of Ip's returned).
βοΈ The server at that IP returns the webpage to be rendered in the browser.
Note: DNS servers mostly run on port 53.
Tools to get the IP address from the domain name in your command line...
- nslookup Usage: β nslookup google.com -- Output Server: 192.168.1.1 Address: 192.168.1.1#53
Non-authoritative answer: Name: google.com Address: 142.250.195.46
- dig Usage: β dig facebook.com
Thanks for reading. Please follow for more...