IELAB network lab one minute to read TCP three-way handshake, waving four

One minute read TCP three-way handshake, four wave
TCP (Transmission Control Protocol Transmission Control Protocol) is a connection-oriented, reliable transport layer protocol based on a stream of bytes defined by the IETF RFC 793. In the simplified OSI model of computer networks, it completes the fourth layer functions specified in the transport layer. In the Internet protocol suite (Internet protocol suite) in, TCP layer is located above the IP layer, the intermediate layer below the application layer. Often you need a reliable application layer between different hosts, like pipelines are connected, but the IP layer does not provide a mechanism for flow, but to provide an unreliable packet switching. But that also the TCP protocol is a "transmission, transmission, communication," a "control" protocol.
TCP provides reliable full-duplex connection-oriented transport layer protocol. TCP reliability to be guaranteed by a number of methods, the data is then transferred to a method wherein after the data connection is established.
TCP connection process of establishing three-way handshake:
either TCP must establish a connection between communicating parties before transferring data.
Establish a TCP connection is a three-way handshake process. As shown in FIG:
1, the requester (also commonly referred to as a client) sends a SYN segment represents a desire to connect the client server ports, initial sequence number is a.
2, the server sends back a SYN segment with sequence number b as a response. And set as the acknowledgment number sequence number plus 1 (a + 1) as a client to the client acknowledgment SYN packets.
3, the sequence number set to the client server's sequence number plus 1 (b + 1) as an acknowledgment SYN packet to the server segment.
After the completion of the three segments, TCP connection establishment.

TCP disconnect confirm four:
the aforementioned TCP is a transport layer protocol for full duplex connection. Full-duplex means that the same time both sides can transmit data to both, so both sides of the communication must close the connection.
Establish a TCP connection is a three-way handshake process, and terminate the TCP connection will have to pass four times and waved.
: As shown in FIG.
1, the requester (also commonly referred to as client) wants to terminate the connection to send a FIN segment, the sequence number is set to a.
2, the server responds with a confirmation number for the client's sequence number plus 1 (a + 1) of the ACK acknowledgment segment, as a client acknowledgment FIN packets.
3, the server sends a FIN segment terminated (SEQ ID setting is b, the acknowledgment number of a + 1) to the client.
4, the client returns an acknowledgment message (sequence number set to b + 1) as a response.
More than four times to complete the close interaction of the two sides connected to.

As can be seen by the TCP three-way handshake disconnect confirmation and 4, the use of TCP connection-oriented communication system, greatly improving the reliability of data communication, the transmission data and receiving side have a formal interaction before data transmission, the official transmission of data laid a reliable foundation.

TA: Madina

Reprinted: http://www.ie-lab.cn/

Guess you like

Origin blog.csdn.net/spccie/article/details/90669935