2.4 DNS Flashcards

1
Q

On what layer does DNS operate?

A

DNS is an application-layer protocol service built on top of TCP/UDP

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

What does DNS do and how?

A

provides translation between IP addresses and domain names

hosts & DNS servers communicate to resolve names (address/name translation)

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

what are the two identifiers of domains? who uses them?

A

IP address (32-bit) - used for addressing datagrams
domain name (e.g. psu.edu) - used by humans

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

What is DNS? Who implements it?

A

Domain Name System - core internet function that is implemented as an application-layer protocol

implemented by servers that sit at the network edge (rather than by routers and switches INSIDE the network)

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

internet design philosophy

A

keep the core simple; put all the complexity at the network edge

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

DNS’s 4 functions

A
  1. translates hostname to IP address
  2. host aliasing
  3. mail server aliasing
  4. load distribution (balancing) - if a hostname has many IP address, DNS rotates through them so one doesn’t have too much of a load
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why not centralize DNS? (4 reasons)

A

single point of failure

too much traffic

centralized database at 1 location could lead to long delays

it doesn’t scale - doesn’t have the computational abilities or resiliency

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

DNS performance as a database

A

DNS is a huge, distributed database - holds approx. 1 billion records (but each record is very simple)

huge performance/scale - handles multiple trillions of queries/day

reads more queries than it writes

“bulletproof” - reliable, secure

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

why does performance matter to DNS?

A

almost every internet transaction interacts with DNS, so every millisecond counts

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

What is the relationship between DNS and organizations?

A

Hundreds of thousands of organizations are responsible for their own records within this distributed database

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

DNS hierarchy levels

A
  1. Root
  2. Top Level Domain (TLD)
  3. Authoritative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The process of getting the IP address of amazon.com (resolving an address)

A
  1. client asks the root DNS server to get the name of the TLD server
  2. the client asks the TLD server to get amazon.com’s authoritative DNS server
  3. the client asks amazon.com’s authoritative DNS server for the IP address
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are root name servers and why are they important?

A

root name servers = the starting point for DNS resolution (translating hostnames to IP addresses)

internet couldn’t function without them; though they don’t store the actual IP addresses, they direct queries to TLD servers

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

how many root name servers are there? who manages them?

A

13 root name servers in the world, which are replicated many times (200 root name servers in the US, 1,000 in the world)

managed by ICANN (Internet Corporation for Assigned Names & Numbers)

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

what are TLD servers and what do they do?

A

Top-Level Domain DNS servers are responsible for resolving addresses with top-level domains such as:
.com
.org
.edu
.aero
.jobs
.museums
and top-level country domains like .uk, .fr

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

who is responsible for managing TLDs?

A

internet registries

17
Q

what are authoritative DNS servers and what do they do

A

they’re responsible for managing DNS servers within an organization

“authoritative” means that the server has authority over the organization’s names

18
Q

what do local DNS name servers do?

A

when the host makes a DNS query wanting to resolve a name, it sends it to the local DNS server

DNS server responds either:
1. immediately, from its local cache of recent name-to-address translation pairs
2. by forwarding request into DNS hierarchy for resolution

every ISP has a local DNS server

19
Q

what is the ‘iterated query’ method in DNS name resolution?

A

the contacted server replies with the name of the server to contact next

“I don’t know this name, but ask this server”

20
Q

what are the steps of the ‘iterated query’ method in DNS name resolution if engineering.nyu.edu wanted to resolve cs.umass.edu? (8 steps)

A

example: engineering.nyu.edu requests to resolve (wants the IP address of) gaia.cs.umass.edu
1. host queries local nyu DNS server
2. local nyu DNS server forwards message to root DNS server
3. root DNS server responds to local DNS server
4. local DNS server resends message to TLD DNS server
5. TLD DNS server responds to local DNS server
6. local DNS server resends message to auth DNS server
7. auth DNS server responds to local DNS server
8. local DNS server sends IP address to host

21
Q

what is the disadvantage of the iterated query method? how can this be mitigated?

A

disadvantage: it’s a lot of steps, meaning it produces a lot of query traffic

DNS caching can reduce this traffic

22
Q

what is the ‘recursive query’ method in DNS name resolution?

A

rather than responding with a request with “I don’t know, but here’s who to ask”, the name server takes it upon itself to resolve the query

23
Q

what are the steps of the ‘recursive query’ method in DNS name resolution if engineering.nyu.edu wanted to resolve cs.umass.edu? (8 steps)

A
  1. the host queries the local server
  2. the local server queries the root server
  3. the root server queries the TLD server
  4. the TLD server queries the umass authoritative server
  5. the authoritative server replies to the TLD server
  6. the TLD server replies to the root server
  7. the root server replies to the local server
  8. the local server replies to the querying host
24
Q

what is the disadvantage of the recursive query method? how can this be mitigated?

A

disadvantage: heavy load on upper levels

there’s no mitigation, which is why is method isn’t often used

25
Q

what is caching in DNS?

A

because a lot of work is involved in getting the DNS record for a name-to-IP translation pair, we can leverage the work by caching the record locally

once a DNS server learns a mapping, it caches it so, when another request comes in for that mapping, it immediately returns a response to the query

26
Q

what kind of servers are typically cached in local name servers?

A

TLD servers

27
Q

do DNS cache entries timeout?

A

Yes, they disappear after some time (TTL)

28
Q

what are the advantages of DNS caching?

A

improved response time and less load on DNS structure

29
Q

what are the disadvantages of DNS caching?

A

cached entries may be out-of-date if the DNS record changes

e.g. if the named host changes their IP address, it might not be known across the internet until all TTLs expire

however, caching is still the best-effort name-to-address translation

30
Q

DNS official definition

A

distributed database storing resource records (RR)

31
Q

What is the format of resource records (RR)?

A

name, value, type, TTL

32
Q

what are the 4 most common records?

A
  1. type=A (address record)
  2. type=NS (name-server record)
  3. type=CNAME (aliasing)
  4. type=MX (mail server name)
33
Q

what is the type=A record?

A

an address record, used for name-to-address translation

‘name’ is the hostname
‘value’ is the IP address

34
Q

what is the type=NS record?

A

a name-server record (identifies the authoritative DNS server for a domain)

‘name’ is the domain (e.g. psu.edu)
‘value’ is the hostname of the domain’s authoritative name server

35
Q

what is the type=CNAME record?

A

record used for aliasing

‘name’ is an alias name for a real (“canonical”) name
(e.g. www.ibm.com is really servereast.backup2.ibm.com)

‘value’ is the canonical name (www.ibm.com)

36
Q

what is the type=MX record?

A

record used to give the name of the mail server associated with the domain

‘value’ is the name of the SMTP mail server associated with the name

37
Q

What is the difference between DNS query and rely messages?

A

Nothing; they have the same format

38
Q

What makes up the header of DNS protocol messages?

A

identification and flags

identification = 16-bit number for query, response to query uses the same number

flags = query or reply, recursion desired, recursion available, reply is authoritative

39
Q

What does TYPE=NS mean

A

Identifies the authoritative DNS server for a domain