Application Layer Paradigm Flashcards
Assume we add a new protocol to the application layer. What changes do we need to make
to other layers?
No changes are needed. The new protocol needs to use the services provided by one of the
transport-layer protocols.
Explain which entity provides service and which one receives service in the client-server
paradigm.
In a client-server paradigm, a server provides service and a client receives service.
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 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.
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.
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.
Most of the operating systems installed on personal computers come with several client
processes, but normally no server processes. Explain the reason
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
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?
In this case, UDP is more appropriate because it does not have the overhead of TCP in
connection establishment and teardown.
7 Which of the following can be a source of data?
Keyboard, monitor, mouse, socket
keyboard, mouse, socket
A source socket address is a combination of an IP address and a port number. Explain what
each section identifies
The IP address identifies the source computer; the port number identifies the source process.
Explain how a client process finds the IP address and the port number to be inserted in a
remote socket address.
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.
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?
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).
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?
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
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?
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.
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?
Yes. Two separate connections are needed for setup/teardown (port 21) and the transfer of
data (port 20) to use FTP.
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.
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).
8 In FTP, which entity (client or server) starts (actively opens) the control connection? Which entity starts (actively opens) the data transfer connection?
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.