Chapter 3 Review Questions
1.
a) Call this protocol Simple Transport Protocol (STP). At the sender side, STP accepts
from the sending process a chunk of data not exceeding 1196 bytes, a destination host
address, and a destination port number. STP adds a four-byte header to each chunk
b) The segment now has two header fields: a source port field and destination port field.
At the sender side, STP accepts a chunk of data not exceeding 1192 bytes, a
c) No, the transport layer does not have to do anything in the core; the transport layer
2.
1. For sending a letter, the family member is required to give the delegate the letter
itself, the address of the destination house, and the name of the recipient. The
3. Source port number y and destination port number x.
4.
6. Yes. The application developer can put reliable data transfer into the application layer
protocol. This would require a significant amount of work and debugging, however.
7. Yes, both segments will be directed to the same socket. For each received segment, at
8. For each pers
-tuple: (source IP address,
source port number, destination IP address, destination port number). When host C
10. To handle losses in the channel. If the ACK for a transmitted packet is not received
11. A timer would still be necessary in the protocol rdt 3.0. If the round trip time is
known then the only advantage will be that, the sender knows for sure that either the
12.
a) The packet loss caused a time out after which all the five packets were retransmitted.
13.
a) When the packet was lost, the received four packets were buffered the receiver. After
the timeout, sender retransmitted the lost packet and receiver delivered the buffered
14. a) false b) false c) true d) false e) true f) false g) false
16. 3 segments. First segment: seq = 43, ack =80; Second segment: seq = 80, ack = 44;
Third segment; seq = 44, ack = 81
19. Let X = RTTFE, Y = RTTBE and ST = Search time. Consider the following timing
diagram.
Chapter 3 Problems
Problem 1
source port
numbers
destination port
numbers
a) A S 467 23
Problem 2
Suppose the IP addresses of the hosts A, B, and C are a, b, c, respectively. (Note that a, b,
c are distinct.)
Problem 3
Note, wrap around if overflow.
11001010
10011101
Problem 4
Problem 5
No, the receiver cannot be absolutely certain that no bit errors have occurred. This is
Problem 6
shown in the homework prob
for an ACK or NAK. Suppose now the receiver receives the packet with sequence
Problem 7
To best answer this question, consider why we needed sequence numbers in the first
place. We saw that the sender needs sequence numbers so that the receiver can tell if a
Problem 8
The sender side of protocol rdt3.0 differs from the sender side of protocol 2.2 in that
timeouts have been added. We have seen that the introduction of timeouts adds the
Problem 9
Suppose the protocol has been
Sender ignores A1
Packet garbled, receiver
resends last ACK (A1)
M0 corrupted
Sender sends M0
Timeout: sender
M0
A1
sender sends M0
M0
A0
M1
M1
A1
M0
sender sends M1
Corrupted
data
Corrupted
Problem 10
Here, we add a timer, whose value is greater than the known round-trip propagation
he timeout event occurs, the most recently transmitted packet is
retransmitted. Let us see why this protocol will still work with the rdt2.1 receiver.
Suppose the timeout is caused by a lost data packet, i.e., a packet on the sender
to-receiver channel. In this case, the receiver never received the previous
A0
M1
A1
Problem 11
If the sending of this message were removed, the sending and receiving sides would
Sender sends pkt0, ent
from the receiver
Problem 12
The protocol would still work, since a retransmission would be what would happen if the
Problem 13
M1
A0
M0
A0
Problem 14
In a NAK only protocol, the loss of packet x is only detected by the receiver when packet
x+1 is received. That is, the receivers receives x-1 and then x+1, only when x+1 is
Problem 15
It takes 12 microseconds (or 0.012 milliseconds) to send a packet, as 1500*8/109=12
or
n
approximately 2451 packets.
Problem 16
Yes. This actually causes the sender to send a number of pipelined data into the channel.
Problem 17
Problem 18
In our solution, the sender will wait until it receives an ACK for a pair of messages
(seqnum and seqnum+1) before moving on to the next pair of messages. Data packets
have a data field and carry a two-bit sequence number. That is, the valid sequence
numbers are 0, 1, 2, and 3. (Note: you should think about why a 1-bit sequence number
rdt_send(data)
packet=make_pkt(data)
udt_send(packet)
extract(packet,data)
packet=make_pkt(data)
Figure 2: Sender and receiver for Problem (3.18)
Sender Receiver
Problem 19
This problem is a variation on the simple stop and wait protocol (rdt3.0). Because the
channel may lose messages and because the sender may resend a message that one of the
receivers has already received (either because of a premature timeout or because the other
Problem 20
rdt_rcv(rcvpkt)&&from_A(rcvpkt)
rdt_rcv(rcvpkt)&&not_corrupt(rcvpkt)&&ha
s_seq1(rcvpkt)&&from_A(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
sndpkt=make_pkt(ACK,1,checksum)
udt_send(A,sndpkt)
udt_send(B,sndpkt)
rdt_rcv(rcvpkt)&&from_B(rcvpkt)
rdt_rcv(rcvpkt)&&not_corrupt(rcvpkt)
&&has_seq1(rcvpkt)&&from_B(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
sndpkt=make_pkt(ACK,1,checksum)
udt_send(B,sndpkt)
rdt_rcv(rcvpkt)&&from_B(rcvpkt)
rdt_rcv(rcvpkt)&&(corrupt(rcvpkt)
||has_seq1(rcvpkt))&&from_B(rcvpkt)
Figure 4: Receiver side FSM for 3.18
Problem 21
Because the A-to-B channel can lose request messages, A will need to timeout and
retransmit its request messages (to be able to recover from loss). Because the channel
delays are variable and unknown, it is possible that A will send duplicate requests (i.e.,
Here the requestor is waiting for a call from
above to request a unit of data. When it receives a request from above, it sends a
anything it receives from B.
. Here the requestor is waiting for a D0 data message from B. A
timer is always running in this state. If the timer expires, A sends another R0
message, restarts the timer and remains in this state. If a D0 message is received
Here the requestor is waiting for a D1 data message from B. A
timer is always running in this state. If the timer expires, A sends another R1
message, restarts the timer and remains in this state. If a D1 message is received
state. If A receives a D0 data message while in this state, it is ignored.
In this state, B continues to respond to received R1 messages by
Problem 22
a) Here we have a window size of N=3. Suppose the receiver has received packet k-1,
and has ACKed that and all other preceding packets. If all of these ACK’s have been
b) If the receiver is waiting for packet k, then it has received (and ACKed) packet k-1
and the N-1 packets before that. If none of those N ACKs have been yet received by
Problem 23
In order to avoid the scenario of Figure 3.27, we want to avoid having the leading edge of
Suppose that the lowest-sequence number that the receiver is waiting for is packet m. In
this case, it’s window is [m,m+w-1] and it has received (and ACKed) packet m-1 and the
w-1 packets before that, where w is the size of the window. If none of those w ACKs
have been yet received by the sender, then ACK messages with values of [m-w,m-1] may