Morning everyone, I'm Samantha!
In the last course, I learned the common protocols of the application layer. This week, I'm studying the functions and protocols of the transmission layer.
The transmission layer defines end-to-end between host applications (Communication between two networks devices at the most ends of a data transmission path) Connectivity of. The two most common protocols at the transmission layer are the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
The transmission layer provides the following functions:
1. Reliable Transmission Control Protocol (Transmission Control Protocol)
Transmission Layer Usage TCP to provide reliable transmission of communication data. TCP is a reliable transmission mode because it has many mechanisms to ensure reliability.
Before TCP is used to transmit data, the two parties establish a mutual trust channel to transmit data.
Take the three
handshakes as an example:
The three handshakes indicates that TCP uses three data packets to confirm that both communication parties are normal.
A and B use TCP as the transmission layer transport to transfer data, and the process is roughly summarized as follows.
A says hello to B and says, “Hello
, I want to set up a TCP connection with you. Is that OK?”
After receiving the greeting from A, B will say, "Hello, you can do it.
" The connection from A to B is set up.
When replying to A, B also applies to A for establishing a connection. B will say to A, "Hello, I want to set up a TCP connection with you. Is that OK?"
In addition to receiving the confirmation from B, A also receives the application from B. After receiving the application, A sends a confirmation to B.
Then, the connection between B and A is established.
This process is called TCP three-way handshake. When both parties confirm the establishment of the connection, data is transferred.
This is the reliable transmission, it provides reliable service.
2. Unreliable transmission mode (User Datagram Protocol)
The unreliable transmission method in the transport layer is the UDP protocol. If UDP is chosen to deliver data, it does not establish a connection first, as TCP does, but delivers it directly, regardless of whether the other party exists or not, and regardless of whether the other party is OK or not. If the segment cannot be sent to the other side due to network failure, the UDP protocol layer does not return any error message to the application layer.
For example, A and B use UDP to transfer data. The process is as follows.
User A directly transfers the data to user B without any greetings. Whether or not B can receive this data.
UDP is a stateless transmission protocol, so it transfers data very quickly, but this transport mode is not reliable, it is a best-effort transport.
3. Packet segmentation
This is a function of TCP, when the user sends data before the 3 handshakes, the size of the maximum message segment length between the two ends is negotiated, and then the data is separated according to this value when it is sent out.
The MSS is used to prevent data from being segmented or fragmented due to link bandwidth bottlenecks during data transmission.
For example, when user A 3 handshakes with user B, the negotiated MSS is 200 bytes. In this case, a 1000-byte data needs to be sent. In this case, TCP divides the data into five 200-bytes data segments and marks the data range. Encapsulate the packets one by one and then send them to the peer.
4. Data Segment Reassembly
This is also a function of TCP. When the receiver receives the 5 segments of data sent in the above example, it will unseal and sort the 5 data according to the data range markers and reorganize them into a full 1000 Bytes of data.
5. Flow control
As with the data link layer, the transmission layer is responsible for traffic control. However, traffic control at this layer is on an end-to-end basis, rather than on a single link.
6. Data confirmation and retransmission
There is also an acknowledgement mechanism in TCP. When user A sends a data segment to user B, it will make a backup of this data in Buffer. If user B receives this data, it needs to send an acknowledgement to A to tell A that it received this data, at which point A will clear the previous data cache and send the next data.
If user B does not receive this data, user A will send a copy of the Buffer data again after waiting for a transmission timeout and not receiving an acknowledgement, until the other party sends an acknowledgement before user A sends the next data. If User B never sends an acknowledgement, then User A will retransmit the data the maximum number of times set by the program and may disconnect the TCP connection.
———————————————————————————————————————————————
The transport layer is both the highest layer in the OSI layer model responsible for data communication and the intermediate layer between the lower three layers oriented toward network communication and the higher three layers oriented toward information processing. This layer bridges the gap between the services required by the higher layers and those provided by the network layer, and shields the details of the communication Subnet work from the higher users so that all the higher users see is an end-to-end, user-controllable and configurable, reliable data path between the two transport entities.
The above is my summary of this course. There may be some problems. I hope that I can review my knowledge and enhance my understanding. I also hope that you can point out the mistakes and shortcomings in this course and learn from each other.
Thank you dear all!

