Networking Chapter 3 Homework Suppose The Timeout Caused Lost Data Packet

subject Type Homework Help
subject Pages 10
subject Words 4089
subject Authors James F. Kurose, Keith W. Ross

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
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
destination host address, a source port number, and a destination port number. STP
c) No, the transport layer does not have to do anything in the core; the transport layer
“lives” in the end systems.
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. An application developer may not want its application to use TCP’s congestion
control, which can throttle the application’s sending rate at times of congestion.
page-pf2
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 persistent connection, the Web server creates a separate “connection
socket”. Each connection socket is identified with a four-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.
page-pf3
13.
a) When the packet was lost, the received four packets were buffered the receiver. After
c) The sender was unable to send sixth packet as the send window size is fixed to 5
When a packet was lost, GO-Back-N retransmitted all the packets whereas Selective
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
18. False, it is set to half of the current value of the congestion window.
19. Let X = RTTFE, Y = RTTBE and ST = Search time. Consider the following timing
diagram.
page-pf4
Chapter 3 Problems
Problem 1
source port
numbers
destination port
numbers
a) A
o
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.
01100110
11001010
page-pf5
Problem 4
a) Adding the two bytes gives 11000001. Taking the one’s complement gives 00111110.
Problem 5
No, the receiver cannot be absolutely certain that no bit errors have occurred. This is
Problem 6
Suppose the sender is in state “Wait for call 1 from above” and the receiver (the receiver
shown in the homework problem) is in state “Wait for 1 from below.” The sender sends
a packet with sequence number 1, and transitions to “Wait for ACK or NAK 1,” waiting
page-pf6
Problem 7
To best answer this question, consider why we needed sequence numbers in the first
Problem 8
The sender side of protocol rdt3.0 differs from the sender side of protocol 2.2 in that
Problem 9
Suppose the protocol has been in operation for some time. The sender is in state “Wait
page-pf7
M1
A1
sender sends M0
M0
A0
Problem 10
Here, we add a timer, whose value is greater than the known round-trip propagation
delay. We add a timeout event to the “Wait for ACK or NAK0” and “Wait for ACK or
NAK1” states. If the timeout event occurs, the most recently transmitted packet is
page-pf8
Problem 11
If the sending of this message were removed, the sending and receiving sides would
deadlock, waiting for an event that would never occur. Here’s a scenario:
x Sender sends pkt0, enter the “Wait for ACK0 state”, and waits for a packet back
from the receiver
Problem 12
The protocol would still work, since a retransmission would be what would happen if the
n
n
Problem 13
M0
A0
page-pf9
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
Problem 16
Yes. This actually causes the sender to send a number of pipelined data into the channel.
page-pfa
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
Wait: send
to B
Wait: receive
from B
rdt_send(data)
packet=make_pkt(data)
udt_send(packet)
rdt_receive(packet)
extract(packet,data)
deliver_data(data)
rdt_send(data)
rdt_unable_to_send(data)
rdt_send(data)
Rdt_unable_to_send(data)
A
page-pfb
two data messages (to get things going). A timeline trace for the sender and receiver
recovering from a lost packet is shown below:
Figure 2: Sender and receiver for Problem (3.18)
Sender Receiver
make pair (0,1)
send packet 0
page-pfc
Problem 19
This problem is a variation on the simple stop and wait protocol (rdt3.0). Because the
rdt3.0, a 0-bit sequence number will suffice here.
The sender and receiver FSM are shown in Figure 3. In this problem, the sender state
page-pfd
page-pfe
Problem 20
rdt_rcv(rcvpkt)&&from_A(rcvpkt)
Λ
udt_send(B,sndpkt)
extract(rcvpkt,data)
deliver_data(data)
rdt_rcv(rcvpkt)&&from_A(rcvpkt)
Λ
rdt_rcv(rcvpkt)&&not_corrupt(rcvpkt)&&
has_seq0(rcvpkt)&&from_B(rcvpkt)
rdt_rcv(rcvpkt)&&from_B(rcvpkt)
Λ
deliver_data(data)
sndpkt=make_pkt(ACK,1,checksum)
udt_send(B,sndpkt)
extract
(rcvpkt,data)
deliver_data(data)
rdt_rcv(rcvpkt)&&from_B(rcvpkt)
rdt_rcv(rcvpkt)&&(corrupt(rcvpkt)
rdt_rcv(rcvpkt)&&(corrupt(rcvpkt)
||has_seq0(rcvpkt))&&from_A(rcvpkt)
sndpkt=make_pkt(ACK, 0, checksum)
page-pff
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.,
resend a request message that has already been received by B). To be able to detect
message, restarts the timer and remains in this state. If a D0 message is received
from B, A stops the time and transits to the “Wait for Request 1 from above”
state. If A receives a D1 data message while in this state, it is ignored.
x “Wait for Request 1 from above.” Here the requestor is again waiting for a call
from above to request a unit of data. When it receives a request from above, it
sending D0, and then remaining in this state. If B receives a R1 message, then it
knows its D0 message has been received correctly. It thus discards this D0 data
(since it has been received at the other side) and then transits to the “Send D1”
state, where it will use D1 to send the next requested piece of data.
page-pf10
x “Send D1.” 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
received by sender, then sender's window is [k, k+N-1]. Suppose next that none of
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
the sender, then ACK messages with values of [k-N,k-1] may still be propagating
Problem 23
In order to avoid the scenario of Figure 3.27, we want to avoid having the leading edge of
the receiver's window (i.e., the one with the “highest” sequence number) wrap around in
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

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.