Application Layer Flashcards

1
Q

Network Application is

A

Any application running on one host providing communication to the application running on the other host. Helps to manage and monitor network traffic, analyze data

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

Describe client-server architecture

A

In client-server architecture, one remote process acts as a client and requests some resources from another application process acting as server

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

Describe Peer-to-peer architecture

A

Both remote processes are executed on the same level and exchange data using shared resources

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

In client-server architecture, server is

A

Always on host, one or many permanent IP addresses, data centers for scaling

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

In client-server architecture, client

A

May Communicate with the server, maybe intermittently connected, have dynamic IP addresses, do not communicate directly with each other

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

A system can acts as client and server simultaneously? True or False? Why?
If same host? If different host?

A

True. One process acts as a server, another as a client.

Communicate with each other via interprocess communication. If host different - exchange messages

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

What are sockets? How are sockets identified? What is the size of identifier?

A

Process sends and receives messages via the socket. Port numbers to identify the socket. 32-bit

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

Which of the following is not the TCP services? (Multiple answers):
Reliability, flow control, congestion control, timing, minimum throughput, security, connection-orientedness

A

Timing, minimum throughput, securoty

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

Which of the following is not the UDP services? (Multiple answers):
Reliability, flow control, congestion control, timing, throughput guarantee, security, connection setup

A

ALL

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

Web page URL contains

A

Host name, path name

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

Two features that make HTTP is simple, but powerful because of:

A

use of TCP, statelessness

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

How does the TCP used in HTTP?

A
  1. client initiates TCP connection (creates socket) to server, port 80
  2. server accepts TCP connection from client
  3. HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)
  4. TCP connection closed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does stateless means in HTTP

A

No information about the client’s previous requests

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

What are the two types of HTTP connections? Describe each of them

A

Non-persistent HTTP: one object sent over TCP connection

Persistent HTTP: multiple objects sent over a TCP connection

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

What is RTT? How many RTTs does Non-persistent HTTP have? For what steps are RTTs calculated? What is the non-persistent HTTP response time?

A

RTT (definition): time for a small packet to travel from client to server and back. One to initiate connection, one RTT for HTTP request and first few bytes of HTTP response. 2RTT + file transmission time

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

Compare Non-persistent and persistent HTTP in terms of RTTs?

A

Non-persistent HTTP takes 2 RTTs for a single object, while Persistent needs only one RTT for all referenced objects

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

What are 2 types of HTTP messages?

A

Request, Response

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

What is the content of request message? What each part of the message have?

A

Single request line and multiple header lines. Request line has method, URL and HTTP Version fields.
Header lines have host, user agent, condition fields

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

What kind of HTTP methods exist?

A

GET, POST, HEAD

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

How does a browser know if browsers wants to use persistent connection?

A

Include Connection: keep-alive in header

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

Entity body method is used with what method

A

POST method to fill out the form and send it to the server

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

What are the differences between HTTP 1.0 and HTTP 1.1

A

HTTP 1.1 has PUT and DELETE, to upload and delete file to/in path specified in URL field

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

Which method in HTTP is used for debugging?

A

HEAD

24
Q

What are the sections of HTTP response message?

A

Status, header, data

25
Q

Status line has what kind of fields?

A

Protocol version field, Status code and status message.

26
Q
What do the following status codes mean: 
200
301
400
404
505
A
200 - OK
301 - Moved Permanently
400 - Bad Request
404 - Not found
505 - HTTP version not supported
27
Q

What is the cookie?

A

User-server interaction, small bit of information that travels from browser to the web server.

28
Q

What is the cookie used for?

A

Personal tracking, authentication, personalization, user session state, recommendation, shopping carts

29
Q

Describe each component of cookie and what it is responsible for

A
  1. Header line in the HTTP response message
  2. Header line in the next HTTP request message
  3. Cookie file kept on user’s host, managed by the user browser
  4. Back-end database on the server
30
Q

Which feature of HTTP simplifies the implementation of cookies?

A

Statelessness

31
Q

What does a site do when a client initially visits their website?

A

When initial HTTP requests arrive at site, site creates a unique ID and entry in the backend for the ID.

32
Q

How to keep state of a cookie?

A

Protocol endpoints: maintain state at sender/receiver at multiple transactions
cookies: http messages carry state

33
Q

Is an email system synchronous or asynchronous?

A

Asynchronous

34
Q

Three major components of email are? Describe each of them

A

User agents, mail servers, simple mail transfer protocol(SMTP)

35
Q

Who is the user agent in emails?

A

Just a default user, who reads and sends messages

36
Q

What is the mail server in emails? What does the mail server have?

A

The component that forms the core of email infrastructure. Has mailbox containing messages, mail queue for outgoing mail messages, SMTP protocol between mail servers to send email messages.

37
Q

Mail servers use TCP? True or False?

A

True

38
Q

What is the port that SMTP use?

A

25

39
Q

How are the emails transferred? Is it persistent or not-persistent?

A

Three phases: handshaking(establishing connection), transfer of messages, closure. Persistent

40
Q

What is the main similarity of SMTP and HTTP

A

Use command/response interaction

41
Q

Is there any restriction of email messages? How is this restriction solved?

A

7-bit ASCII. Solved via MIME.

42
Q

What is the purpose of DNS?

A

To identify servers. Maps between IP address and the name.

43
Q

What is the DNS? How is it implemented?

A

Implemented in the hierarchy of many name-servers? Application-Layer protocol, core Internet protocol. DNS can only employ other by application layer protocol like HTTP, SMTP to translate user supplied host names to IP addresses

44
Q

List the DNS services?

A
  1. Hostname to IP address translation
  2. Host Aliasing(host can have one or more alias names)
  3. Mail Server Aliasing
  4. Load distribution(many IP addresses can correspond to one name)
45
Q

Why one should not centralize the DNS?

A
  1. Single point of failure
  2. Traffic Volume
  3. Distant Centralized Database
  4. Maintenance
    Doesn’t scale
46
Q

What does root name server do?

A

Contact authoritative name server if does not know the mapping, get the mapping, return mapping to local name server

47
Q

What are the types of DNS?

A

Root name server, authoritative name server, local(default) name server

48
Q

What is the top level domain server do?

A

responsible for com, org, net etc.

49
Q

What is the authoritative domain server?

A

organization’s own DNS server for providing the authoritative host name to IP mappings for organization’s named hosts

50
Q

List each name resolution method and describe each of them? Which is better? Why?

A

iterated and recursive. iteratively and recursively :).

51
Q

Why is the caching needed in DNS?

A

To store the mappings

52
Q

What are the types in DNS records? What are the domains of A, NS, MX and CNAME?

A

Identifiers responsible for identifying the domain and the parameters required
IP Address, Name server, mail service and canonical name

53
Q

Peer to Peer Architecture is?

A

No always on server, arbitrary end systems directly communicate, peers can change IP addresses

54
Q

What is the formula for distribution time in client servers?

A

N file copies
F file
u_s upload speed of server
d_min minimum client download rate

D_cs >= max(NF/u_s, F/d_min)

55
Q

What is the formula for distribution time in P2P?

A

N file copies
F file
u_s upload speed of server
d_min minimum client download rate

u_max(maximum upload rate) is u_s + sum(u_i)
D_p2p >= max(F/u_s, F/d_min, NF/u_max)

56
Q

extra assignment problem 1

A

extra assignment problem 1

57
Q

extra assignment problem 2

A

extra assignment problem 2