Share this
What You Need to Know About the TCP/IP Transport Layer
by PivIT Global on Mar 8, 2023 7:01:00 AM
The goal of networking is to provide communications between different systems needing data exchange.
However, not all systems operate in the same way. To organize internetworking complexity and overcome the proprietary functionalities of various vendors, the OSI and TCP/IP communications models were created.
Both models represent a network in terms of layers, where each layer has a particular role and is responsible for executing specific functions. This way, any system can exchange information with others, regardless of their architectural differences.
The transport layer in both the OSI and TCP/IP models is responsible for providing a logical connection between communicating hosts and transport services between a source and destination.
This article will provide the following:
- An overview of the TCP/IP transport layer.
- An outline of its functionalities and benefits.
- An explanation of the characteristics of TCP.
- An explanation of the characteristics of UDP.
- An explanation of the differences between reliable and best-effort transport.
Not what you were looking for today? View some of our popular articles:
- Learn the Packet Delivery Process (Default Gateway and ARP) - Pt. 1
- It's About Time – The Importance of NTP for Networks
- Back to the Basics: Is Static or Dynamic Routing Better?
Transport Layer Functions
The transport layer operates between the application and internet layers of the TCP/IP protocol stack. The transport layer of the TCP/IP stack is equivalent to the transport layer of the OSI model, where it resides between the transport and session layers.
The main functionality of the transport layer is to track communications between the applications used on the source and destination hosts. As much as the transport layer successfully operates in general, it cannot guarantee that the data will always arrive in the correct order, not corrupted or that the information will even arrive at the destination device.
TCP and UDP are the two most important transport layer protocols that applications use for exchanging data. Although both protocols manage communications between devices similarly, they operate differently and provide different benefits.
For example, while TCP offers reliability and ensures data delivery, UDP provides best-effort communications without insurance.
________________
Can't get the hardware you need?
Here's what one recent customer had to say:
"That was the fastest delivery, once you had PO I had the equipment in my warehouse." -- Robert W.
Send PivIT a request or connect with our Team in real time using our chat feature.
________________
Understanding Session Multiplexing
Most of the time, multiple communications simultaneously run on a device.
For instance, you will only sometimes be doing just a single thing on your computer. You may be searching the web, downloading files, chatting, or playing games online, all at the same time.
Though some applications use TCP while others use UDP, the transport layer tracks these communications and keeps them separate. The support provided by the transport layer for using multiple TCP and UDP sessions simultaneously over a single link is called session multiplexing.
A single session is created when a device sends data to the destination, which usually involves a replay. Typical network communication on a single device involves numerous applications running over TCP and UDP simultaneously. Both TCP and UDP protocols track the sessions and keep them separate.
When multiple sessions from multiple applications run simultaneously, the transport layer is responsible for identifying the target application to pass data to the appropriate application. This identification is achieved by using the port numbers used in the transport layer.
Each communication between two devices is established from a source to a destination port. The source port is a random number higher than 1023, while the destination port identifies the application used and has a number in the range of 1-1023 (well-known ports predefined for application use).
As shown in the image above, two sessions are running: one TCP and one UDP. The UDP session is needed for communicating with the DNS server and obtaining the public IP address for the domain (website) the PC is trying to open, while the TCP session is for communicating with the web server afterward. The ports (destination ports in the sessions) identifying DNS and HTTP are UDP port 53 and TCP port 80, respectively.
__________________
Is your hardware maintenance plan coming to an end and due for renewal? Be sure to find out the three maintenance optimization strategies you can’t afford to miss in the video below:
__________________
Segmentation and Flow Control
The amount of data that can be sent to the destination depends on the maximum transmission unit (MTU) of the underlying network layers being used, which by default is 1500 bytes for the Ethernet protocol. However, TCP and UDP approach this process differently.
TCP is responsible for breaking up the data from the application layer into smaller segments that will fit the MTU and prepare them for transport in the network.
In contrast, UDP does not provide such segmentation services and relies on the application to perform that when it is required.
Successfully transferring packets between communicating hosts provides better network efficiency. However, when packets are dropped because of congestion or there are not enough processing resources on the devices, TCP introduces retransmissions and latency.
To protect from such issues, a flow control method is used, where everything depends on acknowledgments generated by the receiver.
However, this may slow the overall transmission rate to an unacceptable level in some situations. To overcome this, a mechanism called “windowing” is used. It allows the receiver to notify the sender how much data can receive before replying with an acknowledgment.
TCP Overview
TCP is a connection-oriented protocol that establishes a session connection between the hosts before they start exchanging data traffic. Once the transmission is complete, the session is terminated.
When setting up a connection, TCP creates a session in three steps, and the whole process is called a three-way handshake. In the first step, the source sends a synchronization (SYN) segment with a sequence number of 0.
In the second step, the destination host responds to the received SYN with acknowledgment altogether with an SYN. The acknowledgment value is 1 (always the number that follows the sequence number of the received segment), while the SYN has a sequence number of 0, like in the first initial step.
In the third step, the source host replies to the received SYN from the destination host with acknowledgment of 1, and the TCP session is established.
In the same way, as with the three-way handshake, TCP uses sequence numbers for identifying the segments and acknowledgments.
The communication continues only after successful confirmation, and missed segments are always resent. This approach provides reliable data transmission during the activity of the session.
Moreover, TCP supports error checking, which helps to discover any corruption in the TCP headers. On top of that, TCP also provides recovery services which greatly help in some instances. Last but not least, TCP provides flow control that allows a maximum amount of data to be exchanged at once before an acknowledgment is received.
UDP Overview
Unlike TCP, UDP is a very simple protocol, and most TCP features are not supported. However, it does not make the UDP protocol less valuable. UDP is preferred over TCP in some situations, but we will discuss this briefly.
UDP is a connectionless protocol, so there is no need for a session establishment for one host to send data to another. Because of that, segments are sent without advance notification to the destination host.
UDP also does not use sequencing, so it cannot provide reliability during transmissions. As a result, once segments are sent, there is no way to determine whether they have been successfully received. That’s why UDP is considered a best-effort protocol.
Finally, UDP performs only limited error checking and does not support any mechanism for recovering lost or corrupted packets. Therefore, it relies on the application itself to perform such actions.
Reliable vs. Best-Effort Transport
TCP and UDP protocols have the same goal and responsibilities, but they function almost as opposites based on how they operate and function. Although TCP is a more complex protocol than UDP, they are equally valuable for different applications and services. The following table shows the main functionalities of both protocols, their differences, and their general use.
Same Goal, Different Purpose
Both TCP and UDP have the same responsibility when data traffic is exchanged between hosts.
However, based on their functionalities and the features they support, one would be a better choice in certain situations.
TCP is the protocol when reliability is the goal, such as when downloading files or using email. However, when speed and low latency are the main priority for the communication session, then UDP is the obvious choice.
Therefore, there is no winner between these two transport layer protocols. They have the same responsibilities but are approached differently. That is why some applications use TCP, while others use UDP. Use this guide the next time you need to determine which option is best for you.
PivIT's EXTEND offering can step in to augment your team and remote in to configure your gear with expert-level engineers (SmartHands | EXTEND). If you need someone on-site, we have field services ready at a moment's notice. Get your switches protected today!
Share this
- Configuration Guides (42)
- Switches (26)
- Cisco Routers (25)
- Cisco Switches (19)
- Network Security (19)
- Product Comparisons (19)
- Routing Protocols (19)
- Routers (18)
- Cisco Technical Information (17)
- Network Protocols (17)
- Wireless (17)
- Cisco (15)
- Cisco Security (15)
- Security (15)
- Firewall (14)
- Cisco Wireless (11)
- Router Protocols (11)
- Servers (11)
- cisco asa (10)
- Cisco UCS (9)
- Cisco Catalyst (8)
- Cisco Servers (7)
- Access Control Lists (6)
- Access Points (6)
- Fortinet (6)
- Server Comparisons (6)
- Wireless APs (6)
- Arista Networks (5)
- Cisco ASR (5)
- HPE-Aruba Wireless (5)
- Juniper Mist (5)
- OSPF (5)
- Product Highlight (5)
- HSRP (4)
- SD-WAN (4)
- Switch Comparison (4)
- Aruba Central (3)
- Back To Basics (3)
- Cisco Telephony (3)
- Cybersecurity (3)
- DHCP (3)
- DHCP Snooping (3)
- Dell EMC PowerEdge (3)
- EIGRP (3)
- IT Hardware Solutions (3)
- Internet (3)
- Juniper Networks (3)
- Network Accessories (3)
- Network Automation (3)
- Network Management (3)
- OEM Comparison (3)
- OneCall (3)
- Telephony (3)
- aruba (3)
- Cisco NX-OS (2)
- Cisco Nexus (2)
- Cloud Solutions (2)
- Dell Servers (2)
- Firewall Architecture (2)
- Fortinet NGFWs (2)
- LAN Networks (2)
- Network Time Protocol (2)
- Palo Alto NGFWs (2)
- Rapid PVST+ (2)
- Remote Configuration (2)
- Software Defined Networking (2)
- Storage (2)
- Upgrading Network (2)
- WLAN (2)
- fortigate (2)
- Asset Management (1)
- CPU Usage (1)
- Cisco AIR-CT (1)
- Cisco Aironet (1)
- Cisco ISR (1)
- Cisco Supervisor Engines (1)
- Cisco UCS Manager (1)
- Cognitive Campus (1)
- Dell EMC Data Domain (1)
- Edge Switches (1)
- Fabric Extenders (1)
- GRE Tunnel (1)
- HPE BL (1)
- Juniper SRX (1)
- Network Servers (1)
- Nexus Switches (1)
- Nutanix (1)
- Optics (1)
- PowerEdge R740xd (1)
- STP Extension (1)
- Switched Virtual Interface (1)
- TCP (1)
- UCS Fabric Interconnects (1)
- hyperconverge (1)
- March 2023 (5)
- February 2023 (5)
- January 2023 (2)
- December 2022 (3)
- November 2022 (3)
- October 2022 (8)
- September 2022 (9)
- August 2022 (9)
- July 2022 (8)
- June 2022 (9)
- May 2022 (5)
- April 2022 (3)
- March 2022 (1)
- February 2022 (2)
- November 2021 (2)
- October 2021 (1)
- September 2021 (2)
- August 2021 (2)
- July 2021 (3)
- June 2021 (2)
- May 2021 (4)
- April 2021 (4)
- March 2021 (2)
- February 2021 (1)
- January 2021 (2)
- December 2020 (2)
- November 2020 (2)
- October 2020 (2)
- September 2020 (2)
- August 2020 (4)
- July 2020 (5)
- June 2020 (4)
- May 2020 (6)
- April 2020 (2)
- March 2020 (1)
- February 2020 (2)
- January 2020 (2)
- December 2019 (1)
- May 2019 (2)
- April 2019 (7)
- March 2019 (1)
- February 2019 (1)
- January 2019 (3)
- December 2018 (1)
No Comments Yet
Let us know what you think