Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Where is TCP used and where is UDP used? And why?

أين يستخدم بروتوكول TCP و أين يستخدم بروتوكول UDP ؟ و لماذا ؟ أو ما السبب و ما الميزة ؟ كلنا نعلم أنه يوجد بروتوكولان للنقل هما TCP و UDP و هناك بعض الخدمات تستخدم الأول و بعضها يستخدم الآخر, و لكن ما السبب و ما الفرق و الميزة لكل منهما ؟

user-image
Question added by هاشم المشارقة , Key Account Manager , Advanced United Systems Ltd. ( A member of Taj Holding Group)
Date Posted: 2013/09/07
tarik RAAZA
by tarik RAAZA

Whereever delay sensitive and Realtime applications are used UDP Protocol is used. Whereever Reliable transmission has to take place, TCP Protocol is used. TCP Ensures each and every packet reaches its destination no matter if retransmission have to take place. So the question is why not always use the TCP. Think of a VoIP Conversation, here we require Realtime communication, and for any reason if the Packets are lost the retransmission of those packets wouldn't be any good, until and unless human experience is not severely impaired. Same is true for Real Time Online Games. 

Mohammad Elwasefy Elsayed
by Mohammad Elwasefy Elsayed , Senior IT Network and Security Engineer , Comlogic-SCC-ITconsultancy

Simply Tcp used in where we need guarantee of delivering the data3-way handcheck

            UDP Used where we don't need a confirmation of delivering the data

both are used with application and for each application there is aport number to be opened

and the compination " IP address + Port number " Called Socket

abdalrahman mohmmad
by abdalrahman mohmmad , IT Support Engineer , mixfm

الاجابات كلها قريبه وصحيحه 

اضيف ان tcp بطيئ بالمقارنه ب udb 

Mohamed ElQadi
by Mohamed ElQadi , Information Technology Director , Fort Arabesque Hotel

- TCP (Transmission Control Protocol) is consider as a connection oriented protocol over IP networking in which guarantees that all sent packests are reached by the destinations, it used three ways handcheck, congestion control, flow control, it consider the most common protocol on the internet.

- UDP ( User Datagram Protocol) is consider a connectionless protocol because it not used any way of flow control or error detection, it's more faster than TCP Protocol, it used for streaming audio and vedios.

 

Khandakar Ashfaqur Rahman
by Khandakar Ashfaqur Rahman , Head Of Network , Smart Network Ltd

TCP and UDP both works at Transport layer.The major differences between TCP and UDP are:

 

a. TCP is connection Oriented and UDP is not connection oriented

b. TCP is a3 phase handhsaking protocol (SYN,ACK and Fin). UDP has only one phase

c. TCP uses sequence number for PKT where UDP does not

d. TCP is reliable and UDP is unreliable

e. UDP is faster than TCP

Mohamed Ramy Tmar
by Mohamed Ramy Tmar , Senior Scheduler Team Lead , Jacobs Engineering SA

The biggest reason, right off the bat, is that all routers and switches on the Internet have the ability to understand it, and route it fast and with great efficiency. As TCP  is a connection-oriented protocol -- it requires a handshake and session between sender and receiver. UDP  can route packets based on a variety of factors.

Harisha M
by Harisha M , Remote FA Engineer/CMP Lead , Alcatel Lucent Managed Solutions Ltd

TCP for reliable sevices and UDP for unreliable sevices

Deleted user
by Deleted user

TCP is a connection-oriented protocol, TCP is suited for applications that require high reliability, and transmission time is relatively less critical... HTTP, HTTPs, FTP, SMTP, Telnet, 

UDP is suitable for applications that need fast, efficient transmission, such as games, DNS, DHCP, TFTP, SNMP, RIP, VOIP.

The speed for TCP is slower than UDP, UDP is faster because there is no error-checking for packets.

TCP header size is20 bytes, but UDP is8.

TCP does Flow Control , Acknowledgement segments and  handshake (SYN, SYN-ACK, ACK) ----- but UDP does not(No handshake (connectionless protocol))

 

Marsed Elamin Elmamoun Ahmed
by Marsed Elamin Elmamoun Ahmed , Senior IT Engineer (Part time) , KHADARNA CO.LTD

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.

Deleted user
by Deleted user

TCP is used for Data traffic and UDP is used for voice packet. sending email use TCP where as if you are calling from skype it uses UDP traffic.

 

TCP has CRC(Cyclic redundany check)  check which means it acknowledge for every single packet sent over the internet whereas UDP is commonly used for voice traffic; once is the packet is lost then there is no acknowledgment for this.

charbel jamous
by charbel jamous , IT Manager , Issa Petrol Trade

dear  sir, 

      please note that the TCP and UDP are network protocols , and in resume  the TCP is used mostly for secure traffic( where you want all the packets to arrive and verifed ) and UPD is used where you dont , example voice communication  like Skype , or other VOIP softwares they consider it is not soo important if you lost0.1 second of voice in the sake of booting speed. 

 

if you need more explanation and more technical please reply and we will . 

 

Regards

 

More Questions Like This