What is the difference between UDP and TCP internet protocols?

by on May 15, 2007 · 94 comments· LAST UPDATED December 16, 2007

in , ,

Q. Can you explain the difference between UDP and TCP internet protocol (IP) traffic and its usage with an example?
A. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)is a transportation protocol that is one of the core protocols of the Internet protocol suite. Both TCP and UDP work at transport layer TCP/IP model and both have very different usage.

Difference between TCP and UDP

TCPUDP
Reliability: TCP is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message.Reliability: UDP is connectionless protocol. When you a send a data or message, you don't know if it'll get there, it could get lost on the way. There may be corruption while transferring a message.
Ordered: If you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order.Ordered: If you send two messages out, you don't know what order they'll arrive in i.e. no ordered
Heavyweight: - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together.Lightweight: No ordering of messages, no tracking connections, etc. It's just fire and forget! This means it's a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.
Streaming: Data is read as a "stream," with nothing distinguishing where one packet ends and another begins. There may be multiple packets per read call.Datagrams: Packets are sent individually and are guaranteed to be whole if they arrive. One packet per one read call.
Examples: World Wide Web (Apache TCP port 80), e-mail (SMTP TCP port 25 Postfix MTA), File Transfer Protocol (FTP port 21) and Secure Shell (OpenSSH port 22) etc.Examples: Domain Name System (DNS UDP port 53), streaming media applications such as IPTV or movies, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and online multiplayer games etc

Further readings

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 94 comments… read them below or add one }

1 John February 18, 2008 at 11:40 am

Is there a difference in security maximums between TCP and UDP?

Reply

2 deepak singh January 1, 2014 at 1:41 am

it is a really great difference b/w them ……
by reading the difference i can conclude that
TCP is more advantageous a UDP ..

Reply

3 deepak singh January 1, 2014 at 1:42 am

TCP is more advantageous than a UDP

Reply

4 gaurav February 7, 2014 at 6:47 am

udp is more advantageous than tcp

Reply

5 sumit munje July 11, 2014 at 5:04 am

TCP (Transmission Control Protocol) is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a “guaranteed delivery.” This is due largely in part to a method called “flow control.” Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. This works because if a packet of data is sent, a collision may occur. When this happens, the client re-requests the packet from the server until the whole packet is complete and is identical to its original.

UDP (User Datagram Protocol) is anther commonly used protocol on the Internet. However, UDP is never used to send important data such as webpages, database information, etc; UDP is commonly used for streaming audio and video. Streaming media such as Windows Media audio files (.WMA) , Real Player (.RM), and others use UDP because it offers speed! The reason UDP is faster than TCP is because there is no form of flow control or error correction. The data sent over the Internet is affected by collisions, and errors will be present. Remember that UDP is only concerned with speed. This is the main reason why streaming media is not high quality

Reply

6 Erasmus Omusei January 12, 2009 at 5:27 am

Everything about networking

Reply

7 sha_bajrai March 30, 2009 at 2:54 am

i think there’s an error in this notes…
datagrams is under the TCp and streaming under UDP..is it right??

Reply

8 Elm October 4, 2012 at 6:57 am

Yes baby

Reply

9 nikunj January 27, 2013 at 12:54 pm

no u r wrong….

Reply

10 jagdish June 26, 2009 at 12:09 pm

plz send me noptes of tcp and udp protocols.

Reply

11 Hasan February 3, 2011 at 6:38 am

UDP is connectionless protocol,when you send data it has no conformation data has been received or not.only send data
TCP is connection oriented protocol,when you send data it has confirmation.

Reply

12 walusimbi denniswise July 1, 2009 at 8:46 am

please try to update me every time there a new brochure about udp and tcp

Reply

13 Stevie P April 26, 2014 at 1:57 am

Yes of course, sir. Will there be anything else sir?

Reply

14 Internet Corp June 17, 2014 at 12:44 pm

Internet Corp will be publishing a new brochure soon. The brochure describes our new “UDP Deluxe” packets. These exclusive packets feature more head and leg room for your payload, faster transmission via Cisco(TM) Express Queuing, and guaranteed delivery (conditions apply).
UDP Deluxe packets cost a little more but give you peace of mind. And every UDP Deluxe packet sent earns you frequent flyer points, redeemable on all major VPNs.

(c) Internet Corp.

Reply

15 Girish August 25, 2009 at 5:26 am

At which layer of OSI, UDP and TCP works?

Reply

16 yogesh November 9, 2010 at 4:10 am

Transport layer

Reply

17 mwenesi June 30, 2011 at 2:40 pm

Transport layer

Reply

18 muhammad waqas September 6, 2011 at 7:47 am

transport layer oneof the layers of tcp/ip

Reply

19 ali sofiani April 13, 2014 at 3:34 pm

Transport Layer

Reply

20 Harish Yemula July 14, 2011 at 9:07 am

Transport Layer of the OSI Model.

Reply

21 pardeep June 5, 2014 at 11:56 am

network

Reply

22 dheeraj singh November 9, 2009 at 10:43 am

give the full information on tcp and udp

Reply

23 gopinath December 16, 2010 at 12:38 pm

TCP—Transmission control Protocal and user data gram protocol

Reply

24 Hasan February 3, 2011 at 6:39 am

transmition control protocol,user data protocol

Reply

25 jeyalakshmi June 17, 2013 at 9:52 am

TCP:Transfer Control protocol

UDp:User Defined Protocol

Reply

26 udaya November 10, 2009 at 7:15 am

For every opening a web page there should be a ack to the server?

Reply

27 ali sofiani April 13, 2014 at 3:37 pm

yeah

Reply

28 Rupali March 18, 2010 at 4:27 am

plz send me difference between TCP & UDP

Reply

29 Raghu May 6, 2010 at 8:38 am

Hi Rupali,
The diffrence between TCP and UDP

TCP (Transmission Control Protocol) is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a “guaranteed delivery.” This is due largely in part to a method called “flow control.” Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. This works because if a packet of data is sent, a collision may occur. When this happens, the client re-requests the packet from the server until the whole packet is complete and is identical to its original.

UDP (User Datagram Protocol) is anther commonly used protocol on the Internet. However, UDP is never used to send important data such as webpages, database information, etc; UDP is commonly used for streaming audio and video. Streaming media such as Windows Media audio files (.WMA) , Real Player (.RM), and others use UDP because it offers speed! The reason UDP is faster than TCP is because there is no form of flow control or error correction. The data sent over the Internet is affected by collisions, and errors will be present. Remember that UDP is only concerned with speed. This is the main reason why streaming media is not high quality

Reply

30 Lorato October 19, 2011 at 8:49 am

Thanx a lot i lent a lot, very useful

Reply

31 sasi February 19, 2012 at 7:07 am

thnxxx

Reply

32 Vincent August 13, 2012 at 3:02 am

Thanks a lot Raghu!

Exellent Explanation.

Reply

33 AYSHA October 20, 2012 at 10:24 pm

THANX A LOT
NICE EXPLANATION

Reply

34 vaibhav September 1, 2010 at 3:30 pm

1.TCP and UDP both are core part of internet protocol.
2.Both TCP and UDP are act at the session layer of OSI reference model.

Reply

35 Lorato October 19, 2011 at 8:59 am

Very useful thanx these are some of topics that want to crash my head u no.

Thanx

Reply

36 CHAVEZ October 13, 2013 at 2:59 pm

no 2 is incorrect please TCP and udp it is in transport layer

Reply

37 ali sofiani April 13, 2014 at 3:39 pm

no no no ..it work’s onTransport Layer of OSI Layer

Reply

38 vikas October 18, 2010 at 7:43 am

mostily we are useing tcp becoz we come to know our data is send or not becoz we get reply in tcp. But in case of utp we cant get any information about our data ……

Reply

39 Harish Yemula July 14, 2011 at 9:11 am

Before you learn a lot on the TCP and UDP Protocols Just Think of the simple Logis is that TCP Is more reliable then UDP But, UDP is More faster then TCP ok.

Reply

40 Faraz Kadri April 28, 2010 at 1:05 pm

Please send me the complete Notes for the CCNA Certification, also send me the Distinguish between all the Protocols

Reply

41 PanditSoft September 8, 2014 at 10:39 am

Certainly Sir, please provide your home address and telephone number so we can send you the notes you have requested. We accept American Express, Visa and Paypal.

Reply

42 Rosa Zheng July 18, 2010 at 9:00 pm

This is very helpful. A follow-up question is: what is the max data transfer speed of UDP vs. that of TCP/IP if a 1.0Gbps Ethernet port is used?

Reply

43 deepika August 9, 2010 at 12:18 pm

hey just explain it little brifely

Reply

44 MD KHADER February 14, 2011 at 6:38 am

TCP (Transmission Control Protocol) is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a “guaranteed delivery.” This is due largely in part to a method called “flow control.” Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. TCP IS DOING THIS WITH HELP OF ACK PACKET ,
UDP (User Datagram Protocol) is anther commonly used protocol on the Internet. However, UDP is never used to send important data such as webpages, database information, etc,BUT UDP IS FASTER THEN TCP

Reply

45 kennedy gikonyo August 3, 2012 at 9:56 am

Am increased by your knowledge…pliz send mi the differences btw handshake protocols via my Email.

Reply

46 vaibhav September 1, 2010 at 3:34 pm

Hey !There is nothing to explain more than above.
Please give the diff. between the OSI layer and SONET layer.

Reply

47 Haris December 11, 2010 at 6:02 am

Thanks for the Information.! Excellent Explanation.

Reply

48 pankaj January 6, 2011 at 12:04 pm

why DNS use two port 53 or 57?

Reply

49 Anirudh March 27, 2011 at 2:09 pm

what is the diff betwen tcp and upd.
detail of osi layers

Reply

50 tcp dude October 3, 2012 at 5:42 am

gadha sala. itna dekhne ke bad bhi nai samja to chhod de. tere bas ki baat nahi hain..

Reply

51 Umer Baloch March 29, 2011 at 8:55 am

==TCP( Transmission Control Protocol)
* Transport Layered
* Suit Protocol
* Acknowledgment
* Error Detection and Correction
* Relaible
* Slow
* Handshakes
* Connection Oriented
* 1 – 65,535 logical Ports
* 1 – 1024 well reserved ports
* 90% used for Data Communication

==UDP ( User Datagram Protocol )
* Transport Layered
* Suit Protocol
* No Acknowledgment
* No Error Detection and Correction
* No relaiblity
* Fast
* Connectionless
* 1 – 65,535 logical Ports
* 1 – 1024 well reserved ports
* 90% of Voice Communcation uses the UDP

CAN ANYONE TELL ME ABOUT ( TCP OPTIMIZATION, TCP WINDOWING and BANDWIDTH OPTIMIZATION)
you can find me here,
mereen_sameer@yahoo.com

Reply

52 Adam April 14, 2011 at 9:58 am

real helpful stuff thanx

Reply

53 Olushola Michael May 19, 2011 at 12:37 am

This is a useful article explaining it all in full details. Other things left are the other protocols that are available or used on the internet.

Reply

54 Hamid September 29, 2011 at 11:14 am

so great and nice

Reply

55 sagar May 21, 2011 at 11:05 am

baahut achha tutorial he, very nice

Reply

56 Vaunn May 23, 2011 at 9:05 am

thanks real helpful summary there by Umer. I appreciate it.

Reply

57 Ritchie June 7, 2011 at 7:57 am

nice explanation,thanks.

Reply

58 nandini August 12, 2011 at 9:19 am

Thanks for the information it is very helpful to me and can any one give the differences between tcp/ip reference model and osi reference model

Reply

59 anil kumar August 27, 2011 at 6:30 am

very useful

Reply

60 udaya September 14, 2011 at 1:30 pm

very useful thanks

Reply

61 Lorato October 19, 2011 at 8:47 am

Please give me details on Signal- encoding strategies under topic ( NETWORKING TECHNOLOGY)

Reply

62 menka October 20, 2011 at 6:23 am

thax alot 4 evry1 its very useful explanation……..

Reply

63 sundeep January 24, 2012 at 8:28 am

TCP (Transmission Control Protocol) is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a “guaranteed delivery.” This is due largely in part to a method called “flow control.” Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. This works because if a packet of data is sent, a collision may occur. When this happens, the client re-requests the packet from the server until the whole packet is complete and is identical to its original.

UDP (User Datagram Protocol) is anther commonly used protocol on the Internet. However, UDP is never used to send important data such as webpages, database information, etc; UDP is commonly used for streaming audio and video. Streaming media such as Windows Media audio files (.WMA) , Real Player (.RM), and others use UDP because it offers speed! The reason UDP is faster than TCP is because there is no form of flow control or error correction. The data sent over the Internet is affected by collisions, and errors will be present. Remember that UDP is only concerned with speed. This is the main reason why streaming media is not high quality

Reply

64 usha December 10, 2012 at 4:12 pm

really informative

Reply

65 Ratan priya October 20, 2011 at 4:22 pm

thanx alot for useful article .

Reply

66 Priya December 16, 2011 at 11:04 am

can any 1 tell me abt how the addressing types(physical addressing,logical,port,special addressing) are related with OSI layers

Reply

67 junaid January 2, 2012 at 8:29 am

any have idea of Bandwidth Calculation..

Reply

68 Thangaraj January 7, 2012 at 2:32 am

Very Nice.. Thanks

Reply

69 Sarita Bishnoi February 9, 2012 at 9:55 am

thanks……………

Reply

70 sejal February 9, 2012 at 3:09 pm

Plz someone tell d port no. of TCP and UDP

Reply

71 sejal February 9, 2012 at 3:10 pm

port no. of tcp and udp??????????

Reply

72 vishnnu February 13, 2012 at 12:18 pm

Tcp port no is 6.
Udp port no is 17..

Reply

73 Sagar May 23, 2012 at 1:24 pm

hey can any one help me in telling me about the applications of UDP…..a detail is needed urgently plzzz frnd…

Reply

74 nisam v June 22, 2012 at 4:44 am

give information about tcp,udp algorithms and its application

Reply

75 Mohd asif khan July 18, 2012 at 6:13 pm

TCP UDP
relible unrelible
delivery report no delivery reprt
slow fast
etc etc

Reply

76 Nii September 18, 2012 at 6:06 am

I like the explanation here but the “English” you guys are using is so terrible and very depressing.

Reply

77 sarwar October 3, 2012 at 3:29 am

Thanks for a consise explanation

Reply

78 manish October 8, 2012 at 1:30 pm

Q1. on which protocal TCP/ UDP both are working at a time

Q2. how many states in MSTP??

Q3. i have 2 router A & B i want to connect both router. and protocol is running OSPF..
and i got error INIT so what is correct ans…

ANY ONE CAN TELL ME PLZ ……I HAVE ANS JUST FOR ANY OR IP MISSMATCH

Reply

79 Piyush kumar bugalia November 21, 2012 at 8:05 am

Thanx for your useful artical.

Reply

80 Aaron June 11, 2013 at 6:44 pm

thanx very useful explanation

Reply

81 Amar Verma June 28, 2013 at 6:32 pm

TCP (Transmission Control Protocol) it is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message.
UDP (User Datagram Protocol) it is connectionless protocol. When you a send a data or message, you don’t know if it’ll get there, it could get lost on the way. There may be corruption while transferring a message.

Reply

82 duaa August 1, 2013 at 3:18 pm

thank you as much ,,, it’s really useful information about them :)

Reply

83 hasan October 11, 2013 at 1:45 am

Good Points… It proves to be useful to me..

Reply

84 Jamal January 28, 2014 at 4:53 pm

I like the fact that my computer network teacher brought me here ;)
i totally found your comments and explanations very useful tho .

Reply

85 imtiyaz February 13, 2014 at 1:21 am

diff is very usefull
thanks

Reply

86 imtiyaz February 13, 2014 at 1:22 am

tkx for exp

Reply

87 jaysell February 18, 2014 at 7:20 am

thank alot…

very useful one…

Reply

88 kiran February 24, 2014 at 4:04 pm

plz send me difference between sip and h323

Reply

89 prayag budhathoki March 9, 2014 at 1:53 am

please send me diffrences between internet and protocol

Reply

90 Boniface Halinga May 5, 2014 at 2:15 am

Very educative and to the point staff. It has really helped me.

Reply

91 ratan May 8, 2014 at 4:06 am

TCP (Transmission Control Protocol) is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a “guaranteed delivery.” This is due largely in part to a method called “flow control.” Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. TCP IS DOING THIS WITH HELP OF ACK PACKET ,
UDP (User Datagram Protocol) is anther commonly used protocol on the Internet. However, UDP is never used to send important data such as webpages, database information, etc,BUT UDP IS FASTER THEN TCP

Reply

92 swaibu ssendagire May 15, 2014 at 7:30 pm

i need to know the definitions of TCP and UDP and similarities

Reply

93 nagesh July 15, 2014 at 10:07 am

wowwwww greatttttttttttttt

Reply

94 Wasim September 8, 2014 at 1:19 pm

nice explaination

Reply

Leave a Comment

Tagged as: , , , , , , , , , ,

Previous Faq:

Next Faq: