The OSI Model defines the flow of the network traffic between the source and destination. If the traffic is initiated by a user using an Application on OSI Model, It goes to different layers including the Transport layer. The transport layer is responsible for the end-to-end delivery of the data from source to destination either using TCP or UDP.
In this article, we will discuss the differences between Transmission Control Protocol and the User Datagram protocol.
Transmission Control Protocol (TCP)
TCP stands for Transmission Control Protocol. It is one of the transport layer protocols. TCP protocol number is 6.
TCP protocol works on Layer 4 of the OSI (Open System Interconnection) model. This is the most widely used protocol in the network. TCP stands just before to IP header. In simple terms, whenever a data packet encapsulates at layer 7 i.e. Application Layer, then it will first come to the Transport layer, where TCP Header is added to the original data packet. After adding this header (i.e. TCP Header), this data is called Segment.
Before any transmission, TCP first establishes a reliable connection between both sender and receiver using the “Three Way-Handshake“. After that, the data transfer is started between them. Therefore, this protocol is also known as the Connection-Oriented protocol.
TCP guarantees the recipient will receive the data. Each time, whenever data bits, are transmitted from one end to another end, an acknowledgment message is sent to the sender. The next data bits or packets are only sent if the source device properly received acknowledged messages. Therefore, this protocol is known as Reliable Protocol.
TCP can check errors present in Packets. If there are any errors present in the data packet, TCP simply discards that packet and requests the sender to send error-free data packets.
But, due to the overload of delivery and acknowledgment messages, the transmission speed is slow in comparison to UDP (User Datagram Protocol).
Protocols which use TCP : HTTP, HTTPS, FTP, Telnet, SSH.
User Datagram Protocol (UDP)
User Datagram Protocol (UDP) is another transport layer protocol. The UDP protocol number is 17.
User Datagram Protocol (UDP) is an unreliable transport layer protocol, which has no guarantees whether the recipient will receive the data or not. UDP doesn’t have any connection establishment process like Three-Way Handshake in TCP protocol. Therefore, this protocol is also known as a connectionless protocol.
UDP gives a high transmission speed between the sender and receiver. Therefore, it is used in high-speed deserving applications like Live Broadcasts and Telephonic conversations. As UDP doesn’t have an error checking and correction mechanism, therefore, UDP is suitable for purposes where error checking and correction are either not necessary or are performed in the application itself.
Protocol which use UDP : DHCP, DNS.
Common between TCP and UDP
Although, TCP and UDP are different protocols they have some similarities. Both, TCP and UDP protocols are works on the Transport Layer of the OSI Reference Model. The Data from the Application layer first interacts either with TCP or with UDP. TCP or UDP encapsulate their header’s on this data to form a segment and then send this to IP protocol.
- What is OSI Model?
- Difference between TCP/IP and OSI Model
- Types of Network Firewalls in 2023 – Explained in detail
- DORA Process in DHCP
TCP and UDP, both protocols are widely used in network communication. TCP is a connection-oriented, reliable but slow protocol. UDP is a fast, unreliable, and connectionless protocol. Both protocols have their advantages and disadvantages. Some application layer protocols use TCP and some protocols use UDP.
Did you find this guide helpful? Please, comment your views in comment box.