What is Port?
Although the transmitted data reach the destination computer due to MAC and IP addresses, they are meant anyway for an application that uses network. So for data to reach up the application they are intended for, some identifier must be used. This identifier is called port. A port is a number in the range 0 - 65535. A computer that initiates connection is called client and the one the initiated connection is aimed at is called server. When the client appications send requests they are assigned the outbound ports - called ephemeral in the range from 49152 to 65535 in case of Windows Vista or higher and from 1025 to 5000 for earlier Windows versions. A server is supposed to have services running which perfom different functions, for instance, sending back the web page that the client has required. Services are bound to the fixed ports called well known which are in the range from 0 to 1023 (e.g. HTTP web server uses TCP port 80) and are listening to requests or data incoming from the clients to these ports. Services, by-turn, provide the server applications with data that came from the client ones.
When the required data is sent back to the client they income using the corresponding ephemeral ports and then reach up the client application. How does an application know what port a response should be sent to? As a matter of fact when requests or data are sent information of what port has been used to transfer them is added too.
A port can be either TCP or UDP because those are protocols to transmit data. So TCP and UDP ports are not the same. The well known ports are always associated with a certain service of the operating system (which is declared as the Application level protocol). Some more information on the well known ports:
TCP Port 20 |
is used to transfer files (FTP-protocol); |
TCP Port 21 |
is used to transfer commands of protocol (FTP-protocol); |
TCP Port 25 |
is used to send emails (SMTP-protocol); |
TCP Port 80 |
is used to have the web site pages displayed (HTTP-protocol); |
TCP Port 110 |
is used for users to receive emails from server (POP3-protocol); |
UDP Port 137 |
is used for computers in network to resolve and register their names (SMB over Netbios-protocol); |
UDP Port 138 |
is used to establish and break connection sessions between computers (SMB over Netbios-protocol); |
TCP Port 139 |
is used to transfer data as sharing within a connection session (SMB over Netbios-protocol); |
TCP Port 443 |
is used to have the web site pages displayed applying the strong encryption (HTTPS-protocol); |
TCP Port 445 |
is used by SMB-protocol directly and provides the same opportunities as UDP Port 137, Port 138 and TCP Port 139. |
Note: SMB over Netbios (also known as Netbios over TCP/IP) is an "old-fashioned" protocol to browse computers and share data within a network and has potential vulnerabilities. You'd better disable it at all if there is no necessity in its using. Consult an IT-specialist of your netwotk service provider for details.