1

Pythonでソケットを使用してファイルを送信しており、これらのファイルの送信中にパケットキャプチャを実行しています。ただし、各パケットは1500バイトではなく1434バイトであることがわかります(システムではMTUが1500バイトに設定されています)。

パケットキャプチャのスクリーンショットをいくつか添付しました。1434バイトではなく1500バイトでパケットを送信する必要がありますが、何が起こっているのか教えてもらえますか?

パケットキャプチャ1 パケットキャプチャ2

4

1 に答える 1

3

TCP sends whatever-sized segments it wants to send over the wire; you can't control that from the socket layer. Perhaps the remote machine is only offering a window big enough to send 1314 bytes of data (1314 + 14 bytes of Ethernet header + 20 bytes of IP header without options + 20 bytes of TCP header without options = 1368), or perhaps the congestion window isn't open wide enough to send more data.

Furthermore, you shouldn't have to control that. TCP provides a sequenced byte stream; packet boundaries are NOT significant in TCP!

于 2012-08-14T17:34:15.263 に答える