What is a port? What does the port do? Where is the port used?
What is a port?
Ports are two types of interfaces, serial ( COM ) and parallel ( LPT ), which are used to establish a connection between a computer and external devices. What does port mean? When we look at the dictionary meaning, we encounter the definition of "port". If we interpret this definition as a computer term, it is possible to define it as a "bridge". Although the name is rarely known, the port is vital for exchanging data between computers.
The port, which is not heard much by daily users and frequently heard by technical personnel in business life, makes data exchange over numbers. We can examine the port, which is divided into values from 0 to 65535, in 2 types, TCP and UDP, so that it can perform many operations at the same time.
What is TCP?
TCP (Transmission Control Protocol) is the protocol that forms the basis of communication between computers, developed by the US Department of Defense. TCP handles both data exchange and authentication. Thanks to TCP, which provides data exchange of protocols such as HTTP, HTTPS, POP3, SSH, SMTP, TELNET and FTP, losses between computers are prevented.
What is UDP?
UDP (User Datagram Protocol) is an alternative to TCP in this protocol; It provides faster data transfer than TCP. The UDP protocol, which provides audio and video sending with UDP, is not responsible for data integrity and logging, unlike TCP.
In this case, for UDP; Although it is faster than TCP, we can say that it is less reliable than TCP protocol. Another difference between TCP and UDP is; TCP sends data packets sequentially, while UDP sends them by streaming system.
What Does PORT Do?
Talking about the port definition in detail, what is a port? What are the types? We learned. It works with the port number system whose main task is to provide data exchange. The reason why the port, whose main function is data transfer, works with the number system; It is to enable data exchange for multiple purposes at the same time.
Every program installed on the computer has port usage at certain numbers. E.g; When the user is operating on his computer, when he opens a browser, the transaction is made from a different port number, and if he opens a program to check e-mails, a different port number is used. In this way, the ports, which can easily exchange data for more than one transaction, also offer a fast service to the user. What does the port do? This explanation, which is the answer to the question, also shows the reason for the definition of bridge, which is the dictionary meaning of port.
What is the relationship between port and IP?
Before we explain the port forwarding issue, we need to learn the relationship between port and ip. What does the port do? As we mentioned in its definition, ports, which have a key role in the data exchange process, perform data exchanges both virtual and physical. physical port; It can be defined as the inputs attached to the computer as hardware, and the virtual port as a port between IPs. The port relationship with IP is the same as the route relationship between two different points.
If we want to see which port of any IP on our computer provides data transfer;
Let's go to Start (Start) > Run (Run) and type cmd and press enter.
You can view which ip is using which port in the list that comes up by typing netstat –an command on the dos screen and pressing enter.
The explanations of the terms in the list of links appearing on the DOS screen are as follows:
Protocol: Shows the protocol connection type used. (TCD – UDP)
Local Address: It shows the IP addresses used by the computer in its Local connection, that is, within itself. IP addresses used by applications are an example of this. At the end of the IP address in this area; The field after the colon symbol shows the port number used by that ip.
Foreign Address: Shows the IP addresses and port numbers that the computer uses in external connection. It refers to external internet connections connecting to the remote server. The connections made by the internet browser or e-mail address program used on the computer to the remote server for mail checks are examples for this situation.
State: Shows the status of the connections. “Listening” states “listening” indicates pending connections, “Established” indicates active data transfer is in progress.
What is Port Forwarding?
To clarify the port forwarding issue, we talked about the relationship between port and ip. port forwarding; It is the process of converting data from a computer or device to a different direction via its IP address. Data flow to the IP address that is to be protected by port forwarding is stopped. There are different types of port forwarding that are used for different purposes, such as diverting or stopping the data flow.
What are the Port Forwarding Types?
Port forwarding types can be examined under 3 headings.
Local Port Forwarding
With local port forwarding, which is one of the most common types of port forwarding, users can bypass firewalls that prevent access to some web pages. We can consider the local port forwarding system, which is a secure port forwarding method, as a secure tunnel.
Remote Port Forwarding
Instead of providing a forwarding in the local network as in the local port forwarding type; port forwarding on a remote server. It allows many users to connect to a remote server over TCP protocol, it is the most used port forwarding type for remote connection to WEB server.
Dynamic Port Forwarding
By performing the same function as local port forwarding; It is another type of port forwarding used to bypass the firewall. Dynamic port forwarding is used to secure users on a public network connection type.
Port Usage Areas
For data transfer purposes; home computers; We have detailed that it is used for communication between computers and other devices used in the workplace network. As a port usage area; It is encountered by an internet user who wants to connect a new internet during the infrastructure inquiry.
Today, especially during the pandemic we have been through, internet has started to be connected to every home. When users who want to have internet connected to their homes apply to the operators, infrastructure inquiries are made according to the address. In the infrastructure inquiry; According to the infrastructure, internet service can be provided, and in some cases, no port information is transmitted even if there is an infrastructure.
If we detail the process that internet providers describe as no port; In order to provide internet service to the building where the users live, by the infrastructure provider; Internet boxes are placed on street, street and boulevard routes. Capacity of Internet distribution boxes; It can fill up due to the increasing number of buildings and users. At this point, users who want to get internet service may encounter no port response by internet providers.
In such cases, a port is added to the box by the internet provider. In case of adding a port to the distribution box, it can be added as a result of automatic controls, or it can be added in case of demand. Since the ports planned to be added are 8, requests must be made by 8 or close to 8 people.
Thank you for sharing this article! By the way, I'm your 7th subscriber. Keep writing! See you around