Configuration Guide Configuring TCP
To avoid packet fragmentation in the case of a small path MTU, you may configure an MSS for TCPv4 SYN packets.
The MSS in TCPv4 SYN packets will change to the configured value once the device receives the packets. You may
configure an MSS value with reference to the interface MTU.
This configuration applies to a new TCPv6 connection but does not take effect for an existing TCPv6 connection.
8.3.6 Path MTU Discovery
Working Principle
The Path MTU Discovery f stipulated in RFC1191 is used to discover the smallest MTU in a TCP path to avoid fragmentation,
enhancing network bandwidth utilization. The process of TCPv4 Path MTU Discovery is described as follows:
21. The source sends TCP packets with the Don’t Fragment (DF) bit set in the outer IP header.
22. If the outgoing interface MTU value of a router in the TCP path is smaller than the IP packet length, the packet will be
discarded and an ICMP error packet carrying this MTU will be sent to the source.
23. Through parsing the ICMP error packet, the source knows the smallest MTU in the path (path MTU) is.
24. The size of subsequent data segments sent by the source will not surpass the MSS, which is calculated as follows: TCP
MSS = Path MTU – IP header size – TCP header size.
Related Configuration
Enabling Path MTU Discovery
By default, Path MTU Discovery is disabled.
Run the ip tcp path-mtu-discovery command to enable PMTUD in global configuration mode.
In version 10.x, the configuration applies to both IPv4 TCP and IPv6 TCP. In version 11.0 or later, it applies to only
IPv4 TCP. TCPv6 PMTUD is enabled permanently and cannot be disabled.
8.3.7 TCP Keepalive
Working Principle
You may enable TCP keepalive to check whether the peer works normally. If a TCP end does not send packets to the other
end for a period of time (namely idle period), the latter starts sending keepalive packets successively to the former for several
times. If no response packet is received, the TCP connection is considered inactive and then closed.
Related Configuration
Enabling Keepalive
By default, TCP keepalive is disabled.
Run the ip tcp keepalive [interval num1] [times num2] [idle-period num3] command to in global configuration mode
to enable TCP keepalive. See Configuration for parameter description.