-
Chapter 3 Review Questions
R3.
Describe why
an application developer
might
choose to
run an application
over UDP
rather than TCP?
答
: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. Often, designers of IP telephony and
IP
videoconference
applications
choose
to
run
their
applications
over
UDP
because they want to
avoid TCP
’
s congestion
control. Also, some
applications do not
need the reliable data transfer provided by TCP.
R5.
Is
it
possible
for
an
application
to
enjoy
reliable
data
transfer
even
when the application
runs over UDP? If so, how?
答
:
是的,在
UDP
< br>的协议上添加验证的数据,例如给每个包传输时加个头,并且
设置返回值。
R6.
Consider a
TCP
connection between Host A and
Host B. Suppose that
the
TCP segments traveling from Host A to
Host B have source port number x
and
destination port number y. What are the source and
destination port
numbers for the
segments traveling from Host B to Host A?
答
:The source
port number is y, the destination port number is
x.
R7.
Suppose a process in Host
C has a UDP socket with port number 6789.
Suppose both Host A and Host B each
sends a UDP segment to Host C with
destination
port
number
6789.
Will
both
of
these
segments
be
directed
to
the
same
socket
at
Host
C?
If
so,
how
will
the
process
at
Host
C
know
that
these two segments
originated from two different hosts?
<
/p>
答
:
正确
,
p>
两个部分将针对同一接口。在套接字接口,对于每个收到的片段,操
作系统将提供过程与
IP
地址确定各段的起源。
R8.
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.
答
:
对于每个坚持的连接,
web
服务器会创建一个连接套接字,每个连接套接字
由
4
个数组定义。当主机
C
收到一个请求的时候,
它会检查数据报和段中的
4
个区域,以此决定用哪个区域来接收
TCP
段。因此,
A
< br>和
B
传输的套接字是不一
样的。
每一个套接字的标识符都使用
80
端口作为目的的,但是不同的
资源有不
同的
IP
地址。和
UDP
不同的是,当传输层传输一个
TCP
段至应用层的时候,它
并不需要明确指定
IP
地址,因为套接字标识符会协助它指定。
R14.
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?
答
:110-90=20
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?
答
:90
R15.
True or false?
(F)
a.
The
size
of
the
TCP
RcvWindow
never
changes
throughout
the
duration
of
the connection.
(T)
b.
Suppose
Host
A
is
sending
Host
B
a
large
file
over
a
TCP
connection.
The number of unacknowledged bytes that
A sends cannot exceed the size
of the
receive buffer.
(F)
c.
Host
A
is
sending
Host
B
a
large
file
over
a
TCP
connection.
Assume
Host B has no data to
send Host A. Host B will not send acknowledgments
to Host A because Host B cannot
piggyback the acknowledgments on data.
(T) d. The TCP segment has a field in
its header for RcvWindow .
(F)
e.
Suppose
Host
A
is
sending
a
large
file
to
Host
B
over
a
TCP
connection.
If the sequence number for a segment of
this connection is m, then the
sequence
number for the subsequent segment will necessarily
be m + 1.
(F) f. Suppose
that the last Sample RTT in a TCP connection is
equal to
1 sec. The current value of
Timeout Interval for the connection will
necessarily be
≥
1 sec.
(T)
g.
Suppose
Host
A
sends
one
segment
with
sequence
number
38
and
4
bytes
of
data
over
a
TCP
connection
to
Host
B.
In
this
same
segment
the
acknowledgment number is
necessarily 42.
R17.
True
or
false?Consider
congestion
control
in
the
timer
expires
at the sender,the threshold is set to one half of
its previous
value.
Problems
P1.
Suppose Client A
initiates a Telnet session with Server S. At about
the same time, Client B also initiates
a Telnet session with Server S.
Provide
possible source and destination port numbers for
a. The segments sent from A to S.
The source port number is 467,
destination number is 23.
b. The
segments sent from B to S.
The source
port is 513, the destination number is 23.
c. The segments sent from S to A.
The source port is 23, the destination
number is 467.
d. The segments sent
from S to B.
The source port is 23, the
destination number is 513.
e. If A and
B are different hosts, is it possible that the
source port
number in the segments from
A to S is the same as that from B to S?
Yes.
f. How about if they
are the same host?
No.
P2.
Consider
Figure
3.5.
What
are
the
sources
and
destination
port
values
in
the
segments
flowing
from
the
server
back
to
the
clients
’
processes?
What are the IP addresses in
the network-layer datagrams carrying the
transport-layer segments?
<
/p>
答
:(1)
返回值包含了客户端和服务器
的
IP
地址以及
port
码,
还有用户索求的内
容。
(2)
网络层数据报中携带的
IP
p>
地址包含目的端口的
IP
地址、
port
码、传输层添
加的头(
< br>message
)
、网络层添加的段(
< br>segment
)
。
P5
.
a. Suppose you have the following 2
bytes: 01011100 and 01010110. What
is
the 1s complement of the sum of these 2 bytes?
01011100 + 01010110 = 10110010
取反
= 0110010
b.
Suppose you have the following 2 bytes: 11011010
and 00110110. What
is the 1s complement
of the sum of these 2 bytes?
11011010 +
00110110 = 100010000
去首位补至末位
= 00010001
取反
=
11101110
c. For the bytes in part (a),
give an example where one bit is flipped
in each of the 2 bytes and yet the 1s
complement doesn
’
t change.
P18.
Consider
the
GBN
protocol
with
a
sender
window
size
of
3
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.
答
:
因为窗口大小为
3
p>
,
接收方期待的下一列序号为
k
,
所以
t
时刻发送窗口中
序
列号应为
k,k+1,k+2
。
p>
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.
答
:
由于序列号为
0-1024
,所以在
t
时刻,所有可能的
ACK
序号应为
0
≤
ACK
number
≤
1024.
P19.
Answer true or false to
the following questions and briefly justify
your answer:
(T) a. With the
SR protocol, it is possible for the sender to
receive
an ACK for a packet that falls
outside of its current window.
(T) b.
With GBN, it is possible for the sender to receive
an ACK for a
packet that falls outside
of its current window.
(T) c. The
alternating-bit protocol is the same as the SR
protocol with
a sender and receiver
window size of 1.
(T)
d.
The
alternating-bit
protocol is
the
same
as
the
GBN
protocol
with
a sender and receiver window size of 1.
P21
.
Consider
the
GBN
and
SR
protocols.
Suppose
the
sequence
number
space
is
of
size
k.
What
is
the
largest
allowable
sender
window
that
will
avoid
the occurrence of
problems such as that in Figure 3.27 for each of
these
protocols?
答
:
首先我们必须保证发送窗口和接受窗口中序列号都不重复。假设窗口的序列
号为
x
,那么序列号
n
必须保持
n>=
2x
,才能使窗口中的序列号不重复。
-
-
-
-
-
-
-
-
-
上一篇:英国常见节日英文版
下一篇:WINCC数据库画面引用