Sidebar

What is the best practice for managing inbound and outbound TCP/IP port numbers?

0 votes
2.5K views
asked Mar 5, 2014 by gary-t-8719 (14,860 points)

1 Answer

0 votes

When dealing with Socket connections keep in mind that there are two kinds of connections. One is a Server socket and the other is a Client socket. The Server socket is a listening or inbound connection where the other application/channel would be sending data to QIE and the client socket connection is used when QIE is sending data outbound to another application/channel. Keep in mind the following two things with regard to the two types of connections:

1.       When sending data outbound (Client) the application/server that is receiving the data will be the one who determines the port number. This port number can then be entered into QIE.

2.       When receiving data into QIE (Server) then the port numbers are controlled by or on the QIE server.

A good practice when deciding on what port numbers to use would be to avoid the “Well Known” or “Registered” port numbers. These are port numbers that may already be in use by the OS like port 80 which is used for web browser internet traffic. However, more importantly the port number ultimately used just needs to be available for use on the QIE server.  Use the following command at the command prompt “netstat –an” to determine if a given port is in use. Keep in mind that this command will only report ports that are currently in use.  

As a general rule I like to use port numbers above the 20K range.

When setting up port numbers for use a good practice might be to use port numbers incrementally ranging from 20000 to 29999 for test interfaces and port numbers ranging from 30000 to 39999 for production interface. For example I might use 20001 for an ADT test interface and the port 30001 for the same interface used in production. This will make it very easy to identify the channel between the test server and the prod server by port number.

If you don’t have a large number of interfaces then you could also incrementally specify the port numbers in increments of 100 or 10. For example 20100, and 20200 or 20010, and 2002.

See KB Article: How to setup a new inbound port number.

answered Mar 7, 2014 by gary-t-8719 (14,860 points)
edited Jan 9, 2017 by gary-t-8719
...