NF Post 11 : TCP and UDP

2001586155sefira/ January 4, 2019/ Uncategorized/ 0 comments

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are 2 types of protocol. Both of them are used for sending packages over the internet, and both are build on top of internet protocol (IP).

These protocols are not the only protocols that work on top of IP, but they are the most common protocols. Here are some description of both TCP and UDP

TCP

TCP is designed to handle multiplexing of process communications on the host, as well as reliability and sequencing. To communicate, a process encapsulates data in a TCP segment header for transmission to another process. In TCP, the data is prepeded with its header. Together with  encasulated payload, TCP header is called TCP segment.

TCP is a connection-oriented protocol. To successfully make a bidirectional communication, TCP uses three steps:

  1. Initializer send a segmen with SYN flag
  2. Responder response back with a segment with SYN and ACK flags
  3. Initializer sends back an ACK flag

This process is called the three ways handshake. Aside from this, There is also a corresponding two-step sequence for closing a connection using the FIN and ACK flags.

Key characteristics of the TCP protocol include:
• Reliable
• Connection-oriented
• Handles sequencing
• Port numbers range from 0 to 65535
• Includes a header (no footer)
• Header plus payload is called a TCP segment

UDP

UDP is a simple protocol. Even from the header, it can be seen that it doesn’t do much. UDP is designed to facilitate multiplexing of process communications on the host, without any of the reliability, sequencing, connection setup and tear down, or any of the frills of TCP.

UDP is useful in cases like streaming music or videos where the demand for them to be real-time leaves no time for re-transmission. Here are some key features of UDP:

• Unreliable
• Connectionless
• Port numbers range from 0 to 65535
• Includes a header (no footer)
• Header plus payload is called a UDP datagram

To make it clearer, here’s the differences between TCP and UDP:

References:

  • img source: https://medium.com/@Meela349588204/tcp-vs-udp-8aba3c4efb72
  • https://support.holmsecurity.com/hc/en-us/articles/212963869-What-is-the-difference-between-TCP-and-UDP-
  • Sherri Davidoff, Jonathan Ham – Network Forensics: Tracking Hackers through Cyberspace (2012, Prentice Hall)
Share this Post

Leave a Comment