How to deal with slow access to external websites or TCP connection retransmission problems
This article introduces the description, cause and solution of the problem of slow access to external websites or retransmission of TCP connections after the ECS instance of the Windows Server 2012 system enables the ECN (Explicit Congestion Notification) function.
When using a browser to access an external website on an ECS instance of the Windows Server 2012 system, the access speed is slow or the TCP connection is retransmitted.
The TCP connection retransmission problem can be verified by a packet capture tool (such as Wireshark). As shown in the figure, in the Info information of the same TCP sequence number (Sequence Number) and confirmation number (Acknowledgment Number) in the packet capture result, " "TCP Retransmission" information is the TCP connection retransmission. TCP retransmission (after coding)
The ECN function is enabled on the ECS instance to cause this problem. The details are as follows:
When an ECS instance accesses an external website after enabling the ECN function, it will send a data packet with the ECN bit to the website server, but during the transmission process, if a device in the intermediate link does not support the ECN function, it will directly discard the packet with Packets with ECN bits, which causes this problem to occur.
Explanation The function of ECN is mainly to notify the TCP transport layer when the network is congested, reduce the number of discarded data packets in the TCP connection, and achieve the effects of avoiding retransmission, reducing waiting time, and reducing network jitter. However, the configuration rules of some network devices are not compatible with ECN, such as printers and routers. These devices will treat ECN packets as illegal and drop them, causing problems on the network.
You need to disable the ECN function on the ECS instance, as follows:
1. Remotely connect to the Windows instance.
2. Open the CMD command prompt.
a. Click the Start icon icon in the lower left corner of the desktop, and then click the Search icon icon.
b. Enter cmd in the search box. Click Command Prompt
c. Click Command Prompt.
Go to the Administrator: Command Prompt interface. go to command prompt
3. Run the following command to check the TCP global parameter information.
netsh interface tcp show global
The echo information is as follows. If the value of the ECN function parameter is enabled, it means that the ECN function has been enabled in the operating system of your ECS instance.
4. Execute the following command to disable the ECN function.
netsh interface tcp set global ecncapability=disabled
5. Execute the following command to view the information about TCP global parameters and confirm that the ECN function is disabled.
netsh interface tcp show global
The echo information is as follows, if the value of the ECN function parameter is disabled, it means that the ECN function has been disabled in the operating system of your ECS instance. ECN function off
6. Revisit the external website.
Problem Description
When using a browser to access an external website on an ECS instance of the Windows Server 2012 system, the access speed is slow or the TCP connection is retransmitted.
The TCP connection retransmission problem can be verified by a packet capture tool (such as Wireshark). As shown in the figure, in the Info information of the same TCP sequence number (Sequence Number) and confirmation number (Acknowledgment Number) in the packet capture result, " "TCP Retransmission" information is the TCP connection retransmission. TCP retransmission (after coding)
Problem Causes
The ECN function is enabled on the ECS instance to cause this problem. The details are as follows:
When an ECS instance accesses an external website after enabling the ECN function, it will send a data packet with the ECN bit to the website server, but during the transmission process, if a device in the intermediate link does not support the ECN function, it will directly discard the packet with Packets with ECN bits, which causes this problem to occur.
Explanation The function of ECN is mainly to notify the TCP transport layer when the network is congested, reduce the number of discarded data packets in the TCP connection, and achieve the effects of avoiding retransmission, reducing waiting time, and reducing network jitter. However, the configuration rules of some network devices are not compatible with ECN, such as printers and routers. These devices will treat ECN packets as illegal and drop them, causing problems on the network.
Solution
You need to disable the ECN function on the ECS instance, as follows:
1. Remotely connect to the Windows instance.
2. Open the CMD command prompt.
a. Click the Start icon icon in the lower left corner of the desktop, and then click the Search icon icon.
b. Enter cmd in the search box. Click Command Prompt
c. Click Command Prompt.
Go to the Administrator: Command Prompt interface. go to command prompt
3. Run the following command to check the TCP global parameter information.
netsh interface tcp show global
The echo information is as follows. If the value of the ECN function parameter is enabled, it means that the ECN function has been enabled in the operating system of your ECS instance.
4. Execute the following command to disable the ECN function.
netsh interface tcp set global ecncapability=disabled
5. Execute the following command to view the information about TCP global parameters and confirm that the ECN function is disabled.
netsh interface tcp show global
The echo information is as follows, if the value of the ECN function parameter is disabled, it means that the ECN function has been disabled in the operating system of your ECS instance. ECN function off
6. Revisit the external website.
Related Articles
-
A detailed explanation of Hadoop core architecture HDFS
Knowledge Base Team
-
What Does IOT Mean
Knowledge Base Team
-
6 Optional Technologies for Data Storage
Knowledge Base Team
-
What Is Blockchain Technology
Knowledge Base Team
Explore More Special Offers
-
Short Message Service(SMS) & Mail Service
50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00