- Table of Contents
-
- 04-Layer 3 Configuration Guide
- 00-Preface
- 01-Basic IP Routing Configuration
- 02-Static Routing Configuration
- 03-IPv6 Static Routing Configuration
- 04-IP Addressing Configuration
- 05-IPv6 Basics Configuration
- 06-DHCP Configuration
- 07-DHCPv6 Configuration
- 08-DNS Configuration
- 09-IPv6 DNS Configuration
- 10-IP Performance Optimization Configuration
- 11-ARP Configuration
- 12-IP Forwarding Basics Configuration
- 13-NAT Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
10-IP Performance Optimization Configuration | 93.65 KB |
Configuring TCP MSS for the interface
Configuring TCP path MTU discovery
Configuring the TCP send/receive buffer size
Displaying and maintaining IP performance optimization
This chapter describes multiple features for IP performance optimization.
Configuring TCP attributes
This section provides information about configuring TCP attributes.
Configuring TCP MSS for the interface
The Max Segment Size (MSS) option informs the receiver of the largest segment that the sender is willing to accept. Each end announces the MSS it expects to receive during the TCP connection establishment. The end that receives the MSS value from the other end then limits the size of each TCP segment to be sent.
· If the size of a TCP segment is smaller than the MSS of the other end, the TCP segment is sent to the other end without being fragmented.
· Otherwise, it is fragmented according to the MSS before being sent.
Follow these guidelines when you configure TCP MSS of the interface:
· If you configure a TCP MSS on an interface, the size of each TCP segment received or sent on the interface cannot exceed the MSS value.
· This configuration takes effect only for TCP connections that are established after the configuration rather than the TCP connections that already exist.
· This configuration is effective only for IP packets. If MPLS is enabled on the interface, do not to configure the TCP MSS on the interface.
To configure TCP MSS of the interface:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter interface view. |
interface interface-type interface-number |
N/A |
3. Configure the TCP MSS of the interface. |
tcp mss value |
Optional. The TCP MSS is 1460 bytes by default. |
Configuring TCP path MTU discovery
|
CAUTION: All the devices on the TCP path must be enabled to send ICMP error messages by using the ip unreachables enable command. |
TCP path MTU discovery (in RFC 1191) discovers the path MTU between the source and destination ends of a TCP connection. It works as follows:
1. A TCP source device sends a packet with the Don't Fragment (DF) bit set.
2. A router that fails to forward the packet because it exceeds the MTU on the outgoing interface discards the packet and returns an ICMP error message, which contains the MTU of the outgoing interface.
3. Upon receiving the ICMP message, the TCP source device calculates the current path MTU of the TCP connection.
4. The TCP source device sends subsequent TCP segments that each are smaller than the MSS (MSS =path MTU–IP header length–TCP header length).
If the TCP source device still receives ICMP error messages when the MSS is smaller than 32 bytes, the TCP source device fragments packets.
An ICMP error message received from a router that does not support RFC 1191 has the MTU of the outgoing interface set to 0. Upon receiving the ICMP message, the TCP source device selects the path MTU smaller than the current path MTU from the MTU table as described in RFC 1191 to calculate the TCP MSS. The MTU table contains MTUs of 68, 296, 508, 1006, 1280, 1492, 2002, 4352, 8166, 17914, 32000, and 65535 bytes. Because the minimum TCP MSS specified by the system is 32 bytes, the actual minimum MTU is 72 bytes.
After you enable TCP path MTU discovery, all new TCP connections detect the path MTU. The device uses the path MTU to calculate the MSS to avoid IP fragmentation.
The path MTU uses an aging mechanism to make sure the source device can increase the path MTU when the minimum link MTU on the path increases:
· When the TCP source device receives an ICMP error message, it reduces the path MTU and starts an age timer for the path MTU.
· After the age timer expires, the source device uses a larger MSS in the MTU table as described in RFC 1191.
· If no ICMP error message is received within two minutes, the source device increases the MSS again until the MSS is as large as the MSS negotiated during TCP three-way handshake.
To enable TCP path MTU discovery:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable TCP path MTU discovery. |
tcp path-mtu-discovery [ aging minutes | no-aging ] |
Disabled by default. |
Configuring the TCP send/receive buffer size
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure the size of TCP receive/send buffer. |
tcp window window-size |
Optional. 8 KB by default. |
Configuring TCP timers
You can configure the following TCP timers:
· synwait timer—When sending a SYN packet, TCP starts the synwait timer. If no response packet is received within the synwait timer interval, the TCP connection cannot be created.
· finwait timer—When a TCP connection is changed into FIN_WAIT_2 state, the finwait timer is started.
¡ If no FIN packet is received within the timer interval, the TCP connection is terminated. If a FIN packet is received, the TCP connection state changes to TIME_WAIT.
¡ If a non-FIN packet is received, the system restarts the timer upon receiving the last non-FIN packet. The connection is broken after the timer expires.
The actual finwait timer is determined by the following formula:
Actual finwait timer = (Configured finwait timer – 75) + configured synwait timer
To configure TCP timers:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure the TCP synwait timer. |
tcp timer syn-timeout time-value |
Optional. 75 seconds by default. |
3. Configure the TCP finwait timer. |
tcp timer fin-timeout time-value |
Optional. 675 seconds by default. |
Displaying and maintaining IP performance optimization
Task |
Command |
Remarks |
Display TCP connection statistics. |
display tcp statistics [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display UDP statistics. |
display udp statistics [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display statistics of IP packets. |
display ip statistics [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display ICMP statistics. |
display icmp statistics [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display socket information. |
display ip socket [ socktype sock-type ] [ task-id socket-id ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Clear statistics of IP packets. |
reset ip statistics |
Available in user view. |
Clear statistics of TCP connections. |
reset tcp statistics |
Available in user view. |
Clear statistics of UDP traffic. |
reset udp statistics |
Available in user view. |