Defining a TCP connection on UNIX and Linux

The channel definition at the sending end specifies the address of the target. The listener or inet daemon is configured for the connection at the receiving end.


Before starting

A message channel using TCP/IP can be pointed at an IBM Aspera fasp.io Gateway, which provides a fast TCP/IP tunnel that can significantly increase network throughput. A queue manager running on any entitled platform can connect through an Aspera gateway. The gateway itself is deployed on Red Hat or Ubuntu Linux, or Windows. See Defining an Aspera gateway connection on Linux or Windows.


Send end

Specify the host name, or the TCP address of the target machine, in the Connection Name field of the channel definition. The port to connect to defaults to 1414. Port number 1414 is assigned by the Internet Assigned Numbers Authority to IBM MQ. To use a port number other than the default, change the connection name field thus:
Connection Name REMHOST(1822)
where REMHOST is the host name of the remote machine and 1822 is the port number required. (This must be the port that the listener at the receiving end is listening on.) Alternatively we can change the port number by specifying it in the queue manager configuration file (qm.ini):
TCP:
Port=1822

For more information about the values you set using qm.ini, see Configuration file stanzas for distributed queuing.


Receive on TCP

We can use either the TCP/IP listener, which is the inet daemon (inetd), or the IBM MQ listener.

Some Linux distributions now use the extended inet daemon (xinetd) instead of the inet daemon. For information about how to use the extended inet daemon on a Linux system, see Establishing a TCP connection on Linux .

  • Use the TCP/IP listener on UNIX and Linux
    To start channels on UNIX and Linux, the /etc/services file and the inetd.conf file must be edited
  • Use the TCP listener backlog option on UNIX and Linux
    In TCP, connections are treated incomplete unless three-way handshake takes place between the server and the client. These connections are called outstanding connection requests. A maximum value is set for these outstanding connection requests and can be considered a backlog of requests waiting on the TCP port for the listener to accept the request.
  • Use the IBM MQ listener
    To run the listener supplied with IBM MQ, which starts new channels as threads, use the runmqlsr command.
  • Use the TCP/IP SO_KEEPALIVE option
    On some UNIX and Linux systems, we can define how long TCP waits before checking that the connection is still available, and how frequently it tries the connection again if the first check fails. This is either a kernel tunable parameter, or can be entered at the command line.

Parent topic: Set up communication on UNIX and Linux


Related concepts