TCP/IP 详解 卷1 ch11 User Datagram Protocol

本文深入探讨了UDP协议的特点,包括其不可靠传输特性、与IP分组大小的关系、端口独立性、校验和覆盖范围、分片重组机制、MTU发现机制及与ARP交互过程。此外还介绍了UDP服务器设计的基本要素。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. UDP provides no reliability

 

2. The application needs to worry about the size of the resulting IP datagram. If it exceeds the network's MTU, the IP datagram is fragmented.

 

3. The TCP port numbers are independent of the UDP port numbers. TCP和UDP的端口号是独立的

 

4. The UDP checksum covers the UDP header and the UDP data.

Checksum in the IP header only covers the IP header-it does not cover any data in the IP datagram.

 

5. The IP layer at the destination performs the reassembly, 只有在目的端重组IP分片,但是即使只丢失了一个分片,也要重传整个数据报。

 

6. MTU发现机制,利用:当路由器收到一个需要分片的数据报,而在IP首部设置了不分片的标志比特,则发送ICMP不可达差错报文。

 

7. Interaction Between UDP and ARP

例如:UDP包8192,ARP表为空,会发送6个ARP请求。ARP input queue is LIFO, while UDP is FIFO.

大多数的ARP实现在等待ARP应答时只保留最近传送给目的端的数据报。

 

8. ICMP Source Quench Error

 

9. UDP Server Design

1) Client IP Address and Port Number
2) Destination IP Address

3) UDP Input Queue

most UDP servers are iterative servers. This means a single server process handles all the client requests on a single UDP port (the server's well-known port).

应用程序不知道输入队列何时溢出,溢出的数据报由UDP做丢弃处理。

4) Restricting Local IP Address

Most UDP servers wildcard their local IP address when they create a UDP end point. This means that an incoming UDP datagram destined for the server's port will be accepted on any local interface.

5) Restricting Foreign IP Address

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值