Access free live classes and tests on the app
Download
+
Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA
Login Join for Free
avtar
  • ProfileProfile
  • Settings Settings
  • Refer your friendsRefer your friends
  • Sign outSign out
  • Terms & conditions
  • •
  • Privacy policy
  • About
  • •
  • Careers
  • •
  • Blog

© 2023 Sorting Hat Technologies Pvt Ltd

CBSE Class 11 » Difference Between » TCP and UDP
CBSE

TCP and UDP

This article will highlight the difference between TCP and UDP Introduction

Table of Content
  •  

TCP and UDP are two of the most well-known protocols used in computer networking. TCP stands for Transmission Control Protocol and operates on a best-effort principle while UDP uses a datagram approach. This article will highlight the difference between these two protocols.

What is TCP?

Transmission Control Protocol (TCP) is an internet service used for transferring large blocks of data in real-time. A TCP connection works by establishing a virtual circuit between two hosts. The transmission process begins with the sender of the data to connect to the receiver. Once done, all outgoing packets are identified by sequence number and then are transferred in sequence until the end of the connection. The communication is closed after it reaches its maximum number of packets and then it drops any remaining packets in its buffer. 

What is UDP?

User Datagram Protocol (UDP) is a connectionless protocol used in computer networking. It works on the best-effort principle and is not normally used for transferring large blocks of data. This protocol works with destination port numbers which are only 16384 or 65535 by default. The communication can be temporarily stopped by both the sources and recipients at any time.

Difference between TCP and UDP

The biggest difference between TCP and UDP is that they cannot communicate with each other. This implies that you cannot use them together because they are based on different principles. Some other key differences between TCP and UDP are:

1) Packet loss: 

TCP detects packet loss and resends the lost packets, but UDP does not. When a UDP message reaches the receiver it is regarded as being permanently lost. This means that UDP messages are unreliable because they can be lost or duplicated in transit and there is no way to identify a lost message from its source.

2) Connection: 

TCP uses connection-oriented communication that establishes a virtual circuit before transferring data and closes it when all data is transferred. On the other hand, UDP uses connectionless communication in which a single datagram is sent without an establishment of the virtual circuit. This is how UDP works without needing to establish a virtual circuit 

3) Throughput: 

TCP has a throughput of around 500Kbps, while UDP has around 1Mbps. This means that you can transfer more data using TCP but you will get less throughput.

4) Error detection: 

TCP uses Transmission Control Block (TCB) for error detection and retransmission, but UDP does not use any error detection mechanism. Instead, UDP sends out datagrams as they come in from the network. There is no retransmission of missed datagrams or errors detected at the sender in case of UDP sending.

5) Security: 

TCP is a connection-oriented protocol that requires an exchange of sequence numbers, so it gives you data integrity and verification. However, in UDP the datagrams are sent without having any such verification or integrity checks.

6) Connection-oriented:

TCP involves establishment and release of connection, but UDP does not need such establishment or release. This implies that UDP has no maximum limit per datagram so a single host can use the whole bandwidth of its connection to the network interface card (NIC). In TCP, there is a maximum segment size per packet because it establishes a virtual circuit before sending data.

7) Error correction: 

In TCP the protocol has a sliding window algorithm that allows lost or corrupted data to be recovered. However, UDP does not have this mechanism so it simply discards any bad data without notifying the sender or receiver.

8) Connection establishment:

The creation of a connection is established through a handshake sequence by default. This means that both parties agree on communication rules before data transmission, and if one of them fails it is impossible to establish the connection. On the other hand, UDP does not do any handshake sequence but uses packet exchange as an initialization procedure for communication.

9) Transmission Control Block (TCB):

In TCP the datagrams are passed to the Transmission Control Block which is responsible for error control, resets, and retransmission. However, UDP does not use any such mechanism and there is no TCB in the case of UDP datagrams.

10) Reliability: 

In TCP reliable delivery is ensured through sequence numbers and acknowledgments, while in UDP each datagram is sent without any checks whether it has reached its destination or not. This mechanism prevents packet loss. However, in the case of a host getting two packets with the same destination address, both will reach the host because there is no protocol check of the packet that arrived first.

Conclusion:

TCP/IP is a well-known protocol used in networking. It has been developed under the OSI model. It helps transfer packets across the internet and between different LANs within an organization. The TCP/IP protocol provides a data transfer mechanism between systems that are connected to a network. This protocol is very effective as it allows connection-oriented communication. Over the internet, TCP/IP is used to establish virtual circuits.

faq

Frequently asked questions

Get answers to the most common queries related to the Programming Examination Preparation.

What is the difference between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)?

Ans: The main difference between TCP and UDP is that TCP uses a virtual circuit as a connection-oriented protocol. B...Read full

What is a port number in Networking?

Ans: A port is just another address of a computer on the internet. Every program running on a computer has its uniqu...Read full

What is an error detection mechanism in Networking?

Ans: An error detection mechanism refers to the process of detecting errors in data transmission and repairing them....Read full

Ans: The main difference between TCP and UDP is that TCP uses a virtual circuit as a connection-oriented protocol. But UDP uses a datagram approach without establishing any virtual connection. This implies that TCP is more reliable than UDP due to its acknowledgment system which verifies if the data sent reached the receiver or not. The sliding window algorithm of TCP also ensures that the packets exchanged are in the same order as they were originally transmitted.

Ans: A port is just another address of a computer on the internet. Every program running on a computer has its unique port number assigned to it. The port numbers range from 0 to 65535 and the default port numbers for the well-known services are given below:

  1. TCP Ports: 21, 22, 25, 53, 80, 110, 143, 443 and 465.
  2. UDP Ports: 53 and 161

Ans: An error detection mechanism refers to the process of detecting errors in data transmission and repairing them. It means that the sender will detect a problem and take prompt actions to recover from it. In the case of TCP, the transmission control block uses a sliding window that ensures that lost or corrupted datagrams can be recovered and resend by revising the timestamps of both datagrams. But in the case of UDP if a packet is lost and no message acknowledgment is received for two minutes, then the whole datagram is discarded by the sender.

Crack K-12 with Unacademy

Get subscription and access unlimited live and recorded courses from India’s best educators

  • Structured syllabus
  • Daily live classes
  • Ask doubts
  • Tests & practice
Learn more

Notifications

Get all the important information related to the CBSE Class 11 Exam including the process of application, important calendar dates, eligibility criteria, exam centers etc.

Data Correction
Exam Pattern for Class 11th
Registration Process
Syllabus
See all

Related articles

Learn more topics related to Difference Between
Where and Having Clause in SQL

Introduction, when to utilise WHERE and HAVING statements, and contrast between WHERE and HAVING clause.

Turnaround Time and Waiting Time in CPU Scheduling

Are you willing to understand the difference between turnaround time and waiting time in CPU scheduling? So this article is for you. Learn about more such concepts, like the meaning of turnaround time, waiting for time, CPU scheduling and more such ideas.

Testing and Debugging

The test is a technique of examining the platform to uncover problems existing in the program, and not just because, this system involves detecting the defects and specifying what will occur once these faults arise. This method is conducted in the trial phase by the QA team, so after this stage, they will send to the development team to debug.

Structure and Union in C

In this article, we will discuss the definition of Structure, definition of Union and difference between structure and union in c on various aspects.

See all
Access more than

5,130+ courses for CBSE Class 11

Get subscription

Trending Topics

  • Withdrawal Slip
  • Wildlife Conservation
  • Moving Coil Galvanometer
  • Ogive Curves
  • PPT Full Form
  • Reordering Of Sentences
  • Central Problems Of An Economy
  • Transcription In Eukaryotes
combat_iitjee

Important Links

  • NCERT Solutions
  • NCERT Books
  • Physics Formulas
  • Maths Formulas
  • Chemistry Formulas
testseries_iitjee
Download NEET 2022 question paper
.
Company Logo

Unacademy is India’s largest online learning platform. Download our apps to start learning


Starting your preparation?

Call us and we will answer all your questions about learning on Unacademy

Call +91 8585858585

Company
About usShikshodayaCareers
we're hiring
BlogsPrivacy PolicyTerms and Conditions
Help & support
User GuidelinesSite MapRefund PolicyTakedown PolicyGrievance Redressal
Products
Learner appLearner appEducator appEducator appParent appParent app
Popular goals
IIT JEEUPSCSSCCSIR UGC NETNEET UG
Trending exams
GATECATCANTA UGC NETBank Exams
Study material
UPSC Study MaterialNEET UG Study MaterialCA Foundation Study MaterialJEE Study MaterialSSC Study Material

© 2025 Sorting Hat Technologies Pvt Ltd

Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA

Share via

COPY