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