How TCP and UDP Work

How TCP and UDP Work

TCP (Transmission Control Protocol) is a standard that defines how to establish and maintain a network conversation through which application programs can exchange data. TCP works with the Internet Protocol (IP), which defines how computers send packets of data to each other.

UDP (User Datagram Protocol) is a communications protocol that is primarily used for establishing low-latency and loss-tolerating connections between applications on the internet. It speeds up transmissions by enabling the transfer of data before an agreement is provided by the receiving party.

TCP : RFC793 (Transmission Control Protocol)

TCP Protocol Header

UDP :RFC 768 (User Datagram Protocol)

Source port and Destination port

These are important to understand to how TCP and UDP works,

others describes in my next article,

  • Ports are used to identify the application on each device
  • Like addresses for application
  • When Application starts a conversation, it chooses a protocol to use as well as a random number to source port (Random port: 1024 – 65536 Range)
  • One process have one port number, one port number can not be given to more than one process at a time

Destination port Number : Port number of server application

This ports have well-known value. Like if you use http > port number is 80 (normally) (0-12023 Range)

  • In this case you have to know about Multiplexing

Multiplexing is aways for one host to have several application accessing the network at once.


01. Additional Features 01. Lightweight
02. Connection Oriented
(Tcp will build and track a connection
between application on pair of hosts before sending data.
when they’re done TCP will close this connection.)
02. ConnectionLess
03. Error Recovery and Good accuracy 03. Does not care about errors
04. Windowing (flow control)04. Not Good accuracy
05. Ordered Data delivery 05. Use on Watching movies, Online games, Voice traffic, Phone calls

TCP is most accuracy one and UDP is most fast one…..

 331 total views,  1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *