mirror of
https://github.com/linkedin/school-of-sre
synced 2026-01-21 07:58:03 +00:00
Deployed 19817c8 with MkDocs version: 1.2.3
This commit is contained in:
@@ -2140,19 +2140,21 @@ dig linkedin.com
|
|||||||
..)........
|
..)........
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>The packet capture shows a request is made to 172.23.195.101:53 (this is the resolver in /etc/resolv.conf) for linkedin.com and a response is received from 172.23.195.101 with the IP address of linkedin.com 108.174.10.10</p>
|
<p>The packet capture shows a request is made to 172.23.195.101:53 (this is the resolver in /etc/resolv.conf) for linkedin.com and a response is received from 172.23.195.101 with the IP address of linkedin.com 108.174.10.10</p>
|
||||||
<p>Now let's try to understand how DNS resolver tries to find the IP address of linkedin.com. DNS resolver first looks at its cache. Since many devices in the network can query for the domain name linkedin.com, the name resolution result may already exist in the cache. If there is a cache miss, it starts the DNS resolution process. The DNS server breaks “linkedin.com” to “.”, “com.” and “linkedin.com.” and starts DNS resolution from “.”. The “.” is called root domain and those IPs are known to the DNS resolver software. DNS resolver queries the root domain Nameservers to find the right nameservers which could respond regarding details for "com.". The address of the authoritative nameserver of “com.” is returned. Now the DNS resolution service contacts the authoritative nameserver for “com.” to fetch the authoritative nameserver for “linkedin.com”. Once an authoritative nameserver of “linkedin.com” is known, the resolver contacts Linkedin’s nameserver to provide the IP address of “linkedin.com”. This whole process can be visualized by running </p>
|
<p>Now let's try to understand how DNS resolver tries to find the IP address of linkedin.com. DNS resolver first looks at its cache. Since many devices in the network can query for the domain name linkedin.com, the name resolution result may already exist in the cache. If there is a cache miss, it starts the DNS resolution process. The DNS server breaks “linkedin.com” to “.”, “com.” and “linkedin.com.” and starts DNS resolution from “.”. The “.” is called root domain and those IPs are known to the DNS resolver software. DNS resolver queries the root domain nameservers to find the right top-level domain (TLD) nameservers which could respond regarding details for "com.". The address of the TLD nameserver of “com.” is returned. Now the DNS resolution service contacts the TLD nameserver for “com.” to fetch the authoritative nameserver for “linkedin.com”. Once an authoritative nameserver of “linkedin.com” is known, the resolver contacts Linkedin’s nameserver to provide the IP address of “linkedin.com”. This whole process can be visualized by running the following -</p>
|
||||||
<pre><code class="language-bash">dig +trace linkedin.com
|
<pre><code class="language-bash">dig +trace linkedin.com
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<pre><code class="language-bash">linkedin.com. 3600 IN A 108.174.10.10
|
<pre><code class="language-bash">linkedin.com. 3600 IN A 108.174.10.10
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>This DNS response has 5 fields where the first field is the request and the last field is the response. The second field is the Time to Live which says how long the DNS response is valid in seconds. In this case this mapping of linkedin.com is valid for 1 hour. This is how the resolvers and application(browser) maintain their cache. Any request for linkedin.com beyond 1 hour will be treated as a cache miss as the mapping has expired its TTL and the whole process has to be redone.
|
<p>This DNS response has 5 fields where the first field is the request and the last field is the response. The second field is the Time to Live which says how long the DNS response is valid in seconds. In this case this mapping of linkedin.com is valid for 1 hour. This is how the resolvers and application(browser) maintain their cache. Any request for linkedin.com beyond 1 hour will be treated as a cache miss as the mapping has expired its TTL and the whole process has to be redone.
|
||||||
The 4th field says the type of DNS response/request. Some of the various DNS query types are
|
The 4th field says the type of DNS response/request. Some of the various DNS query types are
|
||||||
A, AAAA, NS, TXT, PTR, MX and CNAME.
|
A, AAAA, NS, TXT, PTR, MX and CNAME.</p>
|
||||||
- A record returns IPV4 address of the domain name
|
<ul>
|
||||||
- AAAA record returns the IPV6 address of the domain Name
|
<li>A record returns IPV4 address of the domain name</li>
|
||||||
- NS record returns the authoritative nameserver for the domain name
|
<li>AAAA record returns the IPV6 address of the domain Name</li>
|
||||||
- CNAME records are aliases to the domain names. Some domains point to other domain names and resolving the latter domain name gives an IP which is used as an IP for the former domain name as well. Example www.linkedin.com’s IP address is the same as 2-01-2c3e-005a.cdx.cedexis.net.
|
<li>NS record returns the authoritative nameserver for the domain name</li>
|
||||||
- For the brevity we are not discussing other DNS record types, the RFC of each of these records are available <a href="https://en.wikipedia.org/wiki/List_of_DNS_record_types">here</a>.</p>
|
<li>CNAME records are aliases to the domain names. Some domains point to other domain names and resolving the latter domain name gives an IP which is used as an IP for the former domain name as well. Example www.linkedin.com’s IP address is the same as 2-01-2c3e-005a.cdx.cedexis.net.</li>
|
||||||
|
<li>For the brevity we are not discussing other DNS record types, the RFC of each of these records are available <a href="https://en.wikipedia.org/wiki/List_of_DNS_record_types">here</a>.</li>
|
||||||
|
</ul>
|
||||||
<pre><code class="language-bash">dig A linkedin.com +short
|
<pre><code class="language-bash">dig A linkedin.com +short
|
||||||
108.174.10.10
|
108.174.10.10
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
Reference in New Issue
Block a user