topics/dns/README.md
DNS (Domain Name Systems) is a protocol used for converting domain names into IP addresses.
computer networking (at layer 3 of the OSP model) is done with IP addresses but for as humans it's hard to remember IP addresses, it's much easier to remember names. This why we need something such as DNS to convert any domain name we type into an IP address. You can think on DNS as a huge phonebook or database where each corresponding name has an IP. </b></details>
<details> <summary>What is DNS resolution?</summary> <b>The process of translating IP addresses to domain names. </b></details>
<details> <summary>What is a name server?</summary> <b>A server which is responsible for resolving DNS queries. </b></details>
<details> <summary>What is the resolution sequence of: www.site.com</summary> <b>It's resolved in this order:
Cloudflare: "A domain name registrar provides domain name registrations to the general public. A common misconception is that registrars sell domain names; these domain names are actually owned by registries and can only be leased by users." </b></details>
<details> <summary>Given the following fqdn, <code>www.blipblop.com</code>, what is the root?</summary> <b>. is the root
</b></details>
.com. is the top level domain
</b></details>
blipblop.com. is the second level domain
</b></details>
www.blipblop.com. is the domain
</b></details>
In general the process is as follows:
A mapping between domain name and an IP address. </b></details>
<details> <summary>What types of DNS records are there?</summary> <b>A more detailed list, can be found here </b></details>
<details> <summary>What is a A record?</summary> <b>A (Address): Maps a host name to an IPv4 address.
When a computer has multiple adapter cards and IP addresses, it should have multiple address records. </b></details>
<details> <summary>What is a AAAA record?</summary> <b>An AAAA Record performs the same function as an A Record, but for an IPv6 Address. </b></details>
<details> <summary>What is a CNAME record?</summary> <b>CNAME: maps a hostname to another hostname.
The target should be a domain name which must have an A or AAAA record. Think of it as an alias record. </b></details>
<details> <summary>What is a PTR record?</summary> <b>While an A record points a domain name to an IP address, a PTR record does the opposite and resolves the IP address to a domain name. </b></details>
<details> <summary>What is a MX record?</summary> <b>MX (Mail Exchange) Specifies a mail exchange server for the domain, which allows mail to be delivered to the correct mail servers in the domain. </b></details>
<details> <summary>What is a NS record?</summary> <b>NS: name servers that can respond to DNS queries </b></details>
varonis.com: "DNS TTL (time to live) is a setting that tells the DNS resolver how long to cache a query before requesting a new one. The information gathered is then stored in the cache of the recursive or local resolver for the TTL before it reaches back out to collect new, updated details." </b></details>
DNS uses UDP port 53 for resolving queries either regular or reverse. DNS uses TCP for zone transfer. </b></details>
<details> <summary>True or False? DNS can be used for load balancing</summary> <b>True. </b></details>
<details> <summary>Which techniques a DNS can use for load balancing?</summary> <b> There are several techniques that a DNS can use for load balancing, including:Round-robin DNS
Weighted round-robin DNS
Least connections
GeoDNS </b></details>
Primary zone: A primary zone is a read/write zone that is stored in a master DNS server.
Secondary zone: A secondary zone is a read-only copy of a primary zone that is stored in a slave DNS server.
Stub zone: A stub zone is a type of zone that contains only the essential information about a domain name. It is used to reduce the amount of DNS traffic and improve the efficiency of the DNS resolution process. </b></details>