DNS Flashcards

1
Q

If you parse a URL what are the different parts?

A

Schema: The shcme is the first part of the url and indicates the protocol. Ex: http, https.

Authority: includes domain name and optional port number. Ex: www.example.com

Path: The hierarchical structure of the resource’s location on the server. Ex: “/state/city.html”

Query: An optiona part of the url and contains additional information that the server can use. Ex: ?query=URL+parsing

Fragment Identifier: Direct the browser to a specific section or anchor within the resource. Ex: #section2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the motivation for DNS

A

It is hard to remember the exact IP of a website and it might change over time. A DNS therefore allows us to use familiar names instead of numerical ip addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Goals of DNS

A

Scalabillity:
One of the primary goals of DNS is to handle a massive number of domain name records.

Distributed Control:
DNS was designed with a distributed control model. This means that the control over domain names and their associated records is delegated to the respective domain owners and administrators

Fault tolerance:
The failure of a single server should not affect the whole system

Minimized Lookup Failures:
DNS aims to minimize the likelihood of lookup failures, even in the presence of various network problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain the concept of aggressive caching within the DNS

A

Given the read-mostly nature and the loose consistency of DNS. When the DNS resolves queries for a hostname-to-IP mapping the resolver caches the result. A cached lookup has a TTL before the cached memory is removed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does DNS stand for?

A

Domain name system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a zone in the DNS?

A

Each zone represents a portion of the domain namespace, and these zones are separately administered to allow for effective management and delegation of responsibilities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the DNS architecture?

A

hierarchical and distributed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a recursive query?

A

When an application or client initiates a recursive query, it means the querying system expects a complete and final answer. This type of query is typically made to a local DNS server, often provided by the user’s ISP (Internet Service Provider), or a public DNS resolver like Google’s 8.8.8.8. The local DNS server takes on the responsibility of resolving the query by interacting with other DNS servers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a non-recursive-query?

A

These queries are used by DNS servers to gather information from other DNS servers. When a local DNS server receives a recursive query from a client, it may need to contact multiple other DNS servers to find the IP address associated with the requested domain name. It does so using a series of non-recursive queries to authoritative DNS servers, which are responsible for the specific domain in question.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does the DNS architecture operate?

A

An application initiates a recursive query to the local DNS server (1).

The local DNS server, acting as a resolver, queries the root DNS server for information about the requested domain (2). This query is typically non-recursive because the root server provides referrals to other DNS servers.

The root DNS server responds to the local server with a referral to the appropriate top-level domain (TLD) server responsible for the requested domain (3).

The local DNS server queries the TLD server for information about the domain (4). Again, this query is non-recursive, as the TLD server may provide referrals to authoritative DNS servers for the domain.

The TLD server responds to the local server with a referral to the authoritative DNS server for the domain (5).

The local DNS server finally queries the authoritative DNS server for the IP address of the domain (6). The authoritative server provides the IP address (A record) in its response.

The local DNS server caches the IP address and returns it to the client application (7). Subsequent queries for the same domain can be answered directly from the cache, reducing the need for further recursive queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the DNS protocol

A

TCP / UDP Port: 53
Mos trafic uses UDP
Retries with TCP if UDP failes or the request is bigger than 512 bytes

Has a query bit that indicates with the querie is recursive or not

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a RR

A

Resource Record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the information represented in a RR

A

Name - domain name
TTL - time to live in seconds
Class - DNS class
Type - type of record
rdata - data depending on the type of record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the most important DNS RR types?

A

A - Internet address
NS - name server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What IP protocol is most used for DNS traffic?

A

UDP (User Datagram Protocol)
Low overhead, efficient for quick and lightweight queries. The UDP protocol has a maximum message size of 512 bytes, which includes the DNS header and the data payload. This limit ensures that DNS queries and responses can be transmitted in a single UDP packet.

However, if the DNS query or response exceeds 512-byte limit of UDP it resorts to using TCP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does the local name server know root servers?

A

The local name server knows root servers through a pre-configured list known as the “root hints” file.

The “root hints” file provides the addresses of the root domain name system (DNS) servers, which are the starting points for DNS resolution of domain names.

Periodically, this file may be updated to ensure that the local name server has the most current addresses of the root servers.

17
Q

What is a glue record?

A

A glue record is a DNS record that provides the IP address for a name server associated with a domain.

18
Q

What is the purpose of a glue record?

A

The purpose of a glue record is to prevent circular dependencies in DNS resolution by providing the IP address of a name server directly at the parent domain level, especially crucial when the domain name of the name server (e.g., ns.example.com) is a subdomain of the domain it is responsible for (e.g., example.com). This ensures that the domain can be resolved without getting caught in a loop where you’d need to know the address of the name server before you can resolve the name server’s own address.

19
Q
A