-->

What are ports ?


These ports are used to connect Countries together. In the same way ports in the computer are used to connect computers together. Basically, in Computer there are two types of IP ( Internet Protocol ) traffic as TCP and UDP.
TCP( Transmission Control Protocol )
UDP(User Datagram Protocol )

As you can see in above picture ports are endpoints of communication between two Computer.

Difference in TCP and UDP:

TCP is connection oriented. Once a connection is established data can be sent bidirectionally.
UDP is simpler, connectionless IP. Multiple messages are sent as packets in chunks using UDP.
as TCP in connection oriented, it is reliable and we can receive data in order as sent by the sender, but this is not the case with UDP. UDP is not reliable.
As we know Headers are used to specify metadata.
TCP header size is 20 bytes, which contains
  1. Source Port
  2. Destination Port
  3. Check Sum
UDP header size is 8 bytes, which contains
  1. Source Port
  2. Destination Port
  3. Check Sum
TCP does error checking and error recovery, Erroneous packets are retransmitted from the source to destination.
but UDP does only error checking and simply discards erroneous pockets. Error recovery is not attempted.
TCP is suited for applications that require high reliability and transmission time is relatively less.
UDP is suited for applications that need fast, efficient transmission, such as games.

For more on Ports, visit other sites, videos or anything that helps you but make sure you clear your concept of ports. Basics are most important for Learning Hacking.

#TekTuts