chapter 2 - application layer Flashcards

(60 cards)

1
Q

What does the application layer do?

A

provides services for applications to communicate over the network

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

What are the two main application architectures?

A

Client-server and peer-to-peer (P2P)

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

What is a client-server model?

A

client contacts an server with a fixed IP -> server answers

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

What is peer-to-peer (P2P)?

A

hosts both request and provide services to each other

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

What is a socket?

A

interface between the application layer and the transport layer
like a door to the network

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

How do processes on different hosts communicate?

A

By exchanging messages through sockets

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

What info is needed to identify a process?

A

IP address + port number

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

Common port numbers: HTTP? Mail?

A

HTTP = 80, Mail = 25

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

What does an application-layer protocol define?

A

Message types
syntax
semantics
rules for sending/receiving

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

What are open protocols?

A

communication rules and standards that are public, anyone can use them

like HTTP, SMTP

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

What are common transport needs for apps?

A

reliable

low dealy

Throughput (some need high bandwidt)

Security

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

Key features of TCP?

A

Reliable
flow control
congestion control
connection-oriented

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

Key features of UDP?

A

Unreliable
no flow/congestion control
no setup
faster

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

Does TCP guarantee timing or security?

A

No, only reliable delivery

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

How can TCP be secured?

A

Using TLS (Transport Layer Security)

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

What does TLS do?

A

Encrypts data
authenticates server
ensures data integrity

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

What is HTTP?

A

Web’s application layer protocol -

rules for how client talks to a webserver

TCP on port 80

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

Where is TLS implemented?

A

Application layer

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

What is a web page made of?

A

A base HTML file + referenced objects (images, stylesheets..)

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

Is HTTP stateful or stateless?

A

Stateless

server does not store past request info

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

What are the two types of HTTP connections?

A

Non-persistent and persistent

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

What is non-persistent HTTP?

A

One TCP connection per object

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

What is persistent HTTP?

A

One TCP connection for multiple objects

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

HTTP response time (non-persistent)?

A

2 RTTs + file transmission time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
HTTP response time (persistent)?
1 RTT for all referenced objects
25
What are common HTTP request methods?
GET, POST, HEAD, PUT
26
What does HTTP status code 200, 301, 400, 404mean?
200 - request succeeded 301 - Moved Permanently – the object has moved 400 - Bad Request – request not understood by server 404 - Not Found – the requested object doesn't exist
27
Why are cookies used in HTTP?
fix that server remeber you between requests identfies users, track behavour | fix that http is stateless
28
What are the 4 components of cookies?
Cookie line in HTTP response Cookie line in next HTTP request Cookie file on client Backend database at the server
29
What is the goal of a web cache?
If requests same resource again, it can be sent from the cache, not from original server
30
How does a web cache work?
If object is cached, send it If not, fetch from server, cache it, and return to client
31
What is a conditional GET used for?
To check if the cached object is still valid
32
What’s the goal of HTTP/2?
Reduce delay in handling multiple HTTP requests
33
does does HPPT/2 work
takes several requests at the same time Server push - sends resources before you ask for them binary frames - easier for data to understand
34
What’s the key improvement in HTTP/3?
uses UDP/CUIC instead of TCP faster connection setup no HOL | faster -> combines TCP + TLS handshake in one step
35
What are the 3 main components of email?
User agents, mail servers, and SMTP
36
What is SMTP?
Protocol for sending emails over TCP (port 25)
37
Is SMTP push or pull?
Push – sends mail from client to server
38
How is SMTP different from HTTP?
SMTP pushes messages; HTTP pulls objects
39
What is IMAP?
Internet Mail Access Protocol – allows users to manage email on the server
40
What does DNS do?
Translates hostnames to IP addresses
41
What are the 3 types of DNS servers?
Root servers, TLD servers, Authoritative servers
42
What is a local DNS server?
caches recent lookups - to respond faster
43
What is a DNS record type A?
Maps hostname to IP address
44
What does DNS caching do?
Saves lookups temporarily (controlled by TTL value)
45
Advantages of P2P?
scalability and resource sharing
46
What is Dynamic Adaptive Streaming over HTTP (DASH)?
video quality adapts to your Internet speed in real time
46
What are CBR and VBR video?
CBR: Constant Bit Rate VBR: Variable Bit Rate (adapts to video complexity)
46
What is a Content Delivery Network (CDN)?
caches data at multiple locations near users
47
What’s the difference between “enter deep” and “bring home” CDN strategies?
Enter deep: many small servers deep inside access networks Bring home: larger server clusters in fewer location
48
What must a TCP client do to connect to a server?
Create a socket -> specify IP and port
49
Can one TCP server handle multiple clients?
Yes, each client gets a separate socket
50
What is included in an HTTP request line?
Method, path, and version
51
What is included in the HTTP response status line?
Version, status code, and reason phrase | ( HTTP/1.1 404 Not Found)
52
What does the Host header in HTTP request do?
Specifies domain name of the server
53
What’s the difference between recursive and iterative DNS queries?
Recursive: server gets full answer for client Iterative: server refers client to another server.
54
What is a Type NS record in DNS?
domain name -> authoritative name server
55
Why is caching important in DNS?
Reduces load on DNS servers and speeds up response time
56
What is the DASH manifest file?
tells video player: what media is available where chunks are located What qualities exist timing and duration
57
Why is P2P more scalable than client-serv
Peers contribute bandwidth, storage as the network grow