3.1 Introduction and Transport-layer Service
The Transport Layer protocol provides logical communication between application processes running on different computers, meaning that, from an application perspective, it seems that processes running on a variety of computers are directly connected, in fact, in a computer perspective, They have to be routed through a number of routes and various line connections, and the application process uses the logical communication service provided by the transport layer to send the messages without worrying about the details of the transmission of these messages in the physical layer infrastructure
We see that the Transport Layer protocol is implemented in the terminal system rather than in the network route, where the sender, the transport layer, converts the application message received from the application process to the Transport Layer packet, called segments, This conversion is to divide the message into many small chunks and add the transport layer header to the front of each block to become the transport layer segment, and the transport layer transmits the segment to the sender's network layer. Where segment is encapsulated into the network Layer packet (datagram) and sent to the target, it is emphasized that the network routers are only involved in the network layer datagram transmission, that is, they do not involve segment is encapsulated as datagram stage, in the receiver, The network layer extracts the segment from the datagram and then transmits it upward to the transport layer, which processes the received segment, allowing the receiver to apply the data in the segment
3.1.1 Relationship between Transport and Network Layers
In the protocol stack, the transport layer is the upper layer of the network layer,Transport Layer protocol is to provide logical communication between the processes of different hosts, and the Network layer protocol is to provide logical communication between hosts.
There is a good example of the relationship between the network layer and the transport layer, there is a house on the east and West Coast, there are 12 children in each house, they write a letter to each other every week (a total of 144 articles), and then each of the 12 children (cousins) on both sides has a child (ANN and Bill) is responsible for collecting letters to the postman and receiving letters from the postman and distributing them to other children,
In this example, the Postal Service provides logical communication between two houses-from one house to another, not from one person to another, while the two children responsible for collecting and distributing provide logical communication between children, and from the children's point of view, the two children are mail service, Even though these two children are only part of this end-to-end transfer process, in this example:
Application messages = Letters in envelopes
processes = Consins
Housts = Houses
Transport Layer protocol = ANN and Bill
Network-layer protocol = Postal Service
Continuing along this example, we know that Ann and Bill are only working in their own homes, and the Transport Layer protocol, in the terminal, sends a message from the application process to the network edge (that is, the web layer), and vice versa, However, it does not concern how the message is transmitted at the core of the network, such as intermediate routers that are not affected by the information that the transport layer adds to the message.
Suppose now Ann and Biill go on vacation, Susan and Harvey to replace them, but unfortunately the two of them no longer have a fixed date to send and receive, infrequent and often drop letters, so these two people and Ann and Bill provide a different service, make an analogy, Computers will also have different transport layer protocols, and each protocol will probably provide different services to the application
Services like Ann and Bill are affected by the postman, and the transport layer's services are also affected by the network layer, and the transport layer cannot provide this assurance between the hosts if bandwidth and latency guarantees are not provided between the host, but services that the network layer protocol does not provide can sometimes be provided by the transport layer, for example, Even if the underlying network layer does not provide reliable data transfer, the upper layer of transport can provide this service, that is, even if the network layer protocol is lost, tampered with or replicated packet, another example, the Transport layer protocol can be encrypted to ensure that the application message is not read by the intruder, Even if the network layer does not provide this protection to the Transport layer segment
3.1.2 Overview of the Transport Layer in the Internet
Recall the Internet, or more commonly, TCP/IP networks, to provide the application layer with two distinct Transport layer protocol, UDP and TCP, when developing network applications, developers have to choose among them, in section 2.7 we see that when creating sockets, developers need to choose
Before the introduction of TCP and UDP, it is useful to say something about the network layer, the Internet Layer protocol called IP (Internet Protocol), IP provides logical communication between computers, and the IP service model is a best-effort delivery Service, that is, IP will do its best to transfer segments between computers, will not guarantee the orderly delivery of segments, nor guarantee the integrity of the data in segment, so is called the unreliable service, Each host has at least one network layer address, the so-called IP,
Briefly after the IP we say UDP and TCP, their most basic duty is to extend the communication between IP-provided terminal systems to the process running on the terminal system communication, Extending the Host-to-host transport to process-to-process transmissions is called Transport layer multiplexing and splitting, and UDP and TCP also provide integrity checks by including the error detection fields in the segment header. The two smallest service--process-to-process data transfer and error checking are UDP only services, and both IP and UDP are unreliable service
TCP provides other services for the application, first of all reliable data transfer, using flow control,sequence number,acknowledgements,timers and other technologies, TCP guarantees the transfer between processes is orderly , TCP thus turns the service between unreliable terminal systems of IP into reliable inter-process services, and TCP also provides congestion control, a service that is typically provided to the Internet rather than to applications, generally speaking, TCP congestion Control lets all TCP connections do not cause excessive traffic to overwhelm the link between the computers that are being exchanged, TCP tries to allow each connection to enjoy equal bandwidth, by controlling the sending side can be sent to the network rate to control, and UDP is not regulated, Applications that use the UDP protocol can send it a happy time with its happy rate
Introduction of network transport layer and its relationship with network layer