gpt4 book ai didi

tcp - TCP/IP 是否防止数据包重播?

转载 作者:可可西里 更新时间:2023-11-01 02:34:51 24 4
gpt4 key购买 nike

TCP/IP 是否会阻止同一数据包的多个副本到达目的地?还是由端点决定在它上面层幂等逻辑?

如果可能,请引用 TCP/IP 规范中的特定段落。

最佳答案

从重复数据包中恢复是 TCP 堆栈的工作:

The TCP must recover from data that is damaged, lost, duplicated, or delivered out of order by the internet communication system. This is achieved by assigning a sequence number to each octet transmitted, and requiring a positive acknowledgment (ACK) from the receiving TCP. If the ACK is not received within a timeout interval, the data is retransmitted. At the receiver, the sequence numbers are used to correctly order segments that may be received out of order and to eliminate duplicates. Damage is handled by adding a checksum to each segment transmitted, checking it at the receiver, and discarding damaged segments.

-- RFC 793 - 传输控制协议(protocol),第 1.5 节

但是,如果它们是具有新序列号的相同数据包,则不会。

关于tcp - TCP/IP 是否防止数据包重播?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/141128/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com