Here are the main steps you need to follow to set up TCP/IP on your AS/400:
Identify your i5 server to the local network.
If a line description for your network adapter card does not already exist, create one.
To create a line description, you must know the resource name and type of your communication adapter. Use the WRKHDRSC *CMN command to find these. Next, you must create the line description for the adapter card. If you have an Ethernet adapter card, use the CRTLINETH command, shown in Figure 30.1. Name the line anything you want, but use the resource name of the communication card you found using the WRKHDRSC command. Take the defaults for all the other parameters on the CRTLINETH command.
Figure 30.1: Creating an Ethernet line description.
TCP/IP will automatically create the controller and device descriptions when activated, so there is no need for you to do so.
To perform the rest of the configuration tasks, go to the Configure TCP/IP menu shown in Figure 30.2. To get to this menu, key in GO CFGTCP.
Figure 30.2: TCP/IP configuration menu.
Define a TCP/IP interface to give your AS/400 an IP address.
To define a TCP/IP interface, use the Add TCP/IP Interface (ADDTCPIFC) command shown in Figure 30.3. This command can also be executed through option 1 of the Configure TCP/IP menu. You must obtain an Internet address from your IP and enter it in the INTNETADR parameter of the command. The LIND parameter is the name of the Ethernet line you just created. The only other parameter you need to worry about is the SUBNETMASK. This parameter indicates the size and structure of your network. You can probably get away with 255.255.255.0, which indicates that you have between 1 and 254 computers on your network.
Figure 30.3: Adding a TCP/IP interface.
Define a TCP/IP route. This allows your computer to connect with remote networks.
Use option 2 from the Configure TCP/IP menu to create a routing entry. This step is optional. You don't need to create a routing entry if your server is attached to a single network with no IP routers.
Define a local domain name and host name. This will be name of your computer.
The local domain name is the name by which the Internet knows you. The host name is the name of your i5 server.
The name of your i5 server is usually the serial number of the computer. You can change the name to something more meaningful by using the CHGNETA command.
Use the CHGTCPDMN command (option 12 from the configuration menu) shown in Figure 30.4. Enter the domain name and the host name.
Figure 30.4: Changing TCP/IP domain.
Identify the names of the computers in your network.
To identify the names of the computers in your network, build a local host table. This table allows you to associate remote computer names with TCP/IP addresses. Use the Add TCP/IP Host Table Entry (ADDTCTHTE) command (option 10 from the Configure TCP/IP menu) to add entries to the host table. The command is shown in Figure 30.5.
Figure 30.5: Adding TCP/IP Host Table Entry.
Start host server.
Execute the Start Host Sever (STRHOSTSVR) command using the *ALL parameter. This will start the servers that will allow communications with the clients.
Execute the Start TCP/IP (STRTCP) command to start communicating.
To perform these tasks, you will need some detailed information about your system. See Table 30.1 for a synopsis of required information to configure TCP/IP.
Ethernet or Token Ring
Communication port resource name
For example: LIN051
Communication line description name
For example: ETHTCP
IP address of your AS400
For example: 22.214.171.124
Subnet mask of your AS400
For example: 255.255.255.0
Host name and domain name for your AS400
For example: http://www.MYCOMPUTER.DOMAINXYZ.ABC.COM
IP address for domain name server
For example: 126.96.36.199
After you have TCP/IP up and running, here are some of the applications you will have available.
TELNET. Allows you to sign on to another system from your system.
FTP (File Transfer Protocol). You can use this to exchange files with other computers.
SMTP (Simple Mail Transfer Protocol). This enables e-mail capabilities.
LPR (Line Printer Requester). This allows you to print file on another computer or a network-attached printer.
LPD (Line Printer Daemon). This allows other computers to print using printers attached to your server.
HTTP Server. Allows your i5 server to host a Web site and serve up hypertext information to standard Web browsers across the Internet. For more information on programming with the HTTP server, see Chapter 31.