0% found this document useful (0 votes)
8 views4 pages

Chpter 2 computer network

Uploaded by

hamza37727
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Chpter 2 computer network

Uploaded by

hamza37727
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Chpter 2

1-List five nonproprietary Internet applications and the application-layer protocols that they use.

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

2-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).

R3. 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.

R4. 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?

A.No. 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.

R5. What information is used by a process running on one host to identify a process running on another
host?

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

R6. 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?

A.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.

R7. 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.One such example is remote word processing, for example, with Google docs. However, because
Google docs runs over the Internet (using TCP), timing guarantees are not provided.
R8. 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

R9. Recall that TCP can be enhanced with TLS to provide process-to-process security services, including
encryption. Does TLS operate at the transport layer or the application layer? If the application developer
wants TCP to be enhanced with TLS, 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.

R10. 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.

R11. Why do HTTP, SMTP, and IMAP run on top of TCP rather than on UDP?

A.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.

R12. 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.

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.

R13. 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
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.

R14. Telnet into a Web server and send a multiline request message. Include in the request message the
If-modified-since: header line to force a response message with the 304 Not Modified status code.

A.@@@@@@@@

R15. List several popular messaging apps. Do they use the same protocols as SMS?
A.Skype, Facebook Messenger, WhatsApp, Telegram
No, they do not use the same protocols as SMS, they use internet protocols.

R16. 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 IMAP. 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.

R17. Print out the header of an e-mail message you have recently received. How many Received: header
lines are there? Analyze each of the header lines in the message.

A.@@@@@@

R18. What is the HOL blocking issue in HTTP/1.1? How does HTTP/2 attempt to solve it?

A.HOL blocking slows down faster requests in HTTP/1.1. HTTP/2 fixes this with multiplexing and
prioritization.

R19. 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?

A.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 address.

R20. Look over your received e-mails, and examine the header of a message sent from a user with a .edu
e-mail address. Is it possible to determine from the header the IP address of the host from which the
message was sent? Do the same for a message sent from a Gmail account.

A.@@@@

R21. In BitTorrent, suppose Alice provides chunks to Bob throughout a 30-second interval. Will Bob
necessarily return the favor and provide chunks to Alice in this same interval? Why or why not?

A.It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the top 4 neighbors of
Bob for Bob to send out chunks to her; this might not occur even if Alice provides chunks to Bob
throughout a 30-second interval.

R22. Consider a new peer Alice that joins BitTorrent without possessing any chunks. Without any chunks,
she cannot become a top-four uploader for any of the other peers, since she has nothing to upload. How
then will Alice get her first chunk?

A.Recall that in BitTorrent, a peer picks a random peer and optimistically unchokes the peer for a short
period of time. Therefore, Alice will eventually be optimistically unchoked by one of her neighbors,
during which time she will receive chunks from that neighbor.

R23. What is an overlay network? Does it include routers? What are the edges in the overlay network?
A.The overlay network in a P2P file sharing system consists of the nodes participating in the file sharing
system and the logical links between the nodes. There is a logical link (an "edge" in graph theory terms)
from node A to node B if there is a semi-permanent TCP connection between A and B. An overlay
network does not include routers.

R24. CDNs typically adopt one of two different server placement philosophies. Name and briefly describe
them.

A.Enter deep: Goes deep into access network of ISP


Bring home: Brings ISP home by building larger clusters at smaller number of key locations and
connecting these clusters.

R25. Besides network-related considerations such as delay, loss, and bandwidth performance, there are
other important factors that go into designing a CDN server selection strategy. What are they?

A.latency, throughput, failure, cost

R26. 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.

R27. 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, why may the client
program be executed before the server program?

A.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

You might also like