Who is listening ?

Issue:
A general overview of TCP/IP socket connections and the configuration of the Perle serial servers.

Solution:

Perle serial server configuration for TCP/IP socket connections (when a process on one TCP/IP host connects to a TCP port on another host).

The Server is generally refered to as the device that has a listener process running. The listener process is waiting for an incoming TCP connection from the client.
The Server will be configured to listen on a particular TCP/UDP port for the incoming connection.

The Client is generally refered to as the device that is calling the Server. The Client process will initiate the connection to the Host's listening TCP port.
The Client will be configured to connect to an IP Server's TCP listening port.

A common example would be Telnet server daemon that is running on most Unix hosts.
The Server is running a Telnet daemon that is listening on TCP port 21.
The Client is running a Telnet application that will call the IP address of the Host and to connect to TCP port 21.

Below is a table of line configuration values for both types of connections.

Server (listening) Client (calling)
Jetstream
Service Reverse Raw or Reverse Telnet Direct or Silent Raw or Telnet
Host ---- Host name
Host Port ---- TCP Port # on Host to connect to
JS Port TCP Port # to listen ----
Iolan+
Access Remote or Listen or UDP* Local
Connection None

Dedicated

Mode Raw or Telnet

Raw or Telnet

Host ---- Host name or IP address
Remote Port ---- TCP Port # on Host to connect to
Local Port TCP or UDP Port # to listen ----

Note: UDP socket connections for the Iolan+ is only available with version 4.05.03 or higher.

Example:

Iolan+ with weight scale serially attached to Port 1. A Host on the network is running an application that is gathering data. A client on the network is expected to connect to TCP port 10003 that is configured in the application, and send it's data for collection.

The Iolan+ port configuration would be:
Access = Local
Connection = Dedicated
Mode = Raw
Host = the host name or IP address of the PC running the application
Remote Port = 10003

The Iolan+ is the client and will try to connect to the TCP port on the specified Server.

  • Refer to your manual for more details

Troubleshooting

Use the netstat utility on your Host (available on most Unix and NT based OS's) to check the status of a TCP connection:

Example on a Solaris host to check all TCP connection states:
# netstat -P tcp

TCP: IPv4
Local Address Remote Address Swind Send-Q Rwind Recv-Q State
-------------------- -------------------- ----- ------ ----- ------ -------
sol8.telnet 165.154.128.120.4778 8265 1 64240 0 ESTABLISHED
sol8.10009 165.154.129.202.1145 2048 0 64512 0 ESTABLISHED
sol8.32780 165.154.129.180.telnet 5792 0 66608 0 ESTABLISHED

This example shows Server (sol8) is listening on TCP port 10009. A Client on the network (IP address = 165.154.129.202) has connected to the port successfully.

The Jetstream serial servers do not have any internal diagnostics to verify connection states. The Iolan+ serial servers also have internal statistics that will indicate the state of a port.

You can verify the connection by viewing the STATS -> USERS.

** Administrator ** SERVER STATISTICS REMOTE-ADMIN
1. test1 trying to connect DTR+RTS
2. admin SERVER CONFIGURATION >DTR+RTS
3. solar Talking to host 165.154.128.120.3851 >DTR+RTS
4. login menu >DTR+RTS
REM SERVER STATISTICS
LOG logger not enabled

In this example,
Port 1 is a Client and is trying to establish a TCP connection to a Server on the LAN, but has not completed the connection.
Port 3 has an established TCP connection.



Article ID:
279
Published:
2/24/2003 2:25:21 PM
Last Modified:
9/1/2004 8:11:28 AM
Issue Type:
Configuration