计算机网络第四版习题答案(中文版)

发布时间 : 星期五 文章计算机网络第四版习题答案(中文版)更新完毕开始阅读

第 33 页 共 40 页

IDLE— Connection not established yet.

WAITING— CONNECT has been executed and CALL REQUEST sent. QUEUED— A CALL REQUEST has arrived; no LISTEN yet. ESTABLISHED— The connection has been established.

SENDING— The user is waiting for permission to send a packet. RECEIVING— A RECEIVE has been done.

DISCONNECTING— A DISCONNECT has been done locally.

答:该传输实体有可能死锁。当双方同时执行RECEIVE 时就会进入死锁状态。

6-10 Out of curiosity, the implementer of the transport entity of Fig. 6-20 has decided to put counters inside the sleep procedure to collect statistics about the conn array. Among these are the number of connections in each of the seven possible states, ni (i = 1, ... ,7). After writing a massive FORTRAN program to analyze the data, our implementer discovers that the relation Sni = MAX_CONN appears to always be true. Are there any other invariants involving only these seven variables? 答:有, n2+n3+n6+n7=1

因为状态listening(n2)、waiting(n 3)、sending(n6)和receiving(n7)都意味着用户被封锁,因此当处在其中的一个状态时,就不可能是在另一个状态。

6-11 What happens when the user of the transport entity given in Fig. 6-20 sends a zero-length message? Discuss the significance of your answer. 答:长度为零的报文被另一边接收。这种报文的发送可以被用来表示文件结束的信号。

第 34 页 共 40 页

6-12 For each event that can potentially occur in the transport entity of Fig. 6-20, tell whether it is legal when the user is sleeping in sending state. 答:因为文件处于封锁状态,所有的传输层原语都不可能执行。因此,仅分组到达事件是可能的,而且还不是所有的到达事件。事实上,仅仅跟呼叫请求、清除请求、数据分组和信用量分组这几个分组到达有关的事件是合法的。

6-13 Discuss the advantages and disadvantages of credits versus sliding window protocols. 答:滑动窗口协议比较简单,仅需要管理窗口边缘一组参数,而且,对于到达顺序有错的TPDU 不会引起窗口增加和减少方面的问题。然而,信用量方案比较灵活,允许独立于确认,动态的管理缓冲区。

6-14 Why does UDP exist? Would it not have been enough to just let user processes send raw IP packets? 答:仅仅使用IP 分组还不够。IP 分组包含IP 地址,该地址指定一个目的地机器。一旦这样的分组到达了目的地机器,网络控制程序如何知道该把它交给哪个进程呢?UDP 分组包含一个目的地端口,这一信息是必须的,因为有了它,分组才能够被投递给正确的进程。

6-15 Consider a simple application-level protocol built on top of UDP that allows a client to retrieve a file from a remote server residing at a well-known address. The client first sends a request with file name, and the server responds with a sequence of data packets containing different parts of the requested file. To ensure reliability and sequenced delivery, client and server use a stop-and-wait protocol. Ignoring the obvious performance issue, do you see a problem with this protocol? Think carefully about the possibility of processes crashing. 客户有可能得到错误的文件。假设客户A发送了一个对于文件f1的请求,然后就崩溃了。另一个客户B接着使用相同的协议请求另一个文件f2。假设客户B运行在与A相同的机器上(具有相同的IP地址) ,把它的UDP套接字连接到与A先前用过的相同的端口上。此外,假设B的请求丢失了,当服务器的应答(对A的请求)到达时,客户B将接收并猜想着是给它自己的应答。

6-18 Both UDP and TCP use port numbers to identify the destination entity when delivering a message. Give two reasons for why these protocols invented a new abstract ID (port numbers), instead of using process IDs, which already existed when these protocols were designed. 有三个原因。第一,进程ID是OS特定的,使用进程ID将使得协议OS依赖;第二,一个单一的进程可能建立多个通信通道,单一的进程ID(每个进程)作为目的标识符不能被用来区别这些通道;第三,进程很容易监听众所周知的端口,但众所周知的进程ID是不可能的。

第 35 页 共 40 页

6-19 What is the total size of the minimum TCP MTU, including TCP and IP overhead but not including data link layer overhead? 默认的分段是536bytes。TCP增加20 bytes ,IP也是如此,造成默认合计576 bytes。

6-20 Datagram fragmentation and reassembly are handled by IP and are invisible to TCP. Does this mean that TCP does not have to worry about data arriving in the wrong order? 答:尽管到达的每个数据报都是完整的,但可能到达的数据报的顺序是错误的,因此,TCP必须准备适当的重组报文的各个部分。

6-23 A process on host 1 has been assigned port p, and a process on host 2 has been assigned port q. Is it possible for there to be two or more TCP connections between these two ports at the same time?

答:不可以。一条连接仅仅用它的套接口标识。因此,(1,p)-(2,q)是在这两个端口之间唯一可能的连接。

第 36 页 共 40 页

联系合同范文客服:xxxxx#qq.com(#替换为@)