Thoughts on a suspected case caused by an MSS Value

Source: Internet
Author: User

The fault that virtualadc wrote in "SLB Fault Diagnosis: a suspected case caused by an MSS value" has aroused my thinking. Many projects I have come into contact with also have SLB, however, we have never encountered this fault. For the fault mentioned by the author, I captured the packet in my experiment environment and tested it. I have two thoughts on this.
Network Environment topology:
650) this. width = 650; "alt =" "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/0233261132-0.jpg "/>
Packet Capture:
650) this. width = 650; "height =" 97 "alt =" "width =" 749 "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131227/0233263034-1.jpg "/>

172.29.141.150 is the client address.
172.29.141.100 is the actual server address
172.29.141.159 is the VIP address on Server Load balancer.

Server Load balancer is deployed in the bypass mode, but no client nat is implemented (the gateway is not deployed in the Server Load balancer instance ). Access process: 1) 172.29.141.150 access 172.29.141.100
2) The Server Load balancer device and the client have three handshakes. 3) the Server Load balancer device then initiates a connection to the server 172.29.141.100. 4) the server and the Server Load balancer device have three handshakes.
We found that the MSS values at both ends were 1440 and there was no difference, and of course there was no fault as mentioned by the original author.

Supplement: MSS is the maximum data segment that can be transmitted by TCP packets each time. To achieve optimal Transmission Performance, TCP usually needs to negotiate the MSS value of both parties when establishing a connection, this value is often replaced by the MTU value when the TCP protocol is implemented (the size of the IP packet header must be reduced by 20 Bytes and the packet header of the TCP data segment is 20 Bytes). Therefore, the MSS is usually 1460. Both parties will determine the maximum MSS value for this connection based on the MSS value provided by both parties. Thought 1: MTU impact on network devices
When two remote PCs are interconnected, their data must pass through many routers and a variety of network media to reach the peer end. The MTU of different media in the network is different, similar to a long water pipe, the MTU is composed of different water pipes of different thickness.) the maximum water volume of the water pipe is determined by the shortest water pipe in the middle. In network communication, the MSS value is further reduced because the MTU value of network devices provided by network equipment manufacturers is different. If there is a low-end or middle-end router in the network, you must configure the tcp mss value for both the Intranet port and Internet port to ensure the consistency of the transmitted data packet size, to prevent applications that cannot be sharded by using PPPoE or NAT in a certain network segment from failing to communicate normally. Note: NAT translation may cause inconsistent MTU values between the two ends. Ii. MTU impact of servers or systems
The IP protocol at the network layer checks the size of each packet from the upper layer protocol, and determines whether to perform "sharding" based on the MTU size of the local machine. The operating system will automatically subcontract and transmit the data that does not meet the requirements according to the MTU value of the Local Machine. Therefore, you can modify the MTU value of the corresponding host to solve these problems:
For windows:
Open the registry and find the following HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters \ Interfaces. There are multiple sub-items under Interfaces. Each sub-item corresponds to one Nic and determines the NIC used by the local machine to connect to the Internet, click the subitem on Interfaces to view the IPAddress item in the key value list. If the key value of IPAddress is the IP address you are looking for, the subitem is the network card you are looking for, and then enter the subitem, right-click the window on the right, select "new"> "double byte value", enter the name "MTU", and press Enter. Double-click "MTU" and enter the MTU value in the modification window. Set the base number to decimal before entering the value. After the configuration, You need to restart the machine to make it take effect.

Linux:
# Ifconfig eth0 mtu number

"Number" indicates the MTU value. After modification, you can run the "ifconfig" command to view the Modification result. To avoid having to modify it every time, we can modify it in the NIC configuration file:
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Mtu= 1000
Save and exit.

There are other possible causes of this fault, which has not been studied yet. Thank you for your comments!

This article is from the "dripping water and stone" blog and will not be reposted!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.