Read so many, TCPIP what is (b)

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_32281471/article/details/91072958

This article about 1200 words, reading takes about four minutes
, "This article explains how to achieve reliable TCP transport."

TCP transmission bit like express delivery, express delivery quickly with good luck, others may be delayed by a few days, the road may be sent accidentally lost, after the courier sent to the other party needs to sign to ensure that they take full to express.

TCP transmission may also occur when the loss of data, or send repeatedly transmitted out of sequence problems.

Here is the basis for reliable TCP transport.

How issues 1 TCP segment transmission segment length determination?

Will determine the length of the transmission at the time of establishing a connection (also referred to as the maximum message length, MSS), it is then transmitted to the MSS as a transmission unit.

The process of determining something like this:

Host 1: Big Brother, how to use our MSS 4500? (First handshake)

Host 2: little brother, too much for my pass so much ah, 1400 will pass it, a few times it! (Second handshake)

Host 1: Yes, Big Brother, after 1400 as we have to transport the unit it! (Third handshake)

The substance is selected as a smaller transmission unit between the two.

Issue 2 TCP data transmission is segmented, how to ensure the integrity of the data is received?

By improving the reliability of the serial number and the acknowledgment number.

When the sender sends a data sequence number (SEQ) with data and data length, and the receiver receives this data returns acknowledgment number (ack), ack knows the sender receives this data has been successfully received Arrived.

TCP reliable transport

TCP reliable transport

Question 3 when sending data may be lost, how to resend it?

TCP communications are required to provide high performance in a variety of environments, even if the network congestion (congestion similar) can also ensure this. It will be calculated at every round trip time difference, after the data retransmitted if not received will continue to send a response, the waiting time will be confirmed at 2x, 4x manner exponentially. However, the sender would not have been re-issued, after reaching a fixed number, think that the connection abnormality has occurred, forcibly disconnected.

Reply data is not transmitted multiple times, after a period of time to disconnect

Reply data is not transmitted multiple times, after a period of time to disconnect

Question 4 confirm that they received before sending the next period after the previous paragraph, how to enhance the transmission speed of it?

TCP uses a window control mechanism.

In simple terms it is sent multiple times over a large range, first whether the other party has not been received, and so after sending over this range, look at the other side where the confiscation segment which is sent segment.

Here, the transmission side has a memory pool, from this pool are cleared out after receiving the corresponding acknowledgment number, when the sender receives acknowledgment same three (same acknowledgment number), the other party will need to send data out. Because the transmission repeatedly confirmed, it means that the corresponding section of the other data is not received.

MSS: Maximum Segment Size The maximum message length

The reason devoted to TCP, since TCP is widely used, a lot of communication will be used TCP, some of the interactive process will be designed like a TCP three-way handshake mode. Also during the interview, asked about the probability test protocol TCP is also extremely high.

◆ ◆ ◆  ◆ 


06

06,2019

Today's big news is announced that Lin Chi-ling married sister, congratulate her, Zhiling sister has always been in my mind, goddess, suddenly felt warm.

In addition 5G license issued today, I think it is a landmark moment, China Mobile, China Unicom, China Telecom, China broadcasting four to obtain a license, 5G from our lives is getting closer. I remember when I was little envious of others QQ chat on mobile phones, with the QQ music songs, and now it has become a basic lifestyle, people have to look forward to the next 5--10 years, network technology will affect our everyday life.


Recommended Reading

Read so many, TCP / IP What is (a)

TCP three-way handshake and broke four times

Vuejs in analog two-way binding implementation


·end·

Sealing lx

Want to share a number of points of public knowledge

Micro Signal: lxfriday_xyz

Guess you like

Origin blog.csdn.net/qq_32281471/article/details/91072958