home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / tcpcsd2.zip / BASECSD2.EXE / DOC / SLIPREAD.ME < prev    next >
Text File  |  1993-08-02  |  19KB  |  526 lines

  1. The following is a description of the new SLIP interface for
  2. OS/2 TCP/IP.  This will be the SLIP interface that IBM will use
  3. as corrective service for OS/2 TCP/IP 1.2.1 users who have OS/2
  4. 2.1.  It will also be part of future releases of OS/2 TCP/IP.
  5.  
  6. There are several changes.  SLIO.EXE is replaced by SLIP.EXE
  7. and SLIPCALL is replaced by SLIPTERM.  SLIP supports REXX
  8. command files for creating dialing scripts and SLIP supports
  9. VJ compression.  We apoligize for changing the interface but
  10. we are convinced that you will appreciate the changes.
  11.  
  12. The following description is part of a chapter of a new book
  13. for OS/2 TCP/IP.  Please ignore the references to TCPCFG.
  14. Please use the text to understand how SLIP.CFG, and SLIPTERM
  15. will help you.
  16.  
  17. USING THE SLIP INTERFACE
  18. ==========================
  19. The Serial Line Internet Protocol (SLIP) enables you to connect to another
  20. TCP/IP network over a serial line.  Serial lines set up point-to-point links
  21. between local hosts and foreign hosts.  SLIP enables a local OS/2 host to
  22. connect to a remote host over a telephone line using a modem (which you can
  23. establish either manually or automatically, using attachment scripts) or over
  24. a serial line using a null-modem cable.  The SLIP connection allows you to
  25. access the network on which the remote host resides.
  26.  
  27. You can use any valid OS/2 serial communication port (COM port) for a SLIP
  28. connection.  However, with TCP/IP for OS/2, you can use only one communi-
  29. cations (COM) port at a time.  Therefore, if you have a established a SLIP
  30. connection, you cannot originate or accept another SLIP connection.
  31.  
  32. NOTES:
  33.  
  34. 1.  Before you can use SLIP, the OS/2 Device Support must be installed.  This
  35.     results in the DEVICE=COM.SYS statement in your CONFIG.SYS.
  36.  
  37. 2.  Because the attachment scripts are written in REXX, if you want to use
  38.     attachment scripts to establish a SLIP connection, the REXX function of
  39.     OS/2 must be installed.
  40.  
  41. 3.  The performance of SLIP depends on the speed of the modems.  The perform-
  42.     ance of some applications, when used with SLIP, can be affected.
  43.  
  44. This chapter describes following tasks:
  45.  
  46. o   Installing and configuring SLIP
  47. o   Configuring a communications port
  48. o   Establishing a SLIP connection
  49.     -   Manually
  50.     -   Automatically, using attachment scripts
  51.     -   Using a null-modem cable
  52. o   Ending a SLIP connection
  53.  
  54. It also provides a summary of the utilities and files that are provided with
  55. SLIP.
  56.  
  57.  
  58. CONFIGURING SLIP
  59. ================
  60. You can configure SLIP using the TCP/IP for OS/2 configuration notebook.
  61. During installation and configuration, changes are made to your CONFIG.SYS
  62. file and your SLIP.CFG file.  SLIP.CFG is a sample configuration file con-
  63. tained in the ETC subdirectory of your TCP/IP for OS/2 directory.
  64.  
  65.  
  66. CONFIG.SYS CHANGES
  67.  
  68. When you install SLIP using TCPINST, the following statements are added to
  69. your CONFIG.SYS file:
  70.  
  71.        DEVICE=\path\INET.SYS
  72.        DEVICE=\path\IFNDIS.SYS or IFNDISNL.SYS
  73.        RUN=c:\path\CNTRL.EXE
  74.  
  75. where \path is the path to the TCPIP\BIN directory or the IBMCOM\PROTOCOL
  76.       _____
  77. directory when LAN Adapter Protocol Support (LAPS) is installed.
  78.  
  79. NOTE:  If you are using SLIP as your only interface, you may be able to
  80. replace IFNDIS.SYS with IFNDISNL.SYS.  Replacing IFNDIS.SYS with IFNDISNL.SYS
  81. removes the requirement for Protocol Manager and associated files (LAPS
  82. portion of NTS/2).
  83.  
  84.  
  85. SLIP.CFG CHANGES
  86.  
  87. The configuration file for slip is named SLIP.CFG and is located in the ETC
  88. subdirectory.  When you configure SLIP using the TCP/IP for OS/2 configura-
  89. tion notebook, your SLIP.CFG file is modified to include the following param-
  90. eters of the interface statement:
  91.  
  92. PARAMETER           DESCRIPTION
  93.  
  94. device              Is set to the COM device over which the SLIP interface is
  95.                     to run (the default is COM1).
  96.  
  97. compression         Is set to OFF if the remote end of the SLIP link does not
  98.                     understand VJ compression.
  99.  
  100. Example:
  101.  
  102. For an interface using COM3 without compression, the interface line in your
  103. SLIP.CFG file would be changed from:
  104.  
  105.      interface sl0 { }
  106. to
  107.      interface sl0 { device=COM3 compression=off }
  108.  
  109. If you want to use attachment scripts to automatically establish a SLIP con-
  110. nection, you must specify two additional parameters as part of the interface
  111. statement.  You can add these parameters either by using the TCP/IP for OS/2
  112. configuration notebook to configure SLIP or by editing the SLIP.CFG file man-
  113. ually.  The parameters to add are:
  114.  
  115. PARAMETER       DESCRIPTION
  116.  
  117. attachcmd       Specifies the name of the attachment script file to run.
  118.  
  119.                 If the file is not in a directory that is specified in the
  120.                 PATH statement of your CONFIG.SYS file, you must specify the
  121.                 full path name in your SLIP.CFG file.  If you specify the
  122.                 full path name in your SLIP.CFG file, you must use two back-
  123.                 slash characters (\\).
  124.  
  125.                 For example:
  126.  
  127.                   attachcmd = C:\\TCPIP\\ETC\\ FONUSER.CMD)
  128.  
  129. attachparms     Specifies the parameters to pass to the attachment script.
  130.                 The parameters must be enclosed in double quotes and sepa-
  131.                 rated by spaces.  SLIP will automatically pass the interface
  132.                 (sl0) as the first parameter.
  133.  
  134.                 For example:
  135.  
  136.                   attachparms = "ATDT 123-555-1111"
  137.  
  138.  
  139. CONFIGURING A COMMUNICATIONS PORT
  140. =================================
  141.  
  142. Before you establish a SLIP connection, you need to configure your communi-
  143. cations port.  For your first connection, we recommend you make only minimal
  144. changes to SLIP.CFG and that you force the modem not to use compression.
  145. Once this setup is working, you can modify the parameters to get the optimum
  146. throughput for your network.
  147.  
  148. Use the MODE command to configure your communications port.
  149.  
  150. NOTE:  If you are going to use this connection on a regular basis, you can
  151. specify this information in your CONFIG.SYS file or in your STARTUP.CMD file.
  152.  
  153. Issue the MODE command as follows:
  154.  
  155. MODE COMn: speed,N,8,1,BUFFER=ON,RTS=HS
  156.  
  157. where n is the number of your communications port and speed is the speed of
  158. your modem (1200 to 38400).
  159.  
  160. NOTE:  If the Modem/COM port supports buffering (16550 UART chip), set buf-
  161. fering to ON for optimum performance, especially if you are using data com-
  162. pression.  If your machine does not support buffering, you may need to force
  163. your modem not to use compression.  If you are not sure if your PC/Modem sup-
  164. ports this function, you can issue the OS/2 MODE command:
  165.  
  166. MODE COMn BUFFER=ON
  167.  
  168. and check the result.
  169.  
  170. Also, the modem should be configured to follow DTR.  This enables the modem
  171. to end the connection when SLIP.EXE is halted.
  172.  
  173. For more information about setting up your modem, read your modem documenta-
  174. tion.
  175.  
  176.  
  177. ESTABLISHING A SLIP CONNECTION
  178. ==============================
  179.  
  180. There are three methods for establishing a SLIP connection:
  181.  
  182. 1.  Connecting manually with SLIPTERM
  183. 2.  Connecting automatically with attachment scripts
  184. 3.  Connecting through a null-modem cable
  185.  
  186.  
  187. CONNECTING MANUALLY WITH SLIPTERM
  188.  
  189. To manually establish a SLIP connection using SLIPTERM, do the following:
  190.  
  191. 1.  Ensure that your communications port is configured correctly.
  192.  
  193.     Read "Configuring a Communications Port" on page 3 for more information.
  194.  
  195. 2.  Start the SLIP driver.
  196.  
  197.     At an OS/2 command prompt, type:
  198.  
  199.     SLIP
  200.  
  201.     and press Enter.
  202.  
  203. 3.  Start SLIPTERM.
  204.  
  205.     At an OS/2 command prompt, type:
  206.  
  207.     SLIPTERM
  208.  
  209.     and press Enter.
  210.  
  211.     NOTE:  For information about the optional parameters of SLIPTERM, read
  212.     "SLIP Utilities" on page 8.
  213.  
  214.     SLIPTERM requests access to the COM port from SLIP and enables interac-
  215.     tive communication with the modem.  When communicating with the modem,
  216.     you may need to enter all commands in upper-case.
  217.  
  218.     Type the following:
  219.  
  220.     ATDT nnn-nnn-nnnn)
  221.  
  222.     where nnn-nnn-nnnn) is the phone number of the system to which you want
  223.     to connect.  To cause a pause when dialing, you can specify a comma
  224.     within the phone number.  Each occurrence of a comma causes a two second
  225.     pause.  For example, if you needed to access an outside line, wait for 4
  226.     seconds, then dial the phone number, you would enter:
  227.  
  228.     ATDT 9,, nnn-nnn-nnnn)
  229.  
  230.     When a connection is established, press ESC (or F10) to exit SLIPTERM.
  231.  
  232. 4.  Configure the SLIP interface (sl0) with your SLIP address, and with the
  233.     address of the destination machine.
  234.  
  235.     At an OS/2 command prompt, type:
  236.  
  237.     IFCONFIG SL0 local_IP_address remote_IP_address
  238.  
  239.     and press Enter.
  240.  
  241. 5.  To add a default route, type:
  242.  
  243.     ROUTE ADD DEFAULT destination_IP_address metric
  244.  
  245.     and press Enter.
  246.  
  247. NOTE:  You can place the IFCONFIG and ROUTE commands in a command file.  If
  248. you place them in the command file, the command file can check ERRORLEVEL
  249. after running SLIPTERM.  If you exit SLIPTERM using the ESC key, a non-zero
  250. value will be returned.  If you exit SLIPTERM using F10, a zero value will be
  251. returned.  This can be used to check whether the SLIP interface is config-
  252. ured.
  253.  
  254.  
  255. CONNECTING AUTOMATICALLY WITH ATTACHMENT SCRIPTS
  256.  
  257. One of the features of SLIP is the support for the use of REXX attachment
  258. scripts to automate the attachment of a SLIP interface.  The SLIP driver
  259. automatically initiates the script when it attaches to the interface.  The
  260. script can use the full power of REXX and issue OS/2 commands as necessary.
  261. The SLIP driver defines additional REXX functions that can be used to access
  262. the COM port that the driver is using for the interface.  SLIP.EXE will check
  263. the return code on the exit of the script.  If the result is a non-zero
  264. value, SLIP.EXE will terminate.
  265.  
  266. You may want to use either SLIPWAIT or the -w option of SLIPTERM.  SLIPWAIT
  267. takes a single numeric argument, which is the number of seconds to wait for
  268. SLIP to complete startup (defaults to 30).  SLIPWAIT can be used to pause an
  269. attachment script while waiting for SLIP.EXE to fully start up.
  270.  
  271.  
  272. Defining the Interface
  273.  
  274. To use an attachment script for an interface, set the interface definition
  275. parameters "attachcmd" and "attachparms" in the SLIP configuration file
  276. SLIP.CFG.  For example:
  277.  
  278.   interface sl0 { attachcmd=FONUSER.CMD attachparms="parm1 parm2 parm3" }
  279.  
  280. causes SLIP to run the script FONUSER.CMD with the parameters "sl0, "parm1
  281. parm2 parm3"".
  282.  
  283. SLIP always passes the name of the interface for which the script is running
  284. as the first argument, with the remaining arguments used as attachment param-
  285. eters.
  286.  
  287.  
  288. SLIP REXX Functions
  289.  
  290. The following functions are available to REXX scripts run by the SLIP driver:
  291.  
  292. o   "slip_com_input ( interface , [ max_characters ] , [ timeout ] )"
  293.  
  294.     This function reads characters from an interface's COM port.
  295.  
  296.     interface       The name of the interface (sl0).  This should be the same
  297.                     as the interface name supplied as the first argument to
  298.                     the script.
  299.  
  300.     max_characters  The maximum number of characters to return with this
  301.                     call.  The default is 255.
  302.  
  303.     timeout         The time to wait (in milliseconds) if no data is avail-
  304.                     able on the port.  If you do not specify this value or if
  305.                     you specify zero, the port waits until data arrives.
  306.  
  307. o   "slip_com_output ( interface , string )"
  308.  
  309.     This function writes characters to an interface's COM port.
  310.  
  311.     interface       The name of the interface (sl0); should be the same as
  312.                     the interface name supplied as the first argument to the
  313.                     script.
  314.  
  315.     string          The character string to be sent to the COM port.  Specify
  316.                     the character string exactly as you want it sent.
  317.  
  318.     NOTE:  Even when this function returns to the REXX script, not all of the
  319.     characters may have actually been transmitted over the COM port.  There
  320.     are internal buffers within the SLIP driver that may hold the outgoing
  321.     COM data while the port is busy or disconnected.
  322.  
  323. o   "slip_getch ()"
  324.  
  325.     This function reads a character from the keyboard and returns that char-
  326.     acter.  It does not echo the character read to the screen.  Use this
  327.     function when attachment scripts need to prompt the user for a password
  328.     or other sensitive information.
  329.  
  330. Sample Attachment Scripts
  331.  
  332. Three sample attachment scripts are provided with SLIP.  They are
  333. FONUSER.CMD, SLIPUP.CMD, and AUTOANS.CMD, and are located in the TCPIP\BIN
  334. subdirectory.
  335.  
  336. FONUSER.CMD is a sample attachment script that can be used for a basic SLIP
  337. client that does not require a userid and password prior to starting a SLIP
  338. connection.
  339.  
  340. SLIPUP.CMD is a sample attachment script that can be used to connect to a
  341. SLIP server that requires a userid and a password prior to getting a SLIP
  342. connection.  The sample also demonstrates how the client can receive IP
  343. address information and issue IFCONFIG and ROUTE commands to establish the
  344. connection.
  345.  
  346. AUTOANS.CMD is a sample attachment script that enables your modem to and
  347. receive calls from other SLIP clients.
  348.  
  349. Additional information is available as comments in the attachment script
  350. files in the ETC subdirectory.
  351.  
  352.  
  353. CONNECTING USING A NULL-MODEM CABLE
  354.  
  355. To establish a SLIP connection using a null-modem cable, do the following:
  356.  
  357. 1.  Ensure that the null-modem cable is properly attached.
  358.  
  359. 2.  Ensure that your communications port is configured correctly.
  360.  
  361.     Read "Configuring a Communications Port" on page 3 for more information.
  362.  
  363. 3.  Start the SLIP driver.
  364.  
  365.     At an OS/2 command prompt, type:
  366.  
  367.     SLIP
  368.  
  369.     and press Enter.
  370.  
  371. 4.  Configure the SLIP interface (sl0) with your SLIP address, and with the
  372.     address of the destination machine.
  373.  
  374.     At an OS/2 command prompt, type:
  375.  
  376.     IFCONFIG SL0 local_IP_address remote_IP_address
  377.  
  378.     and press Enter.
  379.  
  380.  
  381. ENDING A SLIP CONNECTION
  382. ========================
  383.  
  384. Before you end a SLIP connection, ensure that no applications are using the
  385. SLIP interface.
  386.  
  387. If your modem has been configured to follow DTR or if you are using a null-
  388. modem cable, access the window in which the SLIP.EXE is running and press
  389. CTRL+C.  This will cause the modem to disconnect as the SLIP.EXE is halted.
  390.  
  391. If you established your SLIP connection over a phone line, you can also end
  392. the SLIP connection by doing the following:
  393.  
  394. 1.  Start SLIPTERM.
  395.  
  396.     At an OS/2 window, type SLIPTERM and press Enter.
  397.  
  398. 2.  Invoke the modem command mode:
  399.  
  400.     Press and hold the Shift key and enter three plus signs (+ + +).
  401.  
  402. 3.  Send the modem a hang-up attention command:
  403.  
  404.     Type ATH
  405.  
  406.  
  407. SLIP UTILITIES AND FILES
  408. ========================
  409.  
  410. SLIP provides several utilities and files.  This section summarizes the util-
  411. ities and files.
  412.  
  413.  
  414. SLIP UTILITIES
  415.  
  416. The following is a list of the utilities of the SLIP interface and the syntax
  417. to invoke each.
  418.  
  419. SLIP.EXE        The main SLIP driver
  420.  
  421.                 Syntax
  422.  
  423.                 >>--slip--.----.--><
  424.                           '--d-'
  425.  
  426.  
  427.                 -d enables debugging output
  428.  
  429.                 WARNING:  A DEBUG OPTION CAN PRODUCE LARGE AMOUNTS OUTPUT AND
  430.                 CAN SLOW PERFORMANCE.  YOU MAY WANT TO REDIRECT THE DEBUGGING
  431.                 OUTPUT TO A FILE.
  432.  
  433. SLIPWAIT.EXE    A utility that causes a pause of a specified period of time
  434.                 to wait for SLIP to complete startup (the default is 30).
  435.  
  436.                 Syntax
  437.  
  438.                 >>--slipwait--.----.--><
  439.                               '-nn-'
  440.  
  441.  
  442.                 nn specifies number of seconds to wait (the default is 30)
  443.                 __
  444.  
  445. SLIPTERM.EXE    A utility that enables interactive communication with a
  446.                 modem.
  447.  
  448.                 Syntax
  449.  
  450.                 >>--slipterm--.------------.--.----.--><
  451.                               '--w--.----.-'  '--d-'
  452.                                     '-nn-'
  453.  
  454.  
  455.                 -w invokes the SLIPWAIT utility
  456.  
  457.                 nn specifies the number of seconds to wait (the default is
  458.                 __
  459.                 30)
  460.  
  461.                 -d enables debugging mode
  462.  
  463. SLIPHOLD.EXE    A utility to hold a communications port open.
  464.  
  465.                 Syntax
  466.  
  467.                 >>--sliphold--><
  468.  
  469.  
  470. SLCFG.EXE       A utility to test parsing of the SLIP.CFG file.
  471.  
  472.                 Syntax
  473.  
  474.                 >>--slcfg--slip.cfg--.----.--><
  475.                                      '--d-'
  476.  
  477.  
  478.                 slip.cfg is the name of file to process
  479.  
  480.                 -d enables debugging mode
  481.  
  482.  
  483. SLIP FILES
  484.  
  485. The following is a list of the files provided by SLIP:
  486.  
  487. ETC\SLIP.CFG    A sample SLIP configuration file
  488.  
  489. BIN\AUTOANS.CMD A sample attachment script that enables your modem to and
  490.                 receive calls from other SLIP clients.  To use this file,
  491.                 specify:
  492.  
  493.                 "attachcmd=autoans"
  494.  
  495.                 as a parameter of the interface statement.
  496.  
  497. BIN\SLIP.ICO    The icon that represents the SLIP.EXE
  498.  
  499. BIN\FONUSER.CMD A sample attachment script that can be used for a basic SLIP
  500.                 client that does not require a userid and password prior to
  501.                 starting a SLIP connection.  To use this file, specify:
  502.  
  503.                 "attachcmd=slipup attachparm=""dialcmd"
  504.                                                _______
  505.  
  506.                 as a parameter of the interface statement.
  507.  
  508. BIN\SLIPUP.CMD  A sample attachment script that can be used to connect to a
  509.                 SLIP server that requires a userid and a password prior to
  510.                 getting a SLIP connection.  The sample also includes informa-
  511.                 tion on how the client can receive IP address information and
  512.                 issue IFCONFIG and ROUTE commands to establish the con-
  513.                 nection.  To use this file, specify:
  514.  
  515.                 "attachcmd=slipup attachparm=""dialcmd username password"
  516.  
  517.                 as a parameter of the interface statement.
  518.  
  519. BIN\IFNDISNL.SYS
  520.                 A null version of IFNDIS.SYS which can be used in place of
  521.                 the standard IFNDIS.SYS if you are using only the SLIP inter-
  522.                 face (not LAN, SNALINK, or X.25 interfaces)
  523.  
  524.                 IFNDISNL.SYS does not require LAPS, and it uses less system
  525.                 resources than IFNDIS.SYS.
  526.