Shared Flashcard Set


Test 1 Evens
Computer Science
Undergraduate 4

Additional Computer Science Flashcards




List five nonproprietary Internet applications and the application-layer protocols that they use.
a. The Web: HTTP;
b. file transfer: FTP;
c. remote login: Telnet;
d. Network News: NNTP;
e. e-mail: SMTP.
What is the difference between network architecture and application architecture?
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)
For a communication session between a pair of processes, which process is the client and which is the server?
The process which initiates the communication is the client; the process that waits to be contacted is the server.
. For a P2P file-sharing application, do you agree with the statement, “There is no notion of client and server sides of a communication session”? Why or why not?
No. As stated in the text, all communication sessions have a client side and a server side. 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.
What information is used by a process running on one host to identify a process running on another host?
The IP address of the destination host and the port number of the destination socket.
Suppose you wanted to do a transaction from a remote client to a server as fast as possible. Would you use UDP or TCP? Why?
You would use UDP. With UDP, the transaction can be completed in one roundtrip time (RTT) - the client sends the transaction request into a UDP socket, and the server sends the reply back to the client's UDP socket. With TCP, a minimum of two RTTs are needed - one to set-up the TCP connection, and another for the client to send the request, and for the server to send back the reply.
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. .Reliable data transfer TCP provides a reliable byte-stream between client and server but UDP doesn’t.
b. A guarantee that a certain value for throughput will be maintained
a. Neither
c. A guarantee that data will be delivered within a specified amount of time
a. Neither
d. Security
a. Neither
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?
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
What is meant by a handshaking protocol?
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.
Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP?
The applications associated with those protocols require that all application data be received in the correct order and without gaps. TCP provides this service whereas UDP does not.
Consider an e-commerce site that wants to keep a purchase record for each of its customers. Describe how this can be done with cookies.
When the user first visits the site, the site returns 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.
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?
Web caching can bring the desired content “closer” to the user, perhaps to the same LAN to which the user’s 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.
Why is it said that FTP sends control information “out-of-band”?
FTP uses two parallel TCP connections, one connection for sending control information (such as a request to transfer a file) and another connection for actually transferring the file. Because the control information is not sent over the same connection that the file is sent over, FTP sends control information out of band.
. 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.
Message is 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.
. Is it possible for an organization’s Web server and mail server to have exactly the same alias for a hostname (for example, foo. com)? What would be the type for the RR that contains the hostname of the mail server?
Yes an organization’s mail server and Web server can have the same alias for a
host name. The MX record is used to map the mail server’s host name to its IP
In what way is instant messaging with a centralized index a hybrid of client- server and P2P architectures?
It is a hybrid of client server and P2P architectures:
a) There is a centralized component (the index) like in the case of a client
server system.
b) Other functions (except the indexing) do not use any kind of central
server. This is similar to what exists in a P2P system.
. List at least four different applications that are naturally suitable for P2P architectures. (Hint: File distribution and instant messaging are two.)
a) File Distribution
b) Instant Messaging
c) Video Streaming
d) Distributed Computing
For the client-server application over TCP described in Section 2.7, why must the server program be executed before the client program? For the client- server application over UDP described in Section 2.8, why may the client program be executed before the server program?
For the TCP application, as soon as the client is executed, it attempts to initiate a
TCP connection with the server. If the TCP server is not running, then the client
will fail to make a connection. For the UDP application, the client does not
initiate connections (or attempt to communicate with the UDP server)
immediately upon execution
True or false?
a. A user requests a Web page that consists of some text and three images. For this page, the client will send one request message and receive four response messages.
b. Two distinct Web pages (for example, www. and www. mit. edu/students. html) can be sent over the same persistent connection.
c. With nonpersistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages.
d. The Date: header in the HTTP response message indicates when the object in the response was last modified.
e. HTTP response messages never have an empty message body.
a) F
b) T
c) F
d) F
e) F
Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of the HTTP server is initially unknown. What transport and application-layer protocols besides HTTP are needed in this scenario?
Application layer protocols: DNS and HTTP
Transport layer protocols: UDP for DNS; TCP for HTTP
Obtain the HTTP/1.1 specification (RFC 2616). Answer the following questions:
a. Explain the mechanism used for signaling between the client and server to indicate that a persistent connection is being closed. Can the client, the server, or both signal the close of a connection?
b. What encryption services are provided by HTTP?
c. Can a client open three or more simultaneous connections with a given server?
d. Either a server or a client may close a transport connection between them if either one detects the connection has been idle for some time. Is it possible that one side starts closing a connection while the other side is transmitting data via this connection? Explain.
a) Persistent connections are discussed in section 8 of RFC 2616 (the real goal of
this question was to get you to retrieve and read an RFC). Sections 8.1.2 and of the RFC indicate that either the client or the server can indicate to the
other that it is going to close the persistent connection. It does so by including the
including the connection-token "close" in the Connection-header field of the http
b) HTTP does not provide any encryption services.
c) (From RFC 2616) “Clients that use persistent connections should limit the
number of simultaneous connections that they maintain to a given server. A
single-user client SHOULD NOT maintain more than 2 connections with any
server or proxy.”
d) Yes. (From RFC 2616) “A client might have started to send a new request at the
same time that the server has decided to close the "idle" connection. From the
server's point of view, the connection is being closed while it was idle, but from
the client's point of view, a request is in progress.”
Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address. Suppose that n DNS servers are visited before your host receives the IP address from DNS; the successive visits incur an RTT of RTT1, . . ., RTTn. Further suppose that the Web page associated with the link contains exactly one object, consisting of a small amount of HTML text. Let RTT0 denote the RTT between the local host and the server containing the object. Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object?
The total amount of time to get the IP address is
RTT1 + RTT2 +L+ RTTn
. Once the IP address is known, RTTO
elapses to set up the TCP connection and another
elapses to request and receive the small object. The total response time is
RTTo + RTT1 + RTT2 +L+ RTTn 2
Consider the scenario introduced in the previous problem. Now suppose that the link is shared by Bob with four other users. Bob uses parallel instances of non-persistent HTTP, and the other four users use non-persistent HTTP with-out parallel downloads.
a. Do Bob’s parallel connections help him get Web pages more quickly?
Why or why not?
b. If all five users open five parallel instances of non-persistent HTTP, then would Bob’s parallel connections still be beneficial? Why or why not?
a). Yes, because Bob has more connections, so he can proportionally get more aggregate
bandwidth share out of the total link bandwidth.
b) Yes, Bob still needs to perform parallel download, otherwise he will get less
bandwidth share than other four users. In fact, all users might tend to open more
connections in order to gain more bandwidth share.
What is the difference between MAIL FROM: in SMTP and From: in the mail message itself?
The MAIL FROM: in SMTP is a message from the SMTP client that identifies the sender
of the mail message to the SMTP server. The From: on the mail message itself is NOT an
SMTP message, but rather is just a line in the body of the mail message.
Suppose you can access the caches in the local DNS servers of your department. Can you propose a way to roughly determine the Web servers (outside your department) that are most popular among the users in your department? Explain.
We can periodically take a snapshot of the DNS caches in those local DNS servers. The
Web server that appears most frequently in the DNS caches is the most popular server.
This is because if more users are interested in a Web server, then DNS requests for that
server are more frequently sent by users. Thus, that Web server will appear in the DNS
caches more frequently.
For a complete measurement study, see:
Craig E. Wills, Mikhail Mikhailov, Hao Shang
“Inferring Relative Popularity of Internet Applications by Actively Querying DNS
Caches”, in IMC'03, October 27-29, 2003, Miami Beach, Florida, USA
. Suppose Bob joins a BitTorrent torrent, but he does not want to upload any data to any other peers (so called free-riding).
a. Bob claims that he can receive a complete copy of the file that is shared by the swarm. Is Bob’s claim possible? Why or why not?
b. Bob further claims that he can further make his “free-riding” more efficient by using a collection of multiple computers (with distinct IP addresses) in the computer lab in his department. How can he do that?
Yes. His first claim is possible, as long as there are enough peers staying in the swarm for
a long enough time. Bob can always receive data through optimistic unchoking by other
His second claim is also true. He can run a client on each machine, and let each client do
“free-riding”, and combine those collected chunks from different machines into a single file. He can even write a small scheduling program to let different machines only asking
for different chunks of the file. This is actually a kind of Sybil attack in P2P networks.
a) If you run TCPClient first, then the client will attempt to make a TCP connection with
a non-existent server process. A TCP connection will not be made.
b) UDPClient doesn't establish a TCP connection with the server. Thus, everything
should work fine if you first run UDPClient, then run UDPServer, and then type some
input into the keyboard.
c) If you use different port numbers, then the client will attempt to establish a TCP
connection with the wrong process or a non-existent process. Errors will occur.
Supporting users have an ad free experience!