Re: Window size less than MSS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 01 October 2004 15:51, Jamie Lokier wrote:
> Please be clear about the difference between _segments_ and
> _fragments_.

To be honest, I've been reading too many RFCs lately, and I'm
probably too confused about them myself right now.

Fragments: IP layer
Segments: TCP layer

Right?

> Berend De Schouwer wrote:
> > In net/ipv4/tcp_output.c there is a chunk of code:
> >
> >         /* Bound mss with half of window */
> >         if (tp->max_window && mss_now > (tp->max_window>>1))
> >                 mss_now = max((tp->max_window>>1), 68U -
> > tp->tcp_header_len);
> >
> > which means the first packet is half of 536, or 268 bytes.
> > If I change it, I can connect.
> >
> > Why /2?  Why not run:
> >
> >         /* Bound mss with window */
> >         if (tp->max_window && mss_now > (tp->max_window))
> >                 mss_now = max((tp->max_window), 68U -
> > tp->tcp_header_len);
>
> Why do you want to make the MSS larger?
>
> You said:
> > The server doesn't reassemble fragments, so I need to send 311
> > bytes of data on a TCP stream, in one fragment.
>
> Making the MSS smaller doesn't create any fragments.  It makes more
> TCP segments, but does not create any IP fragments (which are pieces
> of segments, when a segment is too large for an interface to transmit
> as one IP packet).

My confusion comes from reading network dumps.  As soon as there are
more TCP segments, there are also more IP fragments, right?

I'll need to pay more attention to the IP flags.

> Do you instead mean that the server doesn't reassemble _segments_?
> Even when those segments are transmitted consecutively?

I think so :)  I'll cut-and-paste the headers, as reported by tcpdump
here.  I can e-mail a whole dump, and lots of other info, to some people,
but I didn't want to flood the list.

09:37:41.039607 IP (tos 0x0, ttl  64, id 40412, offset 0, flags [DF], length: 60) 10.16.2.143.32768 > 192.168.4.2.1023: S [tcp sum ok] 3746211625:3746211625(0) win 5840 <mss 1460,sackOK,timestamp 15093 0,nop,wscale 0>
09:37:41.118724 IP (tos 0x0, ttl  59, id 22622, offset 0, flags [none], length: 44) 192.168.4.2.1023 > 10.16.2.143.32768: S [tcp sum ok] 1626351996:1626351996(0) ack 3746211626 win 536 <mss 1460>
09:37:41.118761 IP (tos 0x0, ttl  64, id 40413, offset 0, flags [DF], length: 40) 10.16.2.143.32768 > 192.168.4.2.1023: . [tcp sum ok] ack 1 win 5840
09:37:41.118891 IP (tos 0x0, ttl  64, id 40414, offset 0, flags [DF], length: 308) 10.16.2.143.32768 > 192.168.4.2.1023: . 1:269(268) ack 1win 5840
09:37:41.118904 IP (tos 0x0, ttl  64, id 40415, offset 0, flags [DF], length: 83) 10.16.2.143.32768 > 192.168.4.2.1023: P 269:312(43) ack 1win 5840
09:37:41.331573 IP (tos 0x0, ttl 121, id 8308, offset 0, flags [DF], length: 40) 192.168.4.2.1023 > 10.16.2.143.32768: . [tcp sum ok] ack 312 win 16305
09:37:41.353036 IP (tos 0x0, ttl 121, id 8312, offset 0, flags [DF], length: 68) 192.168.4.2.1023 > 10.16.2.143.32768: P [tcp sum ok] 1:29(28) ack 312 win 16305
09:37:41.353072 IP (tos 0x0, ttl  64, id 40416, offset 0, flags [DF], length: 40) 10.16.2.143.32768 > 192.168.4.2.1023: . [tcp sum ok] ack 29 win 5840
09:37:41.353250 IP (tos 0x0, ttl  64, id 40417, offset 0, flags [DF], length: 40) 10.16.2.143.32768 > 192.168.4.2.1023: F [tcp sum ok] 312:312(0) ack 29 win 5840
09:37:41.374442 IP (tos 0x0, ttl 121, id 8315, offset 0, flags [DF], length: 40) 192.168.4.2.1023 > 10.16.2.143.32768: F [tcp sum ok] 29:29(0) ack 312 win 16305
09:37:41.374476 IP (tos 0x0, ttl  64, id 40418, offset 0, flags [DF], length: 40) 10.16.2.143.32768 > 192.168.4.2.1023: . [tcp sum ok] ack 30 win 5840
09:37:41.457056 IP (tos 0x0, ttl 121, id 8316, offset 0, flags [DF], length: 40) 192.168.4.2.1023 > 10.16.2.143.32768: . [tcp sum ok] ack 313 win 16305


> If that's true, it is a very limited TCP implementation indeed.

I'm certain it's limited.

> -- Jamie
> -
> : send the line "unsubscribe linux-net"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Regards,
Berend
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux