Chapter 2 Review Questions
1. The Web: HTTP; file transfer: FTP; remote login: Telnet; e-mail: SMTP; BitTorrent
file sharing: BitTorrent protocol
2. Network architecture refers to the organization of the communication process into
4. 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.
6. 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
7. One such example is remote word processing, for example, with Google docs.
8. a) Reliable data transfer
TCP provides a reliable byte-stream between client and server but UDP does not.
9. SSL operates at the application layer. The SSL socket takes unencrypted data from
10. A protocol uses handshaking if the two communicating entities first exchange control
11. The applications associated with those protocols require that all application data be
12. 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
13. ossibly to the same
objects, even objects that are not cached, since caching reduces the traffic on links.
14. Telnet is not available in Windows 7 by default. to make it available, go to Control
Panel, Programs and Features, Turn Windows Features On or Off, Check Telnet
client. To start Telnet, in Windows command prompt, issue the following command
16. The message is first
transfers the message from his mail server to his host over POP3.
17.
Received:
from 65.54.246.203 (EHLO bay0-omc3-
s3.bay0.hotmail.com)
(65.54.246.203) by mta419.mail.mud.yahoo.com with SMTP; Sat, 19
May 2007 16:53:51 -0700
Received:
from hotmail.com ([65.55.135.106]) by bay0-omc3-
s3.bay0.hotmail.com
with Microsoft SMTPSVC(6.0.3790.2668); Sat, 19 May 2007 16:52:42
0700
from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat,
Figure: A sample mail message header
Received: This header field indicates the sequence in which the SMTP servers send
and receive the mail message including the respective timestamps.
passed through 5 differe
SMTP server of the sender to the second SMTP server in the chain of servers. The
From: This indicates the email address of the sender of the mail. In the given
To: This field indicates the email address of the receiver of the mail. In the example,
18. 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
19. Yes
20. You should be able to see the sender’s IP address for a user with an .edu email
21. It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the
22. Recall that in BitTorrent, a peer picks a random peer and optimistically unchokes the
23. 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
permanent TCP connection between A and B. An overlay network does not include
routers.
24. One server placement philosophy is called Enter Deep, which enter deep into the
access networks of Internet Service Providers, by deploying server clusters in access
25. Other than network-related factors, there are some important factors to consider, such
as load-balancing (clients should not be directed to overload clusters), diurnal effects,
variations across DNS servers within a network, limited availability of rarely
26. 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
27. 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
Chapter 2 Problems
Problem 1
a) F
Problem 2
SMS (Short Message Service) is a technology that allows the sending and receiving of
text messages between mobile phones over cellular networks. One SMS message can
contain data of 140 bytes and it supports languages internationally. The maximum size of
a message can be 160 7-bit characters, 140 8-bit characters, or 70 16-bit characters. SMS
Problem 3
Application layer protocols: DNS and HTTP
Problem 4
a) The document request was http://gaia.cs.umass.edu/cs453/index.html. The Host :
field indicates the server’s name and /cs453/index.html indicates the file name.
b) The browser is running HTTP version 1.1, as indicated just before the first <cr><lf>
Problem 5
a) The status code of 200 and the phrase OK indicate that the server was able to locate
the document successfully. The reply was provided on Tuesday, 07 Mar 2008
Problem 6
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 8.1.2.1 of
Problem 7
The total amount of time to get the IP address is
Problem 8
a)
oon
RTTRTTRTTRTT
282
1
Problem 9
a) The time to transmit an object of size L over a link or rate R is L/R. The average time
is the average size of the object divided by R:
b) The traffic intensity on the access link is reduced by 60% since the 60% of the
Problem 10
Note that each downloaded object can be completely put into one data packet. Let Tp
denote the one-way propagation delay between the client and the server.
First consider parallel downloads using non-persistent connections. Parallel downloads
would allow 10 connections to share the 150 bits/sec bandwidth, giving each just 15
bits/sec. Thus, the total time needed to receive all objects is given by:
Problem 11
a) Yes, because Bob has more connections, he can get a larger share of the link
Problem 12
Server.py
from socket import *
serverPort=12000
Problem 13
Problem 14
SMTP uses a line containing only a period to mark the end of a message body.
Problem 15
MTA stands for Mail Transfer Agent. A host sends the message to an MTA. The message
Problem 16
UIDL
the server responds with the unique message ID for all of the messages present in the
Problem 17
a) C: dele 1
b) C: retr 2
S:
c) C: list
Problem 18
a) For a given input of domain name (such as ccn.com), IP address or network
207.69.189.21, 207.69.189.22,
207.69.189.23, 207.69.189.24,
207.69.189.25, 207.69.189.26, 207.69.189.27,
207.69.189.28
www.yahoo.com
Web Servers: www.yahoo.com (216.109.112.135, 66.94.234.13)
Mail Servers: a.mx.mail.yahoo.com (209.191.118.103)
b.mx.mail.yahoo.com (66.196.97.250)
www.hotmail.com
Web Servers: www.hotmail.com (64.4.33.7, 64.4.32.7)
Mail Servers: mx1.hotmail.com (65.54.245.8, 65.54.244.8, 65.54.244.136)
mx2.hotmail.com (65.54.244.40, 65.54.244.168, 65.54.245.40)
d) The yahoo web server has multiple IP addresses
f) An attacker can use the whois database and nslookup tool to determine the IP address
Problem 19
a) The following delegation chain is used for gaia.cs.umass.edu
a.root-servers.net
E.GTLD-SERVERS.NET
ns1.umass.edu(authoritative)
;; AUTHORITY SECTION:
Among all returned edu DNS servers, we send a query to the first one.
dig +norecurse @E.GTLD-SERVERS.NET any gaia.cs.umass.edu
b) The answer for google.com could be:
a.root-servers.net
E.GTLD-SERVERS.NET
ns1.google.com(authoritative)
Problem 20
We can periodically take a snapshot of the DNS caches in the local DNS servers. The
Web server that appears most frequently in the DNS caches is the most popular server.
Problem 21
Yes, we can use dig to query that Web site in the local DNS server.
Problem 22
For calculating the minimum distribution time for client-server distribution, we use the
following formula:
Client Server
N
10 100 1000
7680
51200
512000
300 Kbps
7680
51200
512000
Peer to Peer
N
10 100 1000
300 Kbps 7680 25904 47559
Problem 23
a) Consider a distribution scheme in which the server sends the file to each client, in
parallel, at a rate of a rate of us/N
c) From Section 2.6 we know that
DCS x {NF/us, F/dmin} (Equation 1)
Problem 24
a) Define u = u1 + u2 N. By assumption
us <= (us + u)/N Equation 1
b) Again define u = u1 + u2 uN. By assumption
us >= (us + u)/N Equation 2
The aggregate send rate of the server is
peer i is
(N-1)ri = ui
In this distribution scheme, peer i receives bits at an aggregate rate of
Thus each peer receives the file in NF/(us+u).
c) The solution to this part is similar to that of 17 (c). We know from section 2.6 that
Problem 25
There are N nodes in the overlay network. There are N(N-1)/2 edges.
Problem 26
Yes. His first claim is possible, as long as there are enough peers staying in the swarm for
Problem 27
a. N files, under the assumption that we do a one-to-one matching by pairing video
Problem 28
a) If you run TCPClient first, then the client will attempt to make a TCP connection with
Problem 29
In the original program, UDPClient does not specify a port number when it creates the
socket. In this case, the code lets the underlying operating system choose a port number.
With the additional line, when UDPClient is executed, a UDP socket is created with port
Problem 30
Yes, you can configure many browsers to open multiple simultaneous connections to a
Problem 31
For an application such as remote login (telnet and ssh), a byte-stream oriented protocol
is very natural since there is no notion of message boundaries in the application. When a
Problem 32
To create a web server, we need to run web server software on a host. Many vendors sell