working with the as/400 service table - · pdf fileworking with the as/400 service table...

6
W W o o r r k k i i n n g g w w i i t t h h t t h h e e A A S S / / 4 4 0 0 0 0 S S e e r r v v i i c c e e T T a a b b l l e e Craig Pelkie Bits & Bytes Programming, Inc. [email protected]

Upload: buidiep

Post on 16-Mar-2018

217 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Working with the AS/400 Service Table - · PDF fileWorking with the AS/400 Service Table Edition SERVICETABLE_20020221 Published by Bits & Bytes Programming, Inc. Valley Center, CA

WWoorrkkiinngg wwiitthh tthhee AASS//440000 SSeerrvviiccee TTaabbllee

Craig Pelkie Bits & Bytes Programming, Inc. [email protected]

Page 2: Working with the AS/400 Service Table - · PDF fileWorking with the AS/400 Service Table Edition SERVICETABLE_20020221 Published by Bits & Bytes Programming, Inc. Valley Center, CA

Working with the AS/400 Service Table Edition SERVICETABLE_20020221

Published by

Bits & Bytes Programming, Inc. Valley Center, CA 92082 [email protected]

Copyright © 2002, Craig Pelkie. All Rights Reserved

You are allowed to print copies of this document for your own personal use and for the use of others in your company or organization. Otherwise, no part of this document or any accompanying computer source code may be reproduced or distributed in any form or by any means, or stored in a database or data retrieval system, without the prior written permission of Craig Pelkie, who is the author of the document and the computer source code.

All computer source code distributed with this document, either on diskettes, CD-ROM, or available for downloading from sources such as the Internet is Copyright © 2002 Craig Pelkie, All Rights Reserved. The source code is for use in computer programs that you develop for internal use within your company, or for use within programs that you develop for the use of your clients. No part of the computer source code distributed with this document shall be reproduced in source code format, either printed or in electronic format, by you or by others who you allow to have access to the source code. You shall not cause the source code to be stored on any information retrieval system, such as the Internet. You shall not develop any written articles, books, seminar materials, or other presentations that include the source code provided on the diskettes accompanying this document or within the document itself.

For any questions regarding your rights and responsibilities using the computer source code distributed with this document, contact Craig Pelkie, Bits & Bytes Programming, Inc., who is the owner of the source code.

LIMITATION OF LIABILITY AND DISCLAIMER OF WARRANTY

No representation is made that any of the techniques, programs, computer source code, commands, or configurations described and depicted in this document and on the computer source code accompanying this document are error-free and suitable for any application that you may develop. Craig Pelkie makes no warranty of any kind, expressed or implied, including the warranties of merchantability or fitness for a particular purpose, with regard to the information, examples, and computer source code presented in this document and on the accompanying diskettes. Everything provided in this document and on the accompanying computer source code, if any, is provided “as is”. Craig Pelkie shall not be liable in any event for incidental or consequential damages or any other claims, pursuant to your use of any of the techniques presented in this document, or your use of the computer source code, even if Craig Pelkie has been advised of the possibility of such damages.

You are responsible for testing any and all programs, configurations, commands, and procedures described in this document prior to using the programs, configurations, commands, and procedures with important user data. You must ensure that adequate and sufficient backup of important user data is available, in the event that recovery of the important user data is required.

Page 3: Working with the AS/400 Service Table - · PDF fileWorking with the AS/400 Service Table Edition SERVICETABLE_20020221 Published by Bits & Bytes Programming, Inc. Valley Center, CA

Working with the AS/400 Service Table

Copyright © 2002, Craig Pelkie, ALL RIGHTS RESERVED

1

Working with the AS/400 Service Table When you use a TCP/IP function on the AS/400 system, your request is processed using a combination of the IP address and a port number. For example, the default port for TELNET is 23. The list of port assignments is kept in what is called the service table. On the AS/400 system, you can view the service table by using the Work with Service Table Entries (WRKSRVTBLE) command. The command displays or prints a list of services, port assignments and protocols associated with a port (see Figure 1).

SRVTABLE01

Figure 1: The Work with Service Table Entries command displays the list of services, ports and protocols.

Services that are specific to the AS/400 system use the prefix “as-“ as part of the service name. For example, you can see in Figure 1 the services for the HTTP Server administration program and several of the services for Client Access Host Servers. Each service can be assigned up to four aliases (see Figure 2).

Page 4: Working with the AS/400 Service Table - · PDF fileWorking with the AS/400 Service Table Edition SERVICETABLE_20020221 Published by Bits & Bytes Programming, Inc. Valley Center, CA

Working with the AS/400 Service Table

Copyright © 2002, Craig Pelkie, ALL RIGHTS RESERVED

2

SRVTABLE02

Figure 2: Each service can be assigned up to four aliases.

How the Service Table is Used When Client Access needs to use a Client Access Host Server, it sends a request to the server mapper on port 449 to locate the required host server. The server mapper looks in the service table for the name of the required host server. It then returns the port number for the host server to the requester.

Port Assignments Port numbers are assigned within the range 0—65535. The first 1024 ports (0—1023) are called assigned ports. By convention, those ports are used for specific functions. The usage of ports within that range is documented and by convention, no other function may use a port within the range. Software providers who need to use a port within that range must apply to the Internet Assigned Numbers Authority (IANA) to get a port assignment.

The range of ports from 1024—65535 is generally open for software providers to use. Within that range there are many registered ports, which are ports that software providers have advised IANA that they are using. There is no requirement that other software providers avoid using a registered port for another function.

Because the ports in the upper range may be freely used, you need to be aware of what ports are used when you install TCP/IP applications and servers on your AS/400 system. For example, the Client Access Host Servers use the range of ports 8470—8479. Although it is unlikely that another application on your AS/400 system will use those ports, there is nothing that prevents the ports from being used.

Page 5: Working with the AS/400 Service Table - · PDF fileWorking with the AS/400 Service Table Edition SERVICETABLE_20020221 Published by Bits & Bytes Programming, Inc. Valley Center, CA

Working with the AS/400 Service Table

Copyright © 2002, Craig Pelkie, ALL RIGHTS RESERVED

3

Remapping a Port Assignment If you install a conflicting application, you can remap port assignments on the AS/400 system using the WRKSRVTBLE command. The steps to remap a port assignment are:

1. Use option 5 to display the current port assignment (Figure 2). You should print the service table entry, since you will need to enter all of the information about the service in a new port assignment.

2. Use option 4 to remove the current port assignment.

3. Use option 1 to add the new port assignment. Enter all of the values that were used for the originally assigned port (particularly the aliases).

Additional Information You can view the authoritative list of assigned and registered ports in the Request For Comments (RFC) document RFC1700. You can locate the document at the following URL:

http://www.ietf.org/rfc/rfc1700.txt

The list of assigned and registered ports starts on page 15 of the RFC1700 document.

Page 6: Working with the AS/400 Service Table - · PDF fileWorking with the AS/400 Service Table Edition SERVICETABLE_20020221 Published by Bits & Bytes Programming, Inc. Valley Center, CA

Working with the AS/400 Service Table

Copyright © 2002, Craig Pelkie, ALL RIGHTS RESERVED

4