I am using IPERF to send some packets from one PC to another. Following things have been observed while testing MSS (Maximum Segment Size) with IPERF.
Send packets with MSS 开发者_开发技巧= 20 Bytes:
iperf -c 192.168.1.98 -P 1 -i 5 -p 5001 -M 20 -m
We were expecting that the above command will send packets with MSS = 20 Bytes and
MTU = MSS + 40Bytes = 60 Bytes but IPERF shows that MSS = 36 Bytes (MTU = 76 Bytes).We saw that IPERF always sends MSS of size, 12 Bytes less than what we specify.
Here I should point out that the PC from which I send packets is a Linux machine while the one where these packets are received is a Windows machine. We generate packets in Linux using the IPERF command while on the Windows maching JPERF is running where we see information about the incoming packets.
Another important thing is that JPERF on the Windows machine after receiving the packets we sent, says following: MSS and MTU size unknown (TCP_MAXSEG not supported by OS?)
Any idea how/why MSS get decreased?
I don't quite understand this MSS and MTU stuff, but while trying to, I came across the following from Path MTU Discovery on Microsoft's MSDN site:
"In the past, the MSS for a host has been the MTU at the link layer minus 40 bytes for the Internet Protocol (IP) and TCP headers, where no IP or TCP options are in use. [...]
However, support in Windows 2000, Windows XP, and Windows Server 2003 for additional TCP options, such as time stamps, has increased the typical TCP/IP header to 52 or more octets."
That would suggest that the 12 byte difference you observed may be due to options used by the Windows side of the connection.
精彩评论