MOD 2 - Application Layer Flashcards

1
Q

What is DNS and what service does it provide?

A

DNS = domain name system

provides service of translating human-readable domain names (ex: www.cnn.com) to numerical IP addresses

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

What are the 3 types of DNS servers?

A

Root
Top-level domain
Authoritative

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

Iterative vs recursive DNS query?

A

Iterative = client/host will ask a DNS server if they have the needed information, if so, they will return back the information. If not, the DNS server will return a referral to another DNS server that might have the information
“I don’t know this name, but ask this server”

Recursive = client/host will ask a DNS server if they have the needed information, and the DNS server will query every DNS server until they find the information
“Loop through all and return when found”

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

What are the DNS ressource records?

A

Resource Records (RR) – name, value, type, ttl

Type = A
name = hostname, value = IP address
These records map domain names to IP addresses.

Type = NS
name = domain (e.g., foo.com), value = hostname of authoritative name server for this domain
These NS records indicate that your DNS server, is responsible for handling DNS queries for your domain.

Type = CNAME
name = alias name for some “canonical” (the real) name, value = canonical name

Type = MX
name = hostname, value = name of mailserver associated with name
These records specify the mail servers responsible for receiving email messages for your domain

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

What does TTL mean in DNS RR? what does TTL mean in packet IP header?

A

TTL = time to live

In DNS resource record:
“TTL” specifies the amount of time (in seconds) DNS servers and applications are allowed to cache the record

In a packet IP header:
TTL specifies the maximum routers the packet could pass through. (each router will decrement this by 1, packet dropped at 0)

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

What is the min distribution time formula for client-server and peer to peer?

A

Dc-s = max{NF/us , F/dmin}

Dp2p = max{F/us , F/dmin, NF/us + sumofall(ui)}

c-s = client server
N = number of peers
F = file size
dmin = download rate

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

Define non-persistent, persistent, parallel and pipeline HTTP connections.

A

non-persistent = at most one object
sent over TCP
connection

persistent = multiple objects can
be sent over single
TCP connection
between client, server

*parallel = 2 at a time?

*pipeline = all objects can be sent in the time it takes to send 1 object

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

What are the 2 types of http messages?

A

request , response

request consists of:
- request (GET, POST, HEAD, PUT commands)
- header
- body

response consists of:
- status line [protocol version (http/1.0 or 1.1), status code (200, 300,..), status message(OK, Not found, ..)]
- header
- body

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

can a http response message have an empty body?

A

yes

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

what does the command dig cnn.com do?

A

dig returns the query time for finding cnn.com. If the query time is 0, this indicates that cnn.com was cached, thus accessed recently.

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

How do you keep a cache up to date with HTTP request “if-modified since”/conditional GET?

A
  • HTTP request msg “If-modified-since: <date>" determines if a resource has been modified since the requested date</date>
  • if it has not been modified, the HTTP response will be “304 NOT MODIFIED”, meaning the cached copy is up to date
  • if it has been modified, the HTTP response will be “HTTP/1.0 200 OK <data>"</data>

This helps reduce server load and improve efficiency, by avoiding unneeded downloads

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

What is POP3?

A

post office protocol 3

messages are downloaded from the server to the client, and by default, messages are removed from the server after being downloaded

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

What is CDN (content distribution network)?

A

CDN = stores copies of the content file in multiple data centers or edge locations worldwide. These edge locations are strategically distributed to reduce latency and deliver content more efficiently.

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