Practical Application of Ports
As all of this activity is happening behind the scenes, we weren’t able to see how the IP address and port numbers were used. To cure this problem, we need to learn about Netstat utility.
Netstat stands for network statistics and it’s a command line tool that is used to display the current network connections and port activity on our computer. We can use Netstat on various operating systems, but in this example, we are going to be working on a Windows computer.
In the command prompt, we type in netstat and then we’re going to use a -n subcommand that enables us to see various information including the port number of the local device and server.
In the above output image, we can see our active connection.
Here, the local address is our computer’s IP address attached to the port number that our computer has assigned itself for this session. The foreign address is the server’s IP address (google.com) along with port number 80 that’s being used for this connection because as we mentioned before, port 80 is used for web pages.
Eventually, we want to run other services on the same server so let’s try to run the FTP service. FTP is a standard protocol that is used to transfer files between computers and servers over a network and it uses port number 21. To run the FTP service, we should open a web browser and type in ftp.google.com and then we’ll run the same subcommand (-n) again.
The domain name of google.com will be converted into Google’s IP address(215.114.85.17) and since we’re using FTP, our computer will add port 21 to the IP address and once Google’s server sees the incoming request with port number 21, it’ll forward that request to its built-in FTP service and it’ll show a connection to Google’s FTP service using port number 21.
What is Network Port?
In today’s technological age, data stands out as a crucial asset, and to make regular advancements, we need to share data among ourselves. We can share data in two ways either using wired connections or the internet.
In wired connections, we use connectors called physical ports for the transfer of data, power, and signals from one device to another. Example – HDMI, USB, etc.
In the internet, communication among devices relies on a structured system called network ports.
Network ports are virtual endpoints that bridge data transmission among multiple applications, services, or devices within a network. It is a logical connection that is established between multiple devices to transfer and exchange data among them. These ports ensures the smooth flow of information and make sure that data reaches its destined address.
In a practical sense, when we interact with various online services like browsing, streaming, or downloading, network ports are working in the background. It manages the data traffic and ensures to make every process works independently and efficiently.
Each network port will have a unique number that differentiates it from others. This unique number is known as the port number.
Contact Us