没有合适的资源?快使用搜索试试~ 我知道了~
第3章R6Yes. The application developer can put reliable data transfer into the appl
资源详情
资源评论
资源推荐
第 3 章
R6
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.
R8
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 receives and
IP datagram, it examines these four fields in the datagram/segment to determine to
which socket it should pass the payload of the TCP segment. Thus, the requests from
A and B pass through different sockets. The identifier for both of these sockets has 80
for the destination port; however, the identifiers for these sockets have different
values for source IP addresses. Unlike UDP, when the transport layer passes a TCP
segment’s payload to the application process, it does not specify the source IP
address, as this is implicitly specified by the socket identifier.
R11
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 packet or the ACK (or NACK) for the packet has been lost, as compared to the
real scenario, where the ACK (or NACK) might still be on the way to the sender,
after the timer expires. However, to detect the loss, for each packet, a timer of
constant duration will still be necessary at the sender.
R15
a) 20 bytes b) ack number = 90
P5
No, the receiver cannot be absolutely certain that no bit errors have occurred. This is because of the
manner in which the checksum for the packet is calculated. If the corresponding bits (that would be
added together) of two 16-bit words in the packet were 0 and 1 then even if these get flipped to 1
and 0 respectively, the sum still remains the same. Hence, the 1s complement the receiver calculates
will also be the same. This means the checksum will verify even if there was transmission error.
P6
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 for an ACK or NAK.
Suppose now the receiver receives the packet with sequence number 1 correctly, sends an ACK,
and transitions to state “Wait for 0 from below,” waiting for a data packet with sequence number
0. However, the ACK is corrupted. When the rdt2.1 sender gets the corrupted ACK, it resends
the packet with sequence number 1. However, the receiver is waiting for a packet with sequence
number 0 and (as shown in the home work problem) always sends a NAK when it doesn't get a
packet with sequence number 0. Hence the sender will always be sending a packet with sequence
number 1, and the receiver will always be NAKing that packet. Neither will progress forward
from that state.
P8
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
possibility of duplicate packets into the sender-to-receiver data stream. However,
the receiver in protocol rdt.2.2 can already handle duplicate packets. (Receiver-side
duplicates in rdt 2.2 would arise if the receiver sent an ACK that was lost, and the
sender then retransmitted the old data). Hence the receiver in protocol rdt2.2 will
also work as the receiver in protocol rdt 3.0.
P22
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 the ACKs have been received at the sender. In this second case, the
sender's window contains k-1 and the N packets up to and including k-1. The
sender's window is thus [k-N,k-1]. By these arguments, the senders window is of
size 3 and begins somewhere in the range [k-N,k].
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
back.Because the sender has sent packets [k-N, k-1], it must be the case that the
sender has already received an ACK for k-N-1. Once the receiver has sent an ACK
for k-N-1 it will never send an ACK that is less that k-N-1. Thus the range of in-
flight ACK values can range from k-N-1 to k-1.
P24
a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at
0t
.
At
1t
)01( tt �
the receiver ACKS 1, 2, 3. At
2t
)12( tt �
the sender times out
and resends 1, 2, 3. At
3t
the receiver receives the duplicates and re-
acknowledges 1, 2, 3. At
4t
the sender receives the ACKs that the receiver sent
at
1t
and advances its window to 4, 5, 6. At
5t
the sender receives the ACKs 1,
2, 3 the receiver sent at
2t
. These ACKs are outside its window.
b) True. By essentially the same scenario as in (a).
c) True.
d) True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol
are functionally equivalent. The window size of 1 precludes the possibility of out-
of-order packets (within the window). A cumulative ACK is just an ordinary ACK
in this situation, since it can only refer to the single packet within the window.
P26
There are
2964,294,967,2
32
�
possible sequence numbers.
a) The sequence number does not increment by one with each segment. Rather, it
increments by the number of bytes of data sent. So the size of the MSS is irrelevant
-- the maximum size file that can be sent from A to B is simply the number of bytes
representable by
Gbytes4.192
32
�
.
b) The number of segments is
8,012,999
536
2
32
�
�
�
�
�
�
�
. 66 bytes of header get added to each
segment giving a total of 528,857,934 bytes of header. The total number of bytes
transmitted is
932
10824.44528,857,932 ���
bytes.
Thus it would take 249 seconds to transmit the file over a 155~Mbps link.
P27
a) In the second segment from Host A to B, the sequence number is 207, source port
number is 302 and destination port number is 80.
b) If the first segment arrives before the second, in the acknowledgement of the first
arriving segment, the acknowledgement number is 207, the source port number is
80 and the destination port number is 302.
c) If the second segment arrives before the first segment, in the acknowledgement of
the first arriving segment, the acknowledgement number is 127, indicating that it is
still waiting for bytes 127 and onwards.
剩余14页未读,继续阅读
杜拉拉到杜拉拉
- 粉丝: 19
- 资源: 325
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0