自从我在 PDP/11 上进行套接字编程以来,IP 分段将处理 IP 数据报(例如 UDP 数据报)大于该段允许的 MTU 的情况。
因此,我可以发送一个大小为 30 kB 的 UDP 数据报,它可能会在以太网上分段为 20 个 1.5 kB 的分段,然后稍后将每个分段分段为三个小于 576 字节的分段,用于某些特定的无线链路,只要所有碎片到达另一端,UDP数据报到达另一端。
然后,我遇到了 node.js 中 UDP 套接字的文档,该文档声称路由器将丢弃不适合下一段 MTU 的数据报。我认为这只是在标头中设置了“不分段”位的数据报的情况,但鉴于 node.js 应该是在网络圈子中具有一定可信度的高质量产品,我想知道我是否遗漏了一些东西,许多路由器现在会将所有数据报视为“不分段?”
这是链接: http ://nodejs.org/api/dgram.html#dgram_socket_send_buf_offset_length_port_address_callback
这是报价:
generally sending a datagram greater than the (receiver) MTU
won't work (the packet gets silently dropped, without informing
the source that the data did not reach its intended recipient).
那么,我错过了什么,还是 node.js 文档需要更新?