TCP and UDP
Networking protocols that are part of the Transport Layer: Ensures reliable data transfer and manages data segmentation.
Transport Layer
Sitting below the application layer, the transport layer ensures reliable data transfer between devices,. It manages data segmentation, reassembly, error checking, and flow control. Protocols like TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) operate at this layer.
--> Examples of Application Layer Protocols
ATP, AppleTalk Transaction Protocol 🔵 CUDP, Cyclic UDP 🔵 DCCP, Datagram Congestion Control Protocol 🔵 FCP, Fibre Channel Protocol 🔵 IL, IL Protocol 🔵 MPTCP, Multipath TCP 🔵 NORM, NACK-Oriented Reliable Multicast 🔵 RDP, Reliable Data Protocol 🔵 RUDP, Reliable User Datagram Protocol 🔵 SCTP, Stream Control Transmission Protocol 🔵 SPX, Sequenced Packet Exchange 🔵 SST, Structured Stream Transport 🔵 TCP, Transmission Control Protocol 🔵 UDP, User Datagram Protocol 🔵 UDP-Lite 🔵 µTP, Micro Transport Protocol
How NETWORK COMMUNICATION PROTOCOLS is used, is implemented, or occurs, giving examples
TCP
Also known as Transmission Control Protocol, breaking up data sent over networks into small container of data known as packets.
Packets can be as large as 1500 bytes. They contain many items of metadata, or data that contains information about other data. Items include sequence numbers, checksums, etc. [min 20B TCP header]
Sequence numbers allow packets that arrive out of order to be ordered correctly.
Checksums are like a unique fingerprint, used to verify that a received packet and a sent packet are the same.
Email commonly uses TCP. This is because TCP is reliable and secure, whilst sacrificing speed. Email does not require high speed, but reliability and security are important for ensuring the email is sent and that it is hard to read for attackers.
UDP
UDP (User Datagram Protocol)
Connectionless (No need to establish a connection prior to data transfer)
Relies on the receiver to sort out the data
Packets can be duplicated or out of order
Minimum security (only using checksums)
Has a larger byte capacity (65535B) [min 8B UDP header]
UDP is used for streaming softwares such as video games, and live online communication services, such as zoom and discord voice chats since they require larger packets to be sent.
TCP segments can be as large as the Maximum Segment Size (MSS), which is typically limited by the network's Maximum Transmission Unit (MTU). Most networks have a MTU of 1500 bytes. These segments include various pieces of metadata, such as sequence numbers, checksums, and more, and are typically accompanied by a TCP header, which is at least 20 bytes in size.
See more:
What is the maximum packet size for a TCP connection or how can I get the maximum packet size? - StackOverFlow
UDP uses fragmentation instead, so each fragment has to be < 1500 bytes:
Sending data greater than 1500 bytes over a network with a maximum Ethernet MTU of 1500 bytes would involve a process known as fragmentation. Here's how it works:
Data Division: The data to be sent, which is larger than the 1500-byte MTU, is divided into smaller chunks or fragments.
Fragmentation: Each fragment is assigned a sequence number, and they are sent as separate UDP packets. These fragments are designed to fit within the 1500-byte MTU limit.
Transmission: The fragments are transmitted separately over the network to the destination.
Reassembly: At the receiving end, the UDP packets are received, and the fragments are reassembled in the correct order based on their sequence numbers to reconstruct the original data.
While fragmentation allows for sending data larger than the MTU, it's important to note that fragmentation can introduce overhead and potentially impact performance. It's generally more efficient to adapt the data size to fit within the MTU when possible to avoid fragmentation. This can be achieved by either reducing the data size or using a protocol that supports larger packet sizes if the network allows it.
Key problems or issues related to NETWORK COMMUNICATION PROTOCOLS and how these have been or may be addressed
TCP and UDP Hybrid Approach:
To overcome TCP and UDP limitations, a combined approach is utilized.
TCP secures connections for tasks like retrieving graphical data (websites).
UDP serves real-time functions such as voice calls and live updates (e.g., Discord).