Getting Started: Interpreting the transport layer (lower) of OSI Layer 7 network protocol)

Source: Internet
Author: User

The relationship between the transport layer and the network layer

In the protocol stack, the transport layer is located on the network layer. The Transport Layer Protocol provides logical communication for processes running on different hosts, while the network layer protocol provides logical communication for different hosts. The difference is subtle, but important. Let's use a family as an analogy to illustrate this difference.

Suppose there are two houses, one on the East Coast and the other on the West Coast. Each house has 12 children. The children in the East Coast houses and the West Coast houses are siblings. The children in the two houses like to communicate with each other. Every child writes a letter to every brother and sister every week, and each letter is sent in an envelope by the old-fashioned post office. In this way, every week 144 messages will be sent to another one (these children can save a lot of money if they can use e-mails !) In each family, a child, Ann in the West Coast House, and bili in the East Coast House, is responsible for email collection and distribution. Every week, Ann collects letters from her siblings and sends them to the daily delivery staff. When the letter arrives at the West Coast House, Ann delivers the letter to her siblings. Bili has the same job on the East Coast.

In this example, the postal service provides logical communication between the two houses-the Postal Service delivers mail between the two houses, rather than serving each person. On the other hand, Ann and bili provide logical communication between siblings-Ann and bili collect emails from their siblings and deliver the emails to them. Note: from the perspective of these siblings, Ann and bili are mail service personnel, even though they are only part of the end-to-end delivery service (terminal system part ). This example is an image of the relationship between the transport layer and the network layer:

Host (also called Terminal System) = house
Process = siblings

Application message = letter in the envelope
Network Layer Protocol = postal service (including Postman)

Transport Layer Protocol = Ann and Bill

In our example, Ann and Bill respectively do all their work in their home: they are not responsible for the mail classification work of different mail centers and the work of mailing from one center to another. This is the same as the role of the transport layer protocol in the terminal system. In a terminal system, the transport layer protocol transmits messages from application processes to the network edge (that is, the network layer), and vice versa: however, it does not involve how messages are transmitted between the network layer. In fact, as mentioned in section 1, the intermediate router cannot identify or process the information added to the application message by the transport layer.

Let's continue with our example. Assume that both Ann and Bill are on vacation, and another cousin, Susan and Harvey, replaces them to provide email receiving and distribution within the family. Unfortunately, the collection and distribution work provided by Susan and Harvey is not exactly the same as that provided by Ann and Bill. For younger Susan and Harvey, they collect and mail less frequently, and occasionally lose letters (these letters are occasionally eaten by dogs at home ). In this way, Susan and Harvey provide a set of services different from Ann and Bill (that is, the service model is different ). For example, just as a computer network can accept different transport layer protocols, each protocol provides different service models for applications.

The services provided by Ann and Bill are obviously limited by the services provided by the postal service. For example, if the postal service does not provide the maximum time required for mail delivery between two houses (for example, 3 days ), ann and bill cannot guarantee the maximum delay of emails between siblings. Similarly, the services provided by the Transport Layer Protocol are generally limited by the network layer protocol located below it. If the network layer protocol cannot provide latency and bandwidth guarantee for 4-PDU transmitted between hosts, the transport layer protocol cannot provide latency and bandwidth guarantee for messages transmitted between processes.

However, even if the current network layer protocol makes the network layer unable to provide certain services, the transport layer protocol can still provide certain services. For example, even if the following network layer protocols are not reliable, that is to say, even if the network layer protocols are lost, tampered with, or copied to transmitted data packets, the transport layer protocol can also provide reliable data transmission services. Another example is that even if the network layer does not guarantee the confidentiality of 4-PDU, the transport layer protocol can be encrypted to ensure that application messages are not read by the intrusion hacker. We will be gradually exposed to these issues in future articles.

  Transmission Layer on the Internet

Recall that the Internet is usually a TCP/IP network, and the application layer can obtain two different transport layer protocols. Among them, the-protocol is UDP (User datasync
Protocol), which provides an unreliable and connectionless service for calling application processes. The second protocol is TCP (tansmission Control
Protocol), which provides a reliable connection-oriented service for calling application processes. When designing a network application, the application sender must specify one of the two transport protocols.

Before a brief introduction of UDP and TCP, we need to first introduce the network layer of the Internet. The Network Layer Protocol of the Internet has a name-ID, that is, the Internet.
Protocol. The IP address provides logical communication between hosts. The IP service model is a best-effort delivery service. This means that the IP address tries its best to transmit data segments between communication hosts, but does not provide any protection. In particular, it cannot ensure the security of data segment transmission, it cannot ensure the ordered transmission of data segments, and it cannot ensure the data integrity of data segment transmission. For these reasons, IP addresses are called unreliable services. Each host must have an IP address.

After a brief introduction to the IP service model, let's summarize the TCP and UDP service models. The basic responsibility of UDP and TCP is to extend the transfer service between two terminal systems of the IP address to the transfer service between two processes running on the terminal system. The extension of host-transfer to process-process transfer is called multiplexing and multiplexing of applications. UDP and TCP also provide Integrity Detection by adding Error Correction fields to the header. The two smallest transport layer services-process data transfer and Error Detection-are the only two services provided by UDP! In particular, like IP, UDP is an unreliable service, and it cannot ensure that the data sent by a process can reach the target process completely.

On the other hand, TCP provides several additional services for application processes. First and foremost, it provides reliable data transmission. By using data stream control, serial numbers, validation, and timers (we will introduce these techniques later), TCP ensures that data is transmitted from the sender process to the receiver process in a correct and orderly manner. In this way, TCP converts unreliable transmission services between terminal systems of IP addresses into reliable data transmission services between processes. TCP also uses the congestion control mechanism. Congestion Control is not so much a service provided to call processes as a service provided to the entire Internet for the public interest. In general, TCP congestion control prevents any TCP connection from flooding the link and switch during massive data transmission. Specifically, TCP allows TCP connections to share the bandwidth of a connection equally through a crowded network link. This is achieved by adjusting the traffic meters that the sender can transmit to the network through TCP. However, UDP communication traffic cannot be controlled. An application that uses UDP transmission protocol can send data at any speed as needed.

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.