VM on the 'Net: Part I - TCP/IP By John D. Kinne 2050 words deck: TCP/IP provides the basic necessities for connecting VM to the Internet: It allows computers to exchange messages, files and terminal sessions. The Internet could be the most important invention for computing technology since the semiconductor. It allows any computer, that meets a few basic requirements, to communicate with another computer provided that both have a physical connection to the Internet. This article, the first of a two-part series, will describe the basic technology that enables VM to communicate with the Internet, the TCP/IP program product from IBM. The concluding article will describe some tools built with this facility that significantly extend its capabilities to let VM participate in the most exciting new methods of sharing information on the 'net today. IBM and other vendors have provided software tools to connect VM systems to other computers before networking was cover material. RSCS allowed VM to trade spool files with remote spooling systems such as RES on VS1, JES on MVS and JNet on VMS. IBM's PassThrough ran on VM and allowed users to logon to remote hosts that supported 3270 sessions; a VM user could start a terminal session on another computer from his CMS command line. VM participates in the System Network Architecture (SNA) and it supports VTAM, TSAF and AVS, too. These communications methods offer lots of advantages including high speed and high reliability. However, they are all proprietary. They are found in IBM shops on IBM equipment. Other vendors support them, some rather enthusiastically, but the majority of computer equipment today has preferred support for a non-proprietary method of exchanging information. TCP and IP TCP and IP are the building blocks of the Internet. Unlike many of the protocols that preceded them, they were specified with the explicit intention of not being proprietary. Instead, they were developed to be open. Any vendor can support these technologies with their products. Thus, TCP/IP has become the most popular communications architecture supported by the computer industry today. Like the IBM techniques, it allows computers to exchange data in the form of messages, files and terminal sessions. It also provides mechanisms for users to execute commands on remote systems, print on remote printers, and share data either on the local VM system or the remote system. It includes a security strategy, Kerberos, a network resource manager and the reporting scheme, Simple Network Management Protocol (SNMP). IBM's TCP/IP program product has been supported by VM since 1987; it is currently at Version 2 Release 3 and supports many other protocols in addition to the two it is named after. On the Internetwork layer TCP/IP supports the Internet Control Message Protocol and the Address Resolution Protocol in addition to IP. On the Transport Layer the User Datagram Protocol is supported in addition to TCP. There are more protocols supported on the Application Layer. The C language and a Pascal language Application Programming Interface (API) are also provided with TCP/IP. These are the front ends that application programmers actually deal with. In general they do not have to worry about the work done for them by the lower layers. Of course, users won't worry about the programming interfaces, they'll be concerned with the applications built with that interface. Many VM systems programmers are not familiar with either C or Pascal. Arthur Ecock of City University of New York has developed a function package that allows REXX programmers to write programs that manipulate the TCP/IP interface. His program is called REXX/SOCKETS and is available for MVS and VM systems. It is available from the 1995 VM Tools Tape and will be among the tools discussed next month. The TCP/IP program product is VM's conduit to the Internet. Standard TCP/IP Applications As an open product, TCP/IP is designed to be vendor independent. Yet a vendors' implementation of TCP/IP is written to run on that vendor's machine and requires some aspects to be controlled by the operating system. A particular TCP/IP is going to reflect something about the hardware or software it runs under. Certainly VM's TCP/IP does. VM supports virtual machines, and TCP/IP uses a lot of virtual machines. Each distinct service offered by the VM system requires a different virtual machine. The TCP/IP virtual machine offers TELNET and overall coordination of services. FTP access to your machine is provided by the FTPSERVE machine. The SMTP machine receives and sends mail. REXECD lets remote users or programs execute commands on your VM system. If you wish to offer name service from VM you need a NAMESRV virtual machine. If one of these machines is not logged-on, then that service will not be offered from the VM system. However, as long as the TCP/IP machine is operating properly, users can initiate these utilities to be served from other systems. That is, if the REXECD machine is not logged-on then remote users cannot execute commands on the VM system, but VM users can still execute commands on remote systems using their REXEC daemon. Let's look at the details of a few of the services associated with VM's TCP/IP. subhead: VT100 Support Telnet services are provided by the TCP/IP virtual machine. The telnet command lets a VM user start a terminal session connected to another host. Depending on the other host, the user will be prompted for a user ID and password. It also allows a remote user to start a terminal session on the local VM system. A prompt for a user ID and password is generated with a standard VM logo screen. Telnet services to and from a VM system assume the 3270 interface. This is great when the devices involved expect and support 3270 terminal sessions but is a handicap on non-3270 systems. Many hosts on the Internet support VT100 terminals. The VT100 terminal is a standard and is not supported very well by 3270 devices. Every character typed on a VT100 is sent to the host when it is typed. This allows the host to respond to a single character. For instance, to move an editing window up one line a user may press the up arrow key; to make a selection a user might position the cursor on the line describing the desired item and press the right arrow key. Data is only sent to the host by the 3270 when a program interrupt key is pressed such as the Enter key, a Program Function key or the Clear key. Thus, a telnet session from a VM system to a computer that supports VT100s loses much functionality. Control characters may be sent by prefixing the character with a cent sign or a grave accent, and pressing Enter. This allows the VM user to generate characters such as Control-Z. subhead: Simple Mail Transfer Protocol (SMTP) SMTP function is provided by the SMTP virtual machine. It moves mail files from one computer to another allowing network users to send electronic mail from one computer to another without regard to the host operating system. VM's TCP/IP provides modified NOTE and SENDFILE EXECs to use SMTP. If a VM system has a lot of SMTP traffic then one machine may not be able to keep up with the work. To solve this problem, the program product allows one host to have several SMTP virtual machines, for instance an SMTP2, SMTP3 and other machines may be created. SMTP keeps a tidy log of activity. A VM user can get a history of recent activity by issuing the SMSG SMTP STATS command. The output provides details about the mail handled by this SMTP service machine. An administrator can study the SMTP STATFILE on SMTP's A-disk. subhead: File Transfer Protocol FTP moves a file from one computer account to another. The account may be on a multi-user system like MVS, UNIX, VM, or VMS, or it may be a desktop machine -- a PC, Mac or UNIX machine. TCP/IP will deal with any size machine as long as it speaks TCP/IP. As shown in Figure 1, the FTP session is started with the FTP command. A destination computer may be specified on the command. Subcommands are provided so a user ID and password can be sent to the target system. Other subcommands allow navigation from one directory or file space to another and listing files. With the proper privileges files can be retrieved from or stored to a remote machine. These privileges are inherited from the specified user ID. The VM minidisk file system is very different than the file system of most Internet-connected computers. The majority tend to have a hierarchical file system. The specification for a directory contains slashes separating one subdirectory name from another. If you are FTPing to minidisk space, then the address of the minidisk is specified after a period after the user ID. For example, the command to Change Directory to a minidisk is entered as: cd jdkinne.191 Even the names of directories in VM's hierarchical shared file space are specified with periods: cd jdkinne.tools92.file11 This makes VM ftp services appear very different than other computers found on the Internet. subhead: Other Services Other TCP/IP services are provided by other virtual machines. NAMESRV resolves names into IP addresses, optionally using SQL/DS to speed the lookup process. REXECD allows remote users to execute commands on VM when they specify a valid user ID and password. VMNFS lets network users access data on a CMS minidisk. And there are more. VM provides these services when the proper virtual machine is correctly configured and logged-on. They are not mandatory; it is up to the system administrator to decide what services should be provided. Conversely, VM users can access these services on remote machines regardless of whether or not the local VM system provides them. So, for instance, you can decide not to support the REXECD virtual machine -- perhaps you don't want users to execute commands on VM without completing a regular logon. Your VM users can still issue rexec commands to other systems provided the rexec code is available. The Internet is a UNIX Entity The TCP/IP commands on VM tend to have very similar syntax to their UNIX counterparts. The ftp, rexec, telnet, and other networking commands were implemented on UNIX long before they were offered on VM. To execute a command on a remote system a rexec command might be entered as: rexec -l myuserid -p mypassword host.dept.org.com command The options that specify the user ID and password are placed before the parameters that specify the computer and the command. A conventional VM command would of course place the parameters right after the command name and the options after an opening paren. VM's TCP/IP implementers kept the UNIX format. There are other subtle things going on the Internet that demonstrate its UNIX heritage. The commands that navigate an FTP session are very UNIX-like: "is" to list a directory, "cd" to change directories and "pwd" to print the name of the working directory. The data transmitted by ftp, telnet and other programs is transmitted in ASCII or binary, even if the source and target computers are EBCDIC-based! The 3270 is a tolerated foreigner on the Internet. That is unless your target computer knows about 3270s. In that case, you will be as comfortable as you are on your home system. Expanded Services TCP/IP provides the basic necessities for connecting VM to the Internet. It provides a programming interface for C and Pascal programmers. Arthur Ecock has developed an interface for REXX programmers that has been used to build a Gopher and World-Wide-Web server for VM. Other enthusiastic programmers have built Gopher and World-Wide-Web clients for VM. These and many other exciting services have come to VM as a result of TCP/IP and the Internet. Was this article of value to you? If so, please circle Reader Response Card No. NaSPA member John D. Kinne is employed by computing and information services at Miami University in Oxford, Ohio, where he is responsible for the installation, maintenance and tuning of CP, CMS, RSCS and other program products. John has worked in data processing since 1977 and has worked with VM since 1979. callout: TCP/IP allows computers to exchange data -- be it in the form of messages, files and terminal sessions. It also provides mechanisms for users to execute commands on remote systems, print on remote printers and share data either on the local VM system or the remote system. callout: Other TCP/IP services are provided by other virtual machines. NAMESRV resolves names into IP addresses, optionally using SQL/DS to speed the lookup process. REXECD allows remote users to execute commands on VM when they specify a valid user ID and password. Figure 1: An FTP Session to Retrieve a File ftp miamiu.muohio.edu VM TCP/IP FTP V2R3 Connecting to MIAMIU.MUOHIO.EDU 134.53.7.2, port 21 220-FTPSERV2 IBM VM V2R3 at MIAMIU.ACS.MUOHIO.EDU, 22:30:56 EST SATURDAY 04/15/95 220 Connection will close if idle for more than 5 minutes. USER (identify yourself to the host): jdkinne >>>USER jdkinne 331 Send password please. Password: >>>PASS ******** 230 JDKINNE logged in; working directory = VMSYSU:JDKINNE. Command: get profile.exec profile.jdkinne.a >>>PORT 134,53,7,2,99,102 200 Port request OK. >>>RETR profile.exec 150 Sending file 'profile.exec' FIXrecfm 80 250 Transfer completed successfully. 2214 bytes transferred in 0.385 seconds. Transfer rate 5.75 Kbytes/sec. Command: quit >>>QUIT 221 Quit command received. Goodbye. Ready; T=0.09/0.17 22:33:44