< Home

traffic-optimize tcp adjust-mss

Function

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.

Format

traffic-optimize tcp adjust-mss value

undo traffic-optimize tcp adjust-mss

Parameters

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.

Views

Traffic profile view

Default Level

2: Configuration level

Usage Guidelines

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.

Precautions
  • 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.

  • The MSS configured by the traffic-optimize tcp adjust-mss command takes effect on the AP as a TCP client or server. Additionally, if packets of other devices as clients pass through the AP, the negotiation result is modified based on the MSS configured using this command only when the MSS received by the AP is larger than that configured using this command.
  • If you run the traffic-optimize tcp adjust-mss command in the same interface view multiple times, only the latest configuration takes effect.

Example

# Set the MSS of TCP packets to 1200 bytes in the traffic profile p1.

<HUAWEI> system-view
[HUAWEI] wlan
[HUAWEI-wlan-view] traffic-profile name p1
[HUAWEI-wlan-traffic-prof-p1] traffic-optimize tcp adjust-mss 1200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >