What's a TCP/IP Port?

What is a TCP/IP port and why does it matter on my dedicated server?

Every accessible server has one or more IP addresses and each of those IP addresses has a large range (0-65,535) of "ports" that can be used. Connections to servers are made based on a combination of IP address plus port. Services running on the server that accept incoming requests designate what IP/port combination they are going to listen to, and only one service can listen to any combination at one time.

Protocol can often (but not always) be used instead when speaking of "ports" if there is a common service running on a common port. A few common services and their ports are HTTP (80), HTTPS (443), SMTP (25), POP (110), SQL (1433), and RDP (3389). If you have a program that accesses on of these types of services - like a web browser - you can generally get away without specifying the port number. Entering HTTP://192.168.1.100 in a web browser will automatically try to make a connection on port 80. HTTPS:// of any address will automatically try to make a connection on port 443.

But, it should be noted that just because there are standard ports for standard protocols, some services can run on non-standard ports. For example, you can run a web site on port 999 if you wanted and have it accessed via a web browser by specifying IP:port such as http://192.168.1.100:999 (the ":999" overrides the default and initiates a connection on that specific port). 

When you create a web site in IIS the port is set to 80 by default but you can override this value and set it to any (open) port number desired. Changing the highlighted "80" to "999" would allow the example IIS site below to be accessed using the example URL above.

As mentioned, only one service at a time can use a single IP/port combination. So, if you have IIS running on your server and a site setup to listen for requests on the default of port 80, you can't also have Apache running on the same server listening on the same IP and same port. Trying to do this will give an error and one of the services will fail.

Here is a link to Wikipedia's page on networking ports for more information.

Happy Hosting!

 

No Comments