Application Layer Paradigm Flashcards

1
Q

Assume we add a new protocol to the application layer. What changes do we need to make
to other layers?

A

No changes are needed. The new protocol needs to use the services provided by one of the
transport-layer protocols.

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

Explain which entity provides service and which one receives service in the client-server
paradigm.

A

In a client-server paradigm, a server provides service and a client receives service.

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

In the client-server paradigm, explain why a server should be run all the time, but a client
can be run when it is needed.

A

A server should always be on because a client may need to access it at any time. A client is
normally the initialiser of the connection; it can be run when it is needed.

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

Can a program written to use the services of UDP be run on a computer that has installed
TCP as the only transport-layer protocol? Explain.

A

It cannot. A program depends on the underlying transport-layer protocol. If a program is
written for UDP, it should be run only if UDP can be accessed.

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

Most of the operating systems installed on personal computers come with several client
processes, but normally no server processes. Explain the reason

A

A personal computer, such as a desktop or a laptop, is normally used as a client. If a
business needs to use a computer as a server, it should be more powerful to allow several
connections from clients at the same time

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

A new application is to be designed using the client-server paradigm. If only small messages
need to be exchanged between the client and the server without concern for message loss or
corruption, what transport-layer protocol do you recommend?

A

In this case, UDP is more appropriate because it does not have the overhead of TCP in
connection establishment and teardown.

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

7 Which of the following can be a source of data?

Keyboard, monitor, mouse, socket

A

keyboard, mouse, socket

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

A source socket address is a combination of an IP address and a port number. Explain what
each section identifies

A

The IP address identifies the source computer; the port number identifies the source process.

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

Explain how a client process finds the IP address and the port number to be inserted in a
remote socket address.

A

The client should either know the IP address of the server being communicated with or
should know the name of the server (URL) and use the DNS to map the name to the IP
address. The client should know the well-known port number of the corresponding server
process.

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

1 During the weekend, Alice often needs to access files stored on her office desktop from her
home laptop. Last week, she installed a copy of the FTP server process on her desktop at her
office and a copy of the FTP client process on her laptop at home. She was disappointed
when she could not access her files during the weekend. What could have gone wrong?

A

Probably Alice turned off her desktop, which stopped the FTP server, when she left the
office. A server process should be running all the time, waiting for clients to access it.
Office may have a Firewall that prevents FTP access (not a secure connection).

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

When an HTTP server receives a request message from an HTTP client, how does the server
know when all headers have arrived and the body of the message is to follow?

A

In an HTTP request message, a blank line signals the end of the headers and the beginning
of the body of the message, if any

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

Can you find an analogy in our daily life as to when we use two separate connections in
communication similar to the control and data connections in FTP?

A

One example can be the use of a remote control when watching TV. The remote control
establishes a control connection with the TV set, which is separate from one-way
multimedia connection.

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

FTP uses two separate well-known port numbers for control and data connection. Does this
mean that two separate TCP connections are created for exchanging control information and
data?

A

Yes. Two separate connections are needed for setup/teardown (port 21) and the transfer of
data (port 20) to use FTP.

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

FTP uses the services of TCP for exchanging control information and data transfer. Could
FTP have used the services of UDP for either of these two connections? Explain.

A

FTP definitely cannot use the services of UDP for control connection because the client and
the server need to be connected during the whole session. Since UDP is not a connectionoriented
protocol, it cannot do this task. FTP does not use the services of UDP during data
transmission for another reason. A file to be transferred may be too large to fit in a single
user datagram (UDP packet). In addition, UDP is not a reliable transport-layer protocol; for
file transfer, reliability is an important issue. TCP is more appropriate for this purpose.
NB tftp (trivial ftp) used UDP, however, useful only on a local network (very insecure).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
8 In FTP, which entity (client or server) starts (actively opens) the control connection? Which
entity starts (actively opens) the data transfer connection?
A

In FTP, the control connection is actively opened by the client. The server is running all the
time waiting for a client to make a control connection. The data-transfer connection, on the
other hand, is actively opened by the server. The client issues a passive open and sends the
ephemeral port (to be used for the data-transfer connection) to the server, which is done
using a control-connection command. The server now issues an active open using the
ephemeral port received from the client.

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

What do you think would happen if the control connection were severed before the end of an
FTP session? Would it affect the data connection?

A

If the control connection is severed during a session, no more control information can be
exchanged between the client control process and the server control process. Since the
control connection and the data connection are two separate TCP connections, the severance
of the control connection has no effect on the current data connection. However, when the
current data connection is terminated, no new data connection can be made until the control
connection is again established.

17
Q

0 In FTP, if the client needs to retrieve one file from the server site and store one file on the
server site, how many control connections and how many data transfer connections are
needed?

A

The task can be done using only one control connection, but two data-transfer connections
are needed, one for retrieving and one for storing. Although the data-transfer connection is
a two-way connection, one is used for data transfer, the other for acknowledging.

18
Q

In FTP, can a server retrieve a file from the client site?

A

No. Data-transfer activity is controlled by the client. If a file needs to be transferred from
the client site to the server site, the client needs to store it at the server site.

19
Q

In FTP, can a server get the list of the files or directories from the client?

A

No. Only the client can get the list of files from the server. In the client-server paradigm,
the request is from the client; the server only can respond.

20
Q

FTP can transfer files between two hosts using different operating systems with different
file formats. What is the reason?

A

FTP allows the client to define the file format it can receive or send; the server needs to
use the format acceptable to the client when sending a file and to accept the format used by
the client when receiving a file.

21
Q

Can we have a control connection without a data-transfer connection in FTP? Explain

A

Yes, can have a control connection without a data-transfer connection in FTP. Some tasks
in FTP can be done without a data-transfer connection. Eg if a client needs to rename a file
at the server site, there is no need for a data-transfer connection.

22
Q

Can we have a data-transfer connection without a control connection in FTP? Explain

A

No, cannot have a data-transfer connection without a control connection. The data-transfer
connection is established with one or more commands issued from a client; there needs to
be a control connection to allow the client to issue these commands.