Basically a port is an access channel and a
protocol is a standardized way for computers to exchange information.
Computers in a network must send and receive data to communicate. Data on the Internet is sent and received by software that automatically organizes such data to be transferred into packets. These packets are made in a standardized way (a
protocol) so other computers can recognize them as data and decode them. Network clients use different ports or channels (that are given standardized numbers)to transfer this data. Generally one port is used to send data and another to receive it, so packets don't collide. The port number (and the destination
IP address) is included as part of the
header each
packet is given. Ports range from 1 to 65535 for TCP and
UDP.
Port numbers are generally divided into three ranges:
1. The Well Known ports: 0 to 1023
2. The Registered ports: 1024 to 49151
3. The Dynamic and/or Private ports: 49152 to 65535
Note: A list of all
IANA assigned port numbers and their associated services can be found on their website. We also maintain a large database of all port assignments, known vulnerabilities, applications and more here:
SG Ports database