DEV Community

Andrew Despres
Andrew Despres

Posted on

Layer by Layer: The OSI Model Layer 4

Preamble:
This space will be utilized to synthesize my notes and help improve my learning process while I study for the CompTIA Network+ N10-009 certification exam. Please follow along for more Network+ notes and feel free to ask any questions or, if I get something wrong, offer suggestions to correct any mistakes.

Transport Layer (Layer 4)

The Transport layer, also known as the end-to-end layer is where the content of the packets becomes significant.

Imagine your computer is like a busy office, and it needs to communicate with many different websites and services at the same time. The Transport Layer acts like a traffic controller, making sure all the information gets to the right place.

To do this, it assigns a unique number, called a port number, to each application. For example, web pages use port 80, and email uses port 25. This allows your computer to keep track of which information belongs to which application.

The Transport Layer also breaks down large chunks of data into smaller pieces, called segments, and adds the port numbers to each segment. These segments are then sent to the Network Layer, which handles the actual delivery.

You can think of it like this: your computer is sending out many different letters (data), and each letter needs to go to a specific apartment (application). The Transport Layer puts the apartment number (port number) on each letter and makes sure the mail carrier (Network Layer) knows where to deliver it. Keep in mind that the Network and Data-Link layers ignore the port number. The port number becomes a part of the data load and is invisible to those layers. When the data is received at the other end of the communication each segment is decapsulated, identified by its port number and passed onto the appropriate handler at the application layer.

The transport layer also uses 2 main protocols, TCP and UDP. TCP (reliable delivery) is used when all data must arrive, and UDP (unreliable delivery) is used when speed is more important than 100% data arrival.

Devices used at the Transport Layer:

  • Multilayer Switches such as load balancers
  • Security Appliances such as advanced firewalls and intrusion detection devices

Image depicting how a host can receive data from multiple hosts utilizing different port numbers Example of how hosts can utilize different port numbers to send and receive data

This ends today's talk about the Transport Layer of the OSI model. Next time will be a little different as I will go into the upper Layers 5-7 all together as they primarily focus on the application level of services and data presentation. Until next time!

Top comments (0)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

If you found this post helpful, please leave a ❀️ or a friendly comment below!

Okay