Computer Networks · 免费预览
用户数据报协议
传输层的首要任务是把网络的主机到主机投递转变为进程到进程投递;用户数据报协议几乎只做这一件事,不多不少:它增加 16 位端口号——由于操作系统进程号在不同机器间毫无意义,端口号便间接地标识进程;著名端口与端口映射器解决了客户端如何找到服务器的引导问题;另有一个可选校验和,基于延伸到 IP 首部的伪首部计算,用于捕获误投递;报文边界则与发送时完全一致地保留。正因如此,UDP 成为请求-应答协议、实时流,以及一切宁愿自建可靠性、也不愿沿用他人可靠性的应用的合适底层。
1. From Hosts to Processes
From Hosts to Processes
2. The Bootstrap Problem
The Bootstrap Problem
3. The Header and Its One Luxury
The Header and Its One Luxury
4. Choosing the Floor
Choosing the Floor
5. Why ports exist
A single server host runs a name service, a mail service, and a web service. What problem do port numbers solve?
6. Why not process ids
Why doesn't UDP identify processes by their operating system process ids?
7. Finding the server
How does a client learn which port a service listens on?
8. The pseudo-header
UDP's checksum covers fields copied from the IP header as well as UDP's own. What error is this pseudo-header designed to catch?
9. Message boundaries
An application sends two 100-byte requests over UDP, and the receiver issues one big read. What does it get?
10. Choosing UDP
A live voice application must choose a transport. Why might it prefer UDP over a reliable one?
11. Port width
A UDP port number is how many bits wide, giving each host 65536 of them?
12. The famous 53
Which well-known port does the domain name service listen on?
13. The one exception
Which field of the eight-byte UDP header is optional in IPv4 and covers a pseudo-header when used?
14. The directory
Which service, itself at a single well-known port, tells clients which port a given service currently occupies on that host?