top of page
TCP/IP Port
What is it?
-
Port numbers are digits written after IP address separated by a colon.
-
TCP port is a 16-bit unsigned value.
-
There is finite no. of ports available 65,535.
-
Used for successful data packet transfer.
-
A socket, in which we connect to another system running some software takes place with a combination of an IP address and port number.
-
For instance, FTP application has 20 & 21 listening port.
-
Therefore, FTP server application when it starts will bind itself to TCP ports 20 and 21, and wait for connections in order to send and receive data.
A single host can host multiple instances in the same service by using a different port number.
Socket
ftp://192.168.0.137: 21
IP Address
.
17
18
19
​
​
22
23
14
.
.
65535
For FTP, default port no. = 21
We can change the listening port.
Port no.
-
The port number identifies what type of port it is.
-
For example, port 80 is used for HTTP traffic.
-
Some ports have numbers that are assigned to them by the IANA.
Google Web Server
Listening port 80
-
You type google.com
-
You get the page.
-
Google web server is an HTTP server specifically listening to an incoming port number 80.
TCP/IP Port
-
So, we can set up no. of a web server that has one listening port on the default port 80.
-
And another website on the same server, same IP address but with listening on a different port (expect 80).
-
There are total 65535 TCP and UDP port numbers available.
Well-Known Ports.
Public Ports.
Port 0 to 1023 are Well-Known Ports.
eg. http, ftp, smtp,pop, imap, dhcp etc.
-
A host will bind a listen port number with an application, it will then use this port to listen for and accept connections from remote computers.
-
Note that once an application binds itself to a particular port, that port can not be used by any other application.
-
Most major applications have a specific port that they listen on and they register this information with an organization called IANA.
-
This table has some Well-Known Ports (port no. 0 to 1023) of TCP specifies the port used by the server process as its contact port.
Where & How to Use
-
Practically we use this port numbers in different fields such as:
-
Server application configurations like Oracle, Sharepoint, SQL Server, etc. requires to set up port number.
-
We use port number for troubleshooting purposes specifically, troubleshoot malware and identify a rogue process.
-
We can check which ports are being used by our PC with the command line.
-
Open Command Prompt > type netstat -a > Enter.
Displays current TCP/IP network connections and statistics with the port number.
​​​
Port
numbers
-
Download TCPView software, a Microsoft software will give graphical interface of connection status.
-
Here you can see all running application with a local address and remote address with their respective port used.
-
Those applications which are using UDP protocol to connect, they don't have a remote address and port number, because UDP is a connectionless protocol.
-
Here we can see the total no. of packets received and sent.
-
This software has many features which allow us to close the connection, WHOIS lookup and so on.
Port Number
bottom of page