Difference Between TCP And UDP Protocol In Network

TCP is most used protocol in the Internet because it is guarantee to Deliver.
1)TCP -Transmission control protocol
2)it is a connection oriented protocol.
3)Three way handshake happens between client and server.
4)TCP is a reliable data transfer b) Acknowledgment
5)slow transmission of data compare to UDP because it need to send the acknowledgement, and error correction and maintain the three way handshake between client and server.
6)TCP is used to send file like database,where reliability play the first role
7) Here there is no order.
if we send two message we don’t know which message will deliver first.
8)Streaming:Data are read by the stream.
9) Example Email,  HTTP, FTP,SMTP

UDP 1)UDP -User Datagram protocol
2)UDP is connectionless protocol
3)NO 3 way handshake
4)Not a reliable data transer b) No acknowledgment
5)Faster than TCP, because there is no need for error connection and send the acknowledgment.
6)used to send data like video,audio
7)it will send the message in correct order.
First come First out
8)Datagram:Data Packet are send individually like Datagram
9)DNS, DHCP,TFTP,Streaming Media like Windows Media audio files (.WMA)
Ther Reason UDP is faster than TCP.

Is DNS tcp or UDP?
a: UDP by default, but can use both.
Most of the service prefer tcp.
To check which protocol is using Specified service
# netstat -tua | grep ssh
SSH it is using tcp connectivity.

Related post