AS/400 TCP/IP ports

Date: Archived
Product/Release: LANSA for Web, TCP/IP
Abstract: Some LANSA for Web connection problems may be related to the inappropriate use of TCP/IP Ports
Submitted By: LANSA Technical Support

Firstly, extracts from the AS/400e series' TCP/IP Configuration and Reference Guide (Version 4):

1.13.1 TCP and UDP Ports

A port is an integer value from 1 to 65535 that is used to identify a TCP/IP application. TCP and UDP protocols use ports to identify a unique
origin or destination of communication with an application. There are two unique sets of ports. One set is for TCP processing, and the other is for UDP processing. They are completely independent sets of ports and have no relationship to one another. Well-known Ports

Commonly used protocols and applications, such as FTP and SMTP, have assigned port numbers. These assigned port numbers are called well-known ports. TCP and UDP port numbers 1 to 1023 are reserved for the well-known ports and should not be used by user application programs. If the user specifies one of these ports, it can affect the operation of those applications. Refer to RFC 1700, entitled, Assigned Numbers, for a list of well-known ports.

To see the list of ports currently defined on AS/400, perform the following steps:

  1. Use the Configure TCP/IP (CFGTCP) command to get to the Configure
    TCP/IP menu
  2. Select option 21 (Configure related tables)
  3. Select option 1 (Work with service table entries)

To display the ports currently in use on the AS/400, issue the NETSTAT command and select option 3 (Work with TCP/IP connection status). This will display a screen similar that the one that follows:

Remote Address Remote Port Local Port Idle Time State
* * ftp-con > 008:59:23 Listen
* * telnet 000:34:09 Listen
* * smtp 008:56:15 Listen
* * 89 008:57:54 Listen
* * 92 008:57:22 Listen
* * www-http 008:57:00 Listen
* * 99 008:57:36 Listen
* * netbios > 008:59:14 Listen
* * netbios > 000:00:32 *UDP
* * netbios > 000:00:00 *UDP
* * netbios > 004:29:14 Listen
* * APPCove > 008:59:39 *UDP
* * 4547 001:12:32 Listen
* * 4548 003:42:35 Listen
* * as-tran > 006:33:14 Listen
* * as-vrtp > 006:33:21 Listen
* * www-http 000:10:07 Listen 1825 www-http 000:01:33 Time-wait 1831 www-http 000:01:30 Time-wait 1832 www-http 000:01:29 Time-wait 1833 www-http 000:01:29 Time-wait 1834 www-http 000:01:29 Time-wait 1835 www-http 000:01:29 Time-wait 1836 www-http 000:01:29 Time-wait 1837 www-http 000:01:29 Time-wait 1838 www-http 000:01:29 Time-wait 1028 4547 004:48:14 Established

One Port can be used by several applications of the same protocol (e.g. http, ftp, udp, smtp, etc). In addition, the AS/400 (e.g. V4R3) provides a facility to restrict the use of the TCP/IP Ports to specific User Profiles (e.g. ADDTCPPORT).

In practice, the standard definition of Port numbers are not widely applied. However, it is expected that an increasing number of applications would be restricting the use of Ports to specific User Profiles.

Regarding LANSA for the Web, one system can use several Ports. However, one Port can only be used by one LANSA for the Web system.

Be aware of the above points when configuring and troubleshooting LANSA for the Web systems. They could explain some communication problems.