Chapter 2 - Application Layer Flashcards

1
Q

List five nonproprietary Internet applications and the application-layer proto- cols that they use.

A

The Web: HTTP; file transfer: FTP; remote login: Telnet; e-mail: SMTP; BitTorrent file sharing: BitTorrent protocol

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

What is the difference between network architecture and application architecture?

A

Network architecture refers to the organization of the communication process into layers (e.g., the five-layer Internet architecture). Application architecture, on the other hand, is designed by an application developer and dictates the broad structure of the application (e.g., client-server or P2P).

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

For a communication session between a pair of processes, which process is the client and which is the server?

A

The process which initiates the communication is the client; the process that waits to be contacted is the server.

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

Why are the terms client and server still used in peer-to-peer applications?

A

In a P2P file-sharing application, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.

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

What information is used by a process running on one host to identify a pro- cess running on another host?

A

The IP address of the destination host and the port number of the socket in the destination process.

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

What is the role of HTTP in a network application? What other components are needed to complete a Web application?

A

HTTP is an application layer protocol used in the transfer of html objects over TCP.

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

Referring to Figure 2.4, we see that none of the applications listed in Figure 2.4 requires both no data loss and timing. Can you conceive of an application that requires no data loss and that is also highly time-sensitive?

A

Real time critical monitoring applications.

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

List the four broad classes of services that a transport protocol can provide. For each of the service classes, indicate if either UDP or TCP (or both) provides such a service.

A

a) Reliable data transfer TCP provides a reliable byte-stream between client and server but UDP does not.
b) A guarantee that a certain value for throughput will be maintained Neither
c) A guarantee that data will be delivered within a specified amount of time Neither
d) Confidentiality (via encryption) Neither

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

Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do?

A

SSL operates at the application layer. The SSL socket takes unencrypted data from the application layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, she has to include the SSL code in the application.

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

What is meant by a handshaking protocol?

A

A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not

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

What does a stateless protocol mean? Is IMAP stateless? What about SMTP?

A

A stateless protocol is one that does not maintain client information between sessions.

IMAP is a stateful protocol because the IMAP server has to maintain a folder hierarchy for each of its users.

SMTP is stateful because it maintains a connection for the duration of an MTA interaction.

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

How can websites keep track of users? Do they always need to use cookies?

A

When the user first visits the site, the server creates a unique identification number, creates an entry in its back-end database, and returns this identification number as a cookie number. This cookie number is stored on the user’s host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the site. Thus the site knows when this user (more precisely, this browser) is visiting the site.

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

Describe how Web caching can reduce the delay in receiving a requested object. Will Web caching reduce the delay for all objects requested by a user or for only some of the objects? Why?

A

Web caching can bring the desired content closer to the user, possibly to the same LAN to which the users host is connected. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links.

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

Suppose Alice, with a Web-based e-mail account (such as Hotmail or Gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice’s host to Bob’s host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.

A

The message is first sent from Alice’s host to her mail server over HTTP. Alice’s mail server then sends the message to Bob’s mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3.

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

Assume you have multiple devices, and you connect to your email provider using POP3. You retrieve messages with the “download and keep” strategy from multiple devices. Can your email client tell if you have already read the message in this scenario?

A

With download and delete, after a user retrieves its messages from a POP server, the messages are deleted. This poses a problem for the nomadic user, who may want to access the messages from many different machines (office PC, home PC, etc.). In the download and keep configuration, messages are not deleted after the user retrieves the messages. This can also be inconvenient, as each time the user retrieves the stored messages from a new machine, all of non-deleted messages will be transferred to the new machine (including very old messages).

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

Why are MX records needed? Would it not be enough to use a CNAME record? (Assume the email client looks up email addresses through a Type A query and that the target host only runs an email server.)

A

MX records are special DNS records that specify the domain and priority of mail servers for a given domain.

17
Q

What is the difference between recursive and iterative DNS queries?

A

In recursion, a program repeatedly calls itself until a condition is met, while in iteration, a set of instructions is repeated until a condition is met.

In a recursive lookup, a DNS server does the recursion and continues querying other DNS servers until it has an IP address to return to the client (often a user’s operating system). In an iterative DNS query, each DNS query responds directly to the client with an address for another DNS server to ask, and the client continues querying DNS servers until one of them responds with the correct IP address for the given domain.

18
Q

Under what circumstances is file downloading through P2P much faster than through a centralized client-server approach? Justify your answer using Equation 2.2.

A

Whenever some peers have some of the file to transfer.

19
Q

In Section 2.7, the UDP server described needed only one socket, whereas the TCP server needed two sockets. Why? If the TCP server were to support n simultaneous connections, each from a different client host, how many sockets would the TCP server need?

A

With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is a welcoming socket, and each time a client initiates a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets.