Skip to main content

I have noticed some confusion between the Ethernet Maximum Transmission Unit (MTU) and the TCP Maximum Segment Size (MSS), hopefully the following will explain it. If you are still (or are now) confused don’t hesitate to add a comment or send me an E-mail asking for clarification.

First, STCP differentiates between TCP segments being sent to a host on a local subnet and segments sent to a host on a remote subnet, i.e. via a router. Segments sent to a host on a local subnet have a MSS that is related to the Ethernet MTU; specifically the MSS is MTU – IP header size – TCP header size. In releases prior to 17.1 (more about 17.1 in a minute) this makes the MSS equal to 1500 – 20 – 20 or 1460. Segments sent to a host on a remote subnet use a MSS of 536. STCP uses the smaller MSS on remote segments due to the requirements in RFC 791 and RFC 879. I discussed how to tune (increase) the MSS and potential problems in an article in the June 2004 Stratus Customer eNewsletter. You can find a copy of the article here. While the article was written using examples from VOS release 14.7 the content is still valid (as of OpenVOS release is 17.1).

The 17.1 release of OpenVOS has added support for jumbo Ethernet frames. Jumbo frames allow more than 1500 bytes in the Ethernet frame, i.e. an increase in the Ethernet MTU. The default MTU is still 1500 but you can increase it when the interface is configured by using the “–mtu” argument (example 1). The maximum value of the MTU argument is 16110 depending on your hardware (see table 1).

ifconfig #sdlmux.m16.11-2 172.16.1.116 -netmask 255.255.255.0 -mtu 9200 -add
Adding interface %phx_vos#sdlmux.m16.11-2 with IP address 172.16.1.116
%phx_vos#sdlmux.m16.11-2: <UP, BROADCAST, RUNNING, NOFORWARDBROADCAST, KEEPALIVE
+,  MTU:9200>
172.16.1.116 netmask 0xffffff00 broadcast 172.16.1.255
Example 1 – setting MTU when configuring an interface

 

Adapter Type MTU
Embedded adapters in V100, V200, V400 1500
Embedded adapters in V150, V250, V300, V500
Embedded adapters in V2302, V2404, V4304, V4408, V6308, V6408
9200
U571V Single-Port 10/100/1000 mbps copper adapter 1500
U574V-LC Dual-Port 1000 mbps fiber adapter
U575V Dual-Port 10/100/1000 mbps copper adapter
U578V Quad-Port 10/100/1000 mbps copper adapter
U582V Quad-Port 10/100/1000 mbps copper adapter
U583V Quad-Port 1000 mbps fiber adapter
9200
U584V Dual-Port 10,000 mbps fiber adapter 16110
U776V Quad-Port 1000 mbps fiber adapter 9200
Table 1 – MTU values by hardware type

 

After setting a larger MTU you can see that STCP will advertise a larger MSS for local connections, 0x23c8 is 9160 decimal.


9:04:55.912 Xmit Ether Dst 00:16:97:c4:01:aa  Src 00:00:a8:41:52:22 Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len   3c, ID    0, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  23fc, Src ac100174, Dst ac10012c
TCP from 172.16.1.116.59410 to 172.16.1.44.9182
    seq  3764213089, ack     n.a., window  8192, 20 data bytes, flags Syn.
    X/Off 0a, Flags 02, Cksum d329,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
      0     2  4 23 c8  3  3  6  4   2  8  a 18 bf 3f d6  0  <<#H<<<< <<<<??V
     10     0  0  0  0

 

But remote connections still get the smaller MSS, 0x218 is 536 decimal.


9:20:34.051 Xmit Ether Dst 00:16:97:c4:01:aa  Src 00:00:a8:41:52:22 Type 0800
+(IP)    
IP   Ver/HL 45, ToS  0, Len   3c, ID    0, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  1086, Src ac100174, Dst c0a8000a
TCP from 172.16.1.116.49186 to 192.168.0.10.9182
    seq  1916893234, ack     n.a., window  8192, 20 data bytes, flags Syn.
    X/Off 0a, Flags 02, Cksum de8e,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
      0     2  4  2 18  3  3  6  4   2  8  a  0  1 69  a  0  <<<<<<<< <<< <i<
     10     0  0  0  0

 

You cannot increase the minimum MSS for remote connections beyond 1460 (1480 with the TCP header)

as:  set_stcp_param min_mss 9160
set_stcp_param: Argument is not within the range allowed. Error in
     'param_value'. [500-1480] allowed
as:

 

Unless both sides of a connection advertise a larger MSS there is no real effect. For example even though the FTP server is configured with an MTU of 9200 and is advertising an MSS of 9160, since the client is advertising an MSS of 1460 (0x5b4), that is the maximum number of bytes that the server will send in a segment.


11:02:49.758 Xmit Ether Dst 00:00:a8:42:3b:6e  Src 00:00:a8:41:52:22 Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len   3c, ID    5, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  2401, Src ac100174, Dst ac100122
TCP from 172.16.1.116.ftp-data to 172.16.1.34.49343
    seq  2092638702, ack     n.a., window  8192, 20 data bytes, flags Syn.
    X/Off 0a, Flags 02, Cksum 7c62,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
      0     2  4 23 c8  3  3  6  4   2  8  a  0 19 5c b5  0  <<#H<<<< <<< <5
     10     0  0  0  0

11:02:49.758 Rcvd Ether Dst 00:00:a8:41:52:22  Src 00:00:a8:42:3b:6e Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len   3c, ID 1bcb, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  083b, Src ac100122, Dst ac100174
TCP from 172.16.1.34.49343 to 172.16.1.116.ftp-data
    seq  3565222463, ack 2092638703, window  8192, 20 data bytes, flags Syn Ack.
    X/Off 0a, Flags 12, Cksum fef7,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
      0     2  4  5 b4  3  3  6  4   2  8  a 13 cc 99  0  0  <<<4<<<< <<<<L>
     10    19 5c b5  0                                       <5

. . . . 

11:02:50.620 Xmit Ether Dst 00:00:a8:42:3b:6e  Src 00:00:a8:41:52:22 Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len  5dc, ID    8, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  1e5e, Src ac100174, Dst ac100122
TCP from 172.16.1.116.ftp-data to 172.16.1.34.49343
    seq  2092638703, ack 3565222464, window   128, 1460 data bytes, flags Push A
+ck.
    X/Off 08, Flags 18, Cksum 7467,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
. . . .

 

Even when both sides advertise the larger MSS there is no guarantee that each frame will contain the maximum amount of data. For example, both client and server are advertising an MSS of 9160 but the segments are only 8204 bytes because that is the maximum that the application is design to send.


11:33:40.492 Xmit Ether Dst 00:00:a8:43:ba:64  Src 00:00:a8:41:52:22 Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len   3c, ID   34, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  231b, Src ac100174, Dst ac1001d9
TCP from 172.16.1.116.ftp-data to 172.16.1.217.49430
    seq   851197707, ack     n.a., window  8192, 20 data bytes, flags Syn.
    X/Off 0a, Flags 02, Cksum d8f7,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
      0     2  4 23 c8  3  3  6  4   2  8  a  0 20 9b 7d  0  <<#H<<<< <<<  >}
     10     0  0  0  0

11:33:40.493 Rcvd Ether Dst 00:00:a8:41:52:22  Src 00:00:a8:43:ba:64 Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len   3c, ID   33, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  231c, Src ac1001d9, Dst ac100174
TCP from 172.16.1.217.49430 to 172.16.1.116.ftp-data
    seq  3989207776, ack  851197708, window  8192, 20 data bytes, flags Syn Ack.
    X/Off 0a, Flags 12, Cksum d75d,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
      0     2  4 23 c8  3  3  6  4   2  8  a  0  e e1 8a  0  <<#H<<<< <<< <a>
     10    20 9b 7d  0                                        >}

. . . .

11:33:40.504 Xmit Ether Dst 00:00:a8:43:ba:64  Src 00:00:a8:41:52:22 Type 0800
+(IP)
IP   Ver/HL 45, ToS  0, Len 2034, ID   37, Flg/Frg    0, TTL 3c,  Prtl  6
          Cksum  0320, Src ac100174, Dst ac1001d9
TCP from 172.16.1.116.ftp-data to 172.16.1.217.49430
    seq   851197708, ack 3989207777, window   128, 8204 data bytes, flags Ack.
    X/Off 08, Flags 10, Cksum ee81,  Urg-> 0000
     offset 0  .  .  .  4  .  .  .   8  .  .  .  C  .  .  .  0...4... 8...C...
. . . .

 

Finally just setting a large MTU on your hosts is not enough; you also have to make sure that all network devices between the two hosts are configured to allow the larger frame size. If not then what you will find is that everything will work correctly when the host uses small (<= 1460) segments, but if it transmits a larger segment, that segment will be dropped by the network device and the connection will eventually fail with a timeout condition of some kind. Larger segments may be sent because the application sends it or because STCP combines smaller segments. This can make for random and very frustrating failures.

© 2024 Stratus Technologies.