Sie sind auf Seite 1von 3

ELEN 4017 – Network Fundamentals

Tutorial No. 3
Instructions:
 Discuss ‘review questions’ and ‘end problems’ of Ch.2 and Ch.3 from the book
“Computer Networking – A Top-Down Approach”, 5th Edition (International
Edition)
 Only some of the following questions can be discussed during the tutorial
session. You are expected to solve the remaining questions as your homework
and discuss any related queries with the demonstrators or the instructor.
 Please bring your textbooks in the tutorial sessions.
Chapter 2

1. (R5) Suppose that a Web server runs in Host C on port 80. Suppose this Web server
uses persistent connections, and is currently receiving requests from two different
Hosts, A and B. Are all of the requests being sent through the same socket at Host C?
If they are being passed through different sockets, do both of the sockets have port
80? Discuss and explain.

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

3. Enlist and compare the services provided by UDP vs. the services provided by TCP.

4. For the client-server application over TCP described in Section 2.7 of book, 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?

5. In Section 2.7 (client server echo application), 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?

6. Suppose that your department has a local DNS server for all computers in the
department. You are an ordinary user (i.e., not a network/system administrator).
Can you determine if an external Web site was likely accessed from a computer in
your department a couple of seconds ago? Explain.
7. (P16) Consider distributing a file of F = 10 Gbits to N peers. The server has an upload
rate of us = 20 Mbps, and each peer has a download rate of d i=1 Mbps and an
upload rate of u. For N = 10, 100 and 1000 and u = 200 kbps, 600 kbps and 1 Mbps,
give values of the minimum distribution time for all the combinations of different
values of N and u, for both the client-server as well as the peer-to-peer architecture.

8. Consider distributing a file of 𝐹 bits to 𝑁 peers using a client-server architecture.


Assume a fluid model where the server can simultaneously transmit to multiple
peers, transmitting to each peer at different rates, as long as the combined rate
does not exceed 𝑢𝑠 .

𝑢𝑠
a. Suppose that ⁄𝑁 ≤ 𝑑𝑚𝑖𝑛 . Specify a distribution scheme that has a
distribution time of 𝑁𝐹⁄𝑢𝑠 .
𝑢
b. Suppose that 𝑠⁄𝑁 ≥ 𝑑𝑚𝑖𝑛 . Specify a distribution scheme that has a
distribution time of 𝐹⁄𝑑 .
𝑚𝑖𝑛
c. Conclude that the minimum distribution time is in general given by
𝑚𝑎𝑥 {𝑁𝐹⁄𝑢𝑠 , 𝐹⁄𝑑 }.
𝑚𝑖𝑛

9. (P2) UDP and TCP use 1s complement for their checksums. Suppose you have the
following three 8-bit bytes: 01010011, 01100110, and 01110100. What is the 1s
complement of the sum of these 8-bit bytes? (Note that although UDP and TCP use
16-bit words in computing the checksum, for this problem you are being asked to
consider 8-bit sums.) Show all work. Why is it that UDP takes the 1s complement of
the sum; that is, why not just use the sum? With the 1s complement scheme, how
does the receiver detect errors? Is it possible that a 1-bit error will go undetected?
How about a 2-bit error?

10. (P5) Consider our motivation for correcting protocol rdt2.1 (The one which take care
of garbled ACK/NAK via use of retransmissions and sequence numbers). Show that it
can lead the sender and receiver to enter into a deadlock state, where each is
waiting for an event that will never occur.

11. (P6) In protocol rdt3.0, the ACK packets flowing from the receiver to the sender do
not have sequence numbers (although they do have an ACK field that contains the
sequence number of the packet they are acknowledging). Why is it that the ACK
packets do not require sequence numbers?

12. (P7) Draw the FSM for the receiver side of protocol rdt3.0.

13. The sender side of rdt3.0 simply ignores (that is, takes no action on) all received
packets that are either in error or have the wrong value in the acknum field of an
acknowledgment packet. Suppose that in such circumstances, rdt3.0 were simply to
retransmit the current data packet. Would the protocol still work? (Hint: Consider
what would happen if there were only bit errors; there are no packet losses but
premature timeouts can occur. Consider how many times the nth packet is sent, in
the limit as n approaches infinity.)

14. (P11) Consider the rdt 3.0 protocol. Draw a diagram showing that if the network
connection between the sender and receiver can reorder messages (that is, that
two messages propagating in the medium between the sender and receiver can be
reordered), then the alternating-bit protocol will not work correctly (make sure you
clearly identify the sense in which it will not work correctly). Your diagram should
have the sender on the left and the receiver on the right, with the time axis running
down the page, showing data (D) and acknowledgment (A) message exchange.
Make sure you indicate the sequence number associated with any data or
acknowledgment segment.

15. (P13) Consider a reliable data transfer protocol that uses only negative
acknowledgments. Suppose the sender sends data only infrequently. Would a NAK-
only protocol be preferable to a protocol that uses ACKs? Why? Now suppose the
sender has a lot of data to send and the end-to-end connection experiences few
losses. In this second case, would a NAK-only protocol be preferable to a protocol
that uses ACKs? Why?
s
16. (D7) We have seen that Internet TCP sockets treat the data being sent as a byte
stream but UDP sockets recognize message boundaries. What are one advantage
and one disadvantage of byte-oriented API versus having the API explicitly recognize
and preserve application-defined message boundaries.

Das könnte Ihnen auch gefallen