The traffic-optimize tcp adjust-mss command sets the maximum segment size (MSS) of TCP packets in a traffic profile.
The undo traffic-optimize tcp adjust-mss command deletes the configured MSS of TCP packets in a traffic profile.
By default, the MSS of TCP packets in a traffic profile is not configured.
Parameter |
Description |
Value |
---|---|---|
value |
Specifies the MSS of TCP packets in a traffic profile. |
The value is an integer that ranges from 128 to 2048, in bytes. |
Usage Scenario
The MSS is an option defined in the TCP protocol and refers to the maximum length of TCP packets that can be received by a device. When setting up a TCP connection, the local and peer devices negotiate an MSS value to determine the maximum data length of TCP packets. If the length of TCP packets sent from the peer device exceeds the MSS value, the packets are fragmented.
To prevent TCP packets from being fragmented, you must configure a proper MSS based on the maximum transmission unit (MTU). The MTU is the option to determine whether IP packets will be fragmented. If the size of an IP packet exceeds the MTU, the IP packet will be fragmented. To ensure that a complete packet is transmitted properly, the MSS value plus all the header lengths (TCP header and IP header) cannot exceed the MTU. For example, a CAPWAP-encapsulated TCP packet consists of an outer IP header (20 bytes), a UDP header (8 bytes), a CAPWAP header (8 bytes), an ETH header (18 bytes), an inner IP header (20 bytes), a TCP header (20 bytes), and TCP data. If the default MTU is 1500 on the device, the MSS value can be set to a maximum of 1406 bytes so that the CAPWAP-encapsulated TCP packet is not fragmented by the device. In case that the CAPWAP header or TCP header carries option fields, it is recommended that you set the MSS to 1380 bytes.
If you run the traffic-optimize tcp adjust-mss command in the same interface view multiple times, only the latest configuration takes effect.