Sunteți pe pagina 1din 3

ELEN 4017 – Network Fundamentals

Tutorial No. 4
Instructions:
 Discuss ‘review questions’ and ‘end problems’ of Ch.3 and Ch. 4 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.

Review Questions + End Problems + Discussions:

1. (R16) Suppose Host A sends two TCP segments back to back to Host B over a TCP
connection. The first segment has sequence number 90; the second has sequence
number 110.
a. How much data is in the first segment?
b. Suppose that the first segment is lost but the second segment arrives at B.
In the acknowledgment that Host B sends to Host A, what will be the
acknowledgment number?
2. (P14) Consider the GBN protocol with a sender window size of 4 and a sequence
number range of 1,024. Suppose that at time t, the next in-order packet that the
receiver is expecting has a sequence number of k. Assume that the medium does not
reorder messages. Answer the following questions:
a. What are the possible sets of sequence numbers inside the sender’s window
at time t? Justify your answer.
b. What are all possible values of the ACK field in all possible messages currently
propagating back to the sender at time t? Justify your answer

3. Using figure 3.26 of your book as a reference, depict graphically how the sender and
receiver windows will move forward if we modify the situation of Fig. 3.26 by 1)
Using a window size of N=5 and 2) Instead of pkt2 being lost ACK corresponding to
packet 4 and 5 are lost once.

4. (P16) Consider a scenario in which Host A wants to simultaneously send packets to


Hosts B and C. A is connected to B and C via a broadcast channel—a packet sent by A
is carried by the channel to both B and C. Suppose that the broadcast channel
connecting A, B, and C can independently lose and corrupt packets (and so, for
example, a packet sent from A might be correctly received by B, but not by C). Design
a stop-and-wait-like error-control protocol for reliably transferring packets from A to
B and C, such that A will not get new data from the upper layer until it knows that
both B and C have correctly received the current packet. Give FSM descriptions of A
and C. (Hint: The FSM for B should be essentially the same as for C.) Also, give a
description of the packet format(s) used.

5. (P23) Host A and B are communicating over a TCP connection, and Host B has already
received from A all bytes up through byte 126. Suppose Host A then sends two segments
to Host B back-to-back. The first and second segments contain 80 and 40 bytes of data,
respectively. In the first segment, the sequence number is 127, the source port number
is 302, and the destination port number is 80. Host B sends an acknowledgment
whenever it receives a segment from Host A.
a. In the second segment sent from Host A to B, what are the sequence number,
source port number, and destination port number?
b. If the second segment arrives before the first segment, in the acknowledgment
of the first arriving segment, what is the acknowledgment number?
c. If the first segment arrives before the second segment, in the acknowledgment
of the first arriving segment, what is the acknowledgment number, the source
port number, and the destination port number?
d. Suppose the two segments sent by A arrive in order at B. The first
acknowledgment is lost and the second acknowledgment arrives after the first
timeout interval. Draw a timing diagram, showing these segments and all other
segments and acknowledgments sent. (Assume there is no additional packet
loss.) For each segment in your figure, provide the sequence number and the
number of bytes of data; for each acknowledgment that you add, provide the
acknowledgment number.

6. (P27) Consider the TCP procedure for estimating RTT. Suppose that α= 0.1. Let
SampleRTT1 be the most recent sample RTT, let SampleRTT2 be the next most
recent sample RTT, and so on.
a. For a given TCP connection, suppose four acknowledgments have been returned
with corresponding sample RTTs: SampleRTT4, SampleRTT3, SampleRTT2,
and SampleRTT1. Express EstimatedRTT in terms of the four sample RTTs.
b. Generalize your formula for n sample RTTs.
c. For the formula in part (b) let n approach infinity. Comment on why this
averaging procedure is called an exponential moving average.
Chapter 4
7. (R1) What are the two most important network-layer functions in a datagram network?
What are the three most important network-layer functions in a virtual-circuit network?

8. (R2) Do the routers in both datagram networks and virtual-circuit networks use
forwarding tables? If so, describe the forwarding tables for both classes of networks.

9. (R9) Describe how packet loss can occur at input ports. Describe how packet loss at
input ports can be eliminated (without using infinite buffers).
10. (P2) Consider a VC network with a 2-bit field for the VC number. Suppose that the
network wants to set up a virtual circuit over four links: link A, link B, link C, and link D.
Suppose that each of these links is currently carrying two other virtual circuits, and the
VC numbers of these other VCs are as follows:

In answering the following questions, keep in mind that each of the existing VCs may
only be traversing one of the four links.
a. If each VC is required to use the same VC number on all links along its path, what
VC number could be assigned to the new VC?
b. If each VC is permitted to have different VC numbers in the different links along
its path (so that forwarding tables must perform VC number translation), how
many different combinations of four VC numbers (one for each of the four links)
could be used?
11. (P8) Consider a datagram network using 32-bit host addresses. Suppose a router has
four links, numbered 0 through 3, and packets are to be forwarded to the link interfaces
as follows: (Addresses are given in hexadecimal values)

Destination Address Range Link Interface


( E000 0000 ) to ( E0FF FFFF ) 0
( E100 0000 ) to ( E100 FFFF ) 1
( E101 0000 ) to ( E1FF FFFF ) 2
otherwise 3

a. Provide a forwarding table that has five entries, uses longest prefix matching,
and forwards packets to the correct link interfaces.
b. Describe how your forwarding table determines the appropriate link interface for
datagrams with destination addresses: 1) C891 5155 2) 7100 C33C 3) 7180 1177

12. (P8-6th ed.) In Section 4.3 of the book, we noted that the maximum queuing delay is
(n–1)D if the switching fabric is n times faster than the input line rates. Suppose that
all packets are of the same length, n packets arrive at the same time to the n input
ports, and all n packets want to be forwarded to different output ports. What is the
maximum delay for a packet for the (a) memory, (b) bus, and (c) crossbar switching
fabrics?

S-ar putea să vă placă și