The difference between TCP and UDP


At the transport layer of TCP/IP model there are 2 protocols, so called TCP and UDP.

So, what’s the difference between TCP and UDP?

Let’s see the difference and features each other.


The biggest difference between TCP and UDP is the reliability.


In the case of UDP, when it  send packet it don’t secure connections.

Even if packets are lost, UDP don’t resend the packet.


However in the case of TCP, it secure connections before sending the packet.

3 way handshake

TCP secure connections by 3 way handshake.


①Before sending the packet, sender set the ACK flag of TCP header control flags to 1 and send it to receiver.


②Receiver set the SYN flag to 1 with remaining ACK flag to 1, and resend it to sender.

③Finally sender send the TCP header with setting SYN flag to 0 and ACK flag to 1.


When these 3 steps have completed, the connection between sender and receiver have established and data can be exchanged.


Copied title and URL