IBM Support

What is MSS (Maximum Segment Size) and how it is Calculated?

Question & Answer


Question

What is MSS (Maximum Segment Size) and how it is Calculated?

Answer


What is maximum segment size (MSS)?

- The maximum segment size (MSS) is the largest amount of data specified in bytes that a communication
device can receive in single, unfragmented packet.

- This Maximum Segment Size (MSS) announcement is sent in SYN packet notifying remote end that "I can
accept TCP segments up to specific size in bytes”.

- The MSS advertised by each end can be different depending on their configuration.

- The MSS is only data portion in the packet, it does not include the TCP header or the IP header.

MSS = MTU – size of(TCPHDR) – size of(IPHDR) – size of (IPSEC)*
*if IP SEC is enabled

How MSS is determined?

Following flow charts demonstrates how MSS is determined based on configuration and destination IP.



Example of SYN Packets with MSS:

When connection is established, each end announces the MSS it expects to receive. An MSS option can only appear in SYN packet from each end.

In Packet Number 1, host with IP 2.0.0.205 sent SYN with mss=1460 and in Packet Number 2, host with IP 2.0.0.239 sent with SYN with mss=1460.

Packet Number 1
ETH: ====( 74 bytes transmitted on interface en5 )==== 17:19:48.667571643
ETH:    [ 00:02:55:4f:9a:1c -> 00:09:6b:6b:46:5e ]  type 800  (IP)
IP:     < SRC =     2.0.0.205 >
IP:     < DST =     2.0.0.239 >
IP:     ip_v=4, ip_hl=20, ip_tos=16, ip_len=60, ip_id=14994, ip_off=0
IP:     ip_ttl=60, ip_sum=3857 (valid), ip_p = 6 (TCP)
TCP:    <source port=32856, destination port=23(telnet) >
TCP:    th_seq=3797677451, th_ack=0
TCP:    th_off=10, flags<SYN>
TCP:    th_win=16384, th_sum=8dd7 (valid), th_urp=0
TCP:            mss 1460

Packet Number 2
ETH: ====( 60 bytes received on interface en5 )==== 17:19:48.667771864
ETH:    [ 00:09:6b:6b:46:5e -> 00:02:55:4f:9a:1c ]  type 800  (IP)
IP:     < SRC =     2.0.0.239 >
IP:     < DST =     2.0.0.205 >
IP:     ip_v=4, ip_hl=20, ip_tos=0, ip_len=44, ip_id=64798, ip_off=0 DF
IP:     ip_ttl=60, ip_sum=35ea (valid), ip_p = 6 (TCP)
TCP:    <source port=23(telnet), destination port=32856 >
TCP:    th_seq=3654996708, th_ack=3797677452
TCP:    th_off=6, flags<SYN | ACK>
TCP:    th_win=65535, th_sum=873b (valid), th_urp=0
TCP:            mss 1460

Example # 1:


Example # 2:



Example # 3:



Example # 4:


Example # 5:

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Network communications","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1024368