Computer Networks (Review Question and Problem)
Computer Networks (Review Question and Problem)
R6. What is the role of HTTP in a network application? What other components are needed to complete a Web
application?
R10. What is meant by a handshaking protocol?
R11. What does a stateless protocol mean? Is IMAP stateless? What about SMTP?
R12. How can websites keep track of users? Do they always need to use cookies?
R15. Are there any constraints on the format of the HTTP body? What about the email message body sent with
SMTP? How can arbitrary data be transmitted over SMTP?
Ans:
No strict constraints on the HTTP body format itself.
1. It can contain any data (text, binary, JSON, XML, etc.).
2. The format is typically indicated by the Content-Type header (e.g., text/html, application/json, etc.).
Yes, there are constraints.
1. SMTP was originally designed for ASCII text only.
2. Binary data (like images or attachments) isn't allowed directly in the message body.
Using MIME (Multipurpose Internet Mail Extensions) and base64 encoding:
1. MIME allows emails to include different content types (like text, HTML, images, etc.).
2. Binary data is encoded as base64, which turns it into ASCII-safe text.
R23. Assume a BitTorrent tracker suddenly becomes unavailable. What are its consequences? Can files still be
downloaded?
P3. Assume you open a browser and enter http://yourbusiness.com/ about.html in the address bar. What happens
until the webpage is displayed? Provide details about the protocol(s) used and a high-level description of the
messages exchanged.
P4. Consider the following string of ASCII characters that were captured by Wireshark when the browser sent an
HTTP GET message (i.e., this is the actual content of an HTTP GET message). The characters are carriage return
and line-feed characters (that is, the italized character string in the text below represents the single carriage-return
character that was contained at that point in the HTTP header). Answer the following questions, indicating where
in the HTTP GET message below you find the answer.
GET /cs453/index.html HTTP/1.1 Host: gaia.cs.umass.edu User-Agent: Mozilla/5.0 ( Windows;U; Windows
NT 5.1; en-US; rv:1.7.2) Gec ko/20040804 Netscape/7.2 (ax) Accept:ex t/xml, application/xml,
application/xhtml+xml, text /html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5Accept-Language: en-
us,en;q=0.5Accept Encoding: zip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 300
Connection:keep-alive
1
Bondhon
P5. The text below shows the reply sent from the server in response to the HTTP GET message in the question
above. Answer the following questions, indicating where in the message below you find the answer.
HTTP/1.1 200 OK Date: Tue, 07 Mar 2008 12:39:45GMTServer: Apache/2.0.52 (Fedora) Last-Modified: Sat, 10
Dec2005 18:27:46 GMT ETag: ”526c3-f22-a88a4c80” Accept- Ranges: bytes Content-Length: 3874 Keep-Alive:
timeout=max=100Connection: Keep-Alive Content-Type: text/html; charset= ISO-8859-1
a. Was the server able to successfully find the document or not? What time was the document reply provided?
b. When was the document last modified?
c. How many bytes are there in the document being returned?
d. What are the first 5 bytes of the document being returned? Did the server agree to a persistent connection?
P6. 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 pro
c. vided by HTTP?
d. Can a client open three or more simultaneous connections with a given server?
e. 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.
P22. Consider distributing a file of F = 10 Gbits to N peers. The server has an upload rate of us = 1 Gbps, and
each peer has a download rate of di = 200 Mbps and an upload rate of u. For N = 10, 100, and 1,000 and u = 2
Mbps, 10 Mbps, and 100 Mbps, prepare a table giving the minimum distribution time in seconds for each of the
combinations of N and u for both client-server distribution and P2P distribution
Transport Layer
R3. How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full
identification of both sockets?
R4. Describe why an application developer might choose to run an application over UDP rather than TCP.
R5. Why is it that voice and video traffic is often sent over TCP rather than UDP in today’s Internet? (Hint: The
answer we are looking for has nothing to do with TCP’s congestion-control mechanism.)
R6. Is it possible for an application to enjoy reliable data transfer even when the
application runs over UDP? If so, how?
2
Bondhon
P1. Suppose Client A requests a web page from Server S through HTTP and its socket is associated with port
33000.
a. What are the source and destination ports for the segments sent from A to S?
b. What are the source and destination ports for the segments sent from S to A?
c. Can Client A contact to Server S using UDP as the transport protocol?
d. Can Client A request multiple resources in a single TCP connection?
P3. UDP and TCP use 1s complement for their checksums. Suppose you have the following three 16 bit words:
0101001101100110; 0111010010110100; 0000110111000001. What is the 1s complement of the sum of these
words? Show all work. Why is it that UDP offers a checksum? With the 1’s comple ment scheme, how does the
receiver detect errors? Describe how a single bit flip can be detected.
P31. Suppose that the five measured SampleRTT values (see Section 3.5.3) are 112 ms, 140 ms, 110 ms, 90 ms,
and 90 ms. Compute the EstimatedRTT after each of these SampleRTT values is obtained, using a value of α =
0.125 and assuming that the value of EstimatedRTT was 120 ms just before the first of these five samples were
obtained. Compute also the DevRTT after each sample is obtained, assuming a value of b = 0.25 and assuming
the value of DevRTT was 6 ms just before the first of these five samples was obtained. Finally, compute the
TCP TimeoutInterval after each of these samples is obtained.
Suppose that the ISP instead assigns the router the address 24.34.101.225 and that the network address of the
home network is 192.168.0/24.
3
Bondhon
b. Suppose each host has two ongoing TCP connections, all to port 80 at host 128.119.40.86. Provide
the six corresponding entries in the NAT translation table.
R7. While TDM and FDM assign time slots and frequencies, CDMA assigns a different code to each node.
Explain the basic principle in which CDMA works.
R9. How big is the MAC address space? The IPv4 address space? The IPv6 address space?
R12. What is the difference between Bluetooth and Zigbee in terms of data rate?
R14. What is an International Mobile Subscriber Identity (IMSI)?
R18. What are the three sublayers in the link layer in the LTE protocol stack? Briefly describe their functions.
R9. In what way does a hash provide a better message integrity check than a checksum (such as the Internet
checksum)?
R27. Consider WEP for 802.11. Suppose that the data is 10001101 and the key stream is 01101010. What is the
resulting ciphertext?
R32. Signature-based IDSs and IPSs inspect into the payloads of TCP and UDP segments. True or false?
4
Bondhon