Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure Basic Functions of the TCP Protocol

In the TCP/IP protocol stack, TCP is a connection-oriented transport layer protocol. Before sending data through the TCP protocol, you must first set up a connection. The TCP protocol provides congestion control and ensures reliable data transmission.

Configuration Condition

None

Configure the Size of the TCP Receiving Cache

In some special network environment, you can configure both the size of receiving cache and the size of transmitting cache of a TCP connection so that the network can reach the optimal performance. If the TCP connection receiving cache is not configured, the size of the receiving cache is the default value.

Table 2-15 Configuring the Size of the TCP Receiving Cache

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the size of the TCP receiving cache.

ip tcp recvbuffers buff-size

Mandatory.
By default, the size of the receiving cache is 8192 bytes.

Configure the Size of the TCP Transmitting Cache

In some special network environment, you can configure both the size of receiving cache and the size of transmitting cache of a TCP connection so that the network can reach the optimal performance. If the TCP connection transmitting cache is not configured, the size of the transmitting cache is the default value.

Table 2-16 Configuring the Size of the TCP Transmitting Cache

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the size of the TCP transmitting cache.

ip tcp sendbuffers buff-size

Optional.

By default, the size of the transmitting cache is 8192 bytes.

Configure the Maximum Number of TCP Retransmissions

After the server sends a SYN-ACK packet, if it does not receive a response packet from the client, the server retransmits the packet. If the number of retransmissions exceeds the maximum number of retransmissions defined by the system, the system disconnects the TCP connection.

Table 2-17 Configuring the Maximum Number of TCP Retransmissions

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the maximum number of TCP retransmissions.

ip tcp retransmits retransmits-count

Mandatory.

By default, the maximum number of TCP retransmissions is 3.

Configure the Maximum Length of TCP Packets

The maximum length of TCP packets is the maximum length of data blocks that are sent by the transmitting end of a TCP connection to the receiving end. When a connection is set up, the smaller maximum packet length of the two ends is used as the maximum packet length in sending TCP packets by the two ends. If a TCP packet exceeds the maximum packet length, the transmitting ends fragments the packet before sending it.

Table 2-18 Configuring the Maximum Length of TCP Packets

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the maximum length of TCP packets.

ip tcp segment-size seg-size

Optional.

By default, the maximum length of TCP packets is 512 bytes.

Configure the Maximum TCP Round-Trip Time

The TCP round trip time refers to the time between the timepoint at which the transmitting end sends a TCP packet and the timepoint at which the transmitting end receives the response packet. The maximum TCP round-trip time that is configured during TCP connection setup is taken as the initial value of the TCP round-trip time. The later TCP round-trip time is calculated according to the actual round-trip time. By default, the maximum TCP round-trip time is 3 seconds.

Table 2-19 Configuring the Maximum TCP Round-Trip Time

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the maximum TCP round-trip time.

ip tcp round-trip round-trip-time

Mandatory.

By default, the maximum TCP round-trip time is 3 seconds.

Configure the TCP Connection Idle Time

After a TCP connection is set up, if no data is exchanged, the TCP connection idle time times out. Then TCP performs a keep-alive test. After the maximum number of keep-alive times is reached, the TCP connection is disconnected. By default, the TCP connection idle time is 2 hours.

Table 2-20 Configuring the TCP Connection Idle Time

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the TCP connection idle time.

ip tcp idle-timeout idle-time

Mandatory.

By default, the TCP connection idle time is 14400, and the unit is 0.5 second.

note


  • The unit of the TCP connection idle time is 0.5 second.

     

Configure TCP Connection Setup Waiting Time

The setup of a TCP connection requires three handshakes. After a TCP client sends a connection request packet, it waits for the response from the TCP server before completing connection setup. After the time for waiting for connection setup timeout before a response is received, connection setup is terminated. By default, the time for waiting for setting up a TCP connection is 75 seconds.

Table 2-21 Configuring TCP Connection Setup Waiting Time

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure TCP connection setup waiting time.

ip tcp init-timeout init-time

Mandatory.

By default, the time for waiting for setting up a TCP connection is 150 seconds, and the unit is 0.5 second.

note


  • The unit of the TCP connection setup waiting time is 0.5 second.

     

Configure the Maximum Number of TCP Keep-Alive Times

If no data is exchanged on a TCP connection for TCP connection idle time, a TCP keep-alive packet is sent for keep-alive test. If the keep-alive test fails, a keep-alive test is performed again. If the maximum number of TCP keep-alive times exceeds the threshold, the TCP connection will be disconnected. By default, the maximum number of TCP keep-alive times is 3.

Table 2-22 Configuring the Maximum Number of TCP Keep-Alive Times

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure the maximum number of TCP keep-alive times.

ip tcp keep-count keep-count

Mandatory.

By default, the maximum number of TCP keep-alive times is 3.

Enable the TCP Timestamp

TCP automatically calculates the packet round-trip time according to the serial number of the request packet and that of the response packet. However, the calculation is not accurate. Use of TCP timestamps can revise the problem. The transmitting end adds a timestamp into a packet, and the receiving end sends back the timestamp in the response packet. The transmitting end calculates the packet round-trip time according to the returned timestamp. By default, the function is disabled.

Table 2-23 Enabling the TCP Timestamp

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enable the TCP timestamp.

ip tcp timestamp

Mandatory.

By default, the function is disabled.

Enable TCP Selective Retransmission

After TCP sends a series of packets, if the transmission of one packet fails, the series of packets need to be retransmitted. After TCP selective transmission is enabled, then only the packet that fails to be transmitted needs to be retransmitted. This reduces the system and line cost. By default, the function is disabled.

Table 2-24 Enabling TCP Selective Retransmission

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure TCP selective retransmission.

ip tcp selective-ack

Mandatory.

By default, the function is disabled.