Question: What is port?

Ha! This port is not seaport, because there is also a term called port in networking world, and it can be physical or logical port.

Physical port is hardware port that you connect network cable to on your wireless or wired router, network switch or other networking devices, so that those connected network devices can communicate with each other.

Logical port usually means the logical connection point used by server program to communicate with its client program. Each port is tagged with a number (0-65535) and it's always associated with IP address.

As an example, I have a web server (test.com) that uses IP address 10.1.1.150 and listens on port TCP 80, so we can access the web server by typing http://test.com in web browser (client). The web browser sends the request data to server IP address 10.1.1.150 and port TCP 80 (destination port or server port), the server will then send the data back to browser. Please note also the client program will tie to source port (random number between 1025 – 65535) to communicate with server’s destination port.

Port numbers are ranged from 0 to 65535. Ports 0 to 1024 are reserved for common programs, and so they are also called well known ports. These are common and popular networking ports:

http – port 80 (TCP & UDP)
https – port 443 (TCP & UDP)
telnet – port 23 (TCP & UDP)
smtp – port 25 (TCP & UDP)
ftp – port 21 (TCP & UDP)
domain – port 53 (TCP & UDP)
snmp – port 161 (TCP & UDP)
syslog – port 514 (UDP)
pop3 – port 110 (TCP & UDP)
imap3 – port 220 (TCP & UDP)

If you want to know more ports, feel free to check out the latest IANA’s network port list here.