没有合适的资源?快使用搜索试试~ 我知道了~
3170103456-应承峻-作业六1
需积分: 0 0 下载量 99 浏览量
2022-08-03
15:46:17
上传
评论
收藏 119KB PDF 举报
温馨提示
试读
2页
1. In both parts of Fig. 6-6, there is a comment that the value of SERVERPORT mu
资源详情
资源评论
资源推荐
浙江大学《计算机网络》课程课后作业六
应承峻 3170103456
1. In both parts of Fig. 6-6, there is a comment that the value of SERVERPORT must be the
same in both client and server. Why is this so important?
Answer: 客户端中绑定的端口号将被送往服务端对应的端口,如果客户端和服务端的端口不
一致,那么服务端在监听端口时将不会把数据包转发到对应的端口中。
2. Imagine that a two-way handshake rather than a three-way handshake were used to set
up connections. In other words, the third message was not required. Are deadlocks now
possible? Give an example or show that none exist.
Answer: 死锁可能存在,假设 A 发送了一个数据包给 B(Seq=x),当 B 收到数据包时,B 给 A
回复了一个响应(Seq=y, Ack=x),但是响应中途丢失了。则此时 A 以为已经建立了连接,于
是等待 B 发送下一个数据包,而 B 却还在等待 A 发回的响应,两者陷入死锁。
3. Why does UDP exist? Would it not have been enough to just let user processes send raw
IP packets?
Answer:
(1)UDP 协议能够支持无连接的传输协议,不会引入建立连接的延迟,而且 UDP 头格式较小,
适用于一次性传输数据较小的网络应用以及多媒体应用。
(2)不能,如果 UDP 协议没有指明端口,那么服务端接收后将不知道要把数据交给哪个端口
对应的进程。
4. A client sends a 128-byte request to a server located 100 km away over a 1-gigabit optical
fiber. What is the efficiency of the line during the remote procedure call?
Answer:
准备 128B 的数据需要花费 128*8b/1Gbps=0.000001s (忽略不计)
而路上的开销为 0.0005s * 2 = 0.001s
因此总开销 T0 = 0.001s
传输效率为 0.000001/0.001 = 0.1%
5. 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?
Answer:
并不是。即使数据报都到达了,但是其到达的顺序仍然可能产生错误,因此 TCP 仍然需要
重组数据报使其有序。
6. The maximum payload of a TCP segment is 65,495 bytes. Why was such a strange number
chosen?
Answer:
因为 TCP 段的起始部分占用 20 个字节,且 IP 头占用 20 个字节,那么如果 Options 可选不
占用空间,那么最大数据载荷应该是 65535-20-20=65495 字节
艾苛尔
- 粉丝: 26
- 资源: 307
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0