Ports

In computer port is refer to either physical or virtual connection points.

Physical ports allow connection between computer, routers, modems and other devices via connecting cables. Below are the examples of Physical ports.

  • Ethernet ports
  • USB ports
  • serial ports  
While Virtual ports allow connection between application or protocols. In general term we can say Virtual ports are part of TCP/IP networking. These ports allow software applications to share hardware resources without interfering with each other. Below are the examples of virtual ports with associate application or protocol.

  • 21/20   FTP
  • 23        Telnet
  • 80        HTTP 
What is necessity of virtual ports in computer world?

Answer is here, there are lot of application running on computer which uses TCP/IP for its communication via Ethernet Port but they can’t communicate with each other with out virtual port. Suppose computer A having “192.168.0.1” running IIS as a application and computer B want to communicate with IIS application of computer A. Computer B known, Computer A is reachable via address “192.168.0.1” but don’t know how to reach IIS application. To make it ease IANA has defined virtual ports. Now if we defined port number 80 to IIS application then problem will be solved. Now, IIS application of computer A is reachable by computer B as Computer B knows whom to contact after reaching address “192.168.0.1”.

You can open/close the port either installing/starting application/services on computer. 65535 numbers of virtual ports are used in computer world.

The port numbers are divided into three ranges: the Well Known Ports, the Registered Ports, and the Dynamic and/or Private Ports.

  • The Well Known Ports are those from 0 through 1023.
  • The Registered Ports are those from 1024 through 49151.
  • The Dynamic and/or Private Ports are those from 49152 through 65535

Refer:  services file @ C:\Windows\System32\drivers\etc to know which port is associated with which application\protocol.

We can control the communication of ports through Firewall which can be Hardware or Software. Below are few examples/commands to check whether is running or not.

1. Telnet is the universal command which is used to check the status of port. Suppose I have to check whether RDP port 3389 is running or not on Computer B.

Open “CMD” and type “telnet computer_name or computer_ip 3389“

User netstat /? – To know more about netstat

2. Netstat is the command can be use to check the status of open/communication port of localhost. It will show information all alive ports running on local computer.

Open “CMD” and type netstat –a

User netstat /? – To know more about netstat

Note : Please correct if I am wrong anywhere :)

No comments:

Post a Comment