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 >
Wrap
Text File
|
1993-08-02
|
19KB
|
526 lines
The following is a description of the new SLIP interface for
OS/2 TCP/IP. This will be the SLIP interface that IBM will use
as corrective service for OS/2 TCP/IP 1.2.1 users who have OS/2
2.1. It will also be part of future releases of OS/2 TCP/IP.
There are several changes. SLIO.EXE is replaced by SLIP.EXE
and SLIPCALL is replaced by SLIPTERM. SLIP supports REXX
command files for creating dialing scripts and SLIP supports
VJ compression. We apoligize for changing the interface but
we are convinced that you will appreciate the changes.
The following description is part of a chapter of a new book
for OS/2 TCP/IP. Please ignore the references to TCPCFG.
Please use the text to understand how SLIP.CFG, and SLIPTERM
will help you.
USING THE SLIP INTERFACE
==========================
The Serial Line Internet Protocol (SLIP) enables you to connect to another
TCP/IP network over a serial line. Serial lines set up point-to-point links
between local hosts and foreign hosts. SLIP enables a local OS/2 host to
connect to a remote host over a telephone line using a modem (which you can
establish either manually or automatically, using attachment scripts) or over
a serial line using a null-modem cable. The SLIP connection allows you to
access the network on which the remote host resides.
You can use any valid OS/2 serial communication port (COM port) for a SLIP
connection. However, with TCP/IP for OS/2, you can use only one communi-
cations (COM) port at a time. Therefore, if you have a established a SLIP
connection, you cannot originate or accept another SLIP connection.
NOTES:
1. Before you can use SLIP, the OS/2 Device Support must be installed. This
results in the DEVICE=COM.SYS statement in your CONFIG.SYS.
2. Because the attachment scripts are written in REXX, if you want to use
attachment scripts to establish a SLIP connection, the REXX function of
OS/2 must be installed.
3. The performance of SLIP depends on the speed of the modems. The perform-
ance of some applications, when used with SLIP, can be affected.
This chapter describes following tasks:
o Installing and configuring SLIP
o Configuring a communications port
o Establishing a SLIP connection
- Manually
- Automatically, using attachment scripts
- Using a null-modem cable
o Ending a SLIP connection
It also provides a summary of the utilities and files that are provided with
SLIP.
CONFIGURING SLIP
================
You can configure SLIP using the TCP/IP for OS/2 configuration notebook.
During installation and configuration, changes are made to your CONFIG.SYS
file and your SLIP.CFG file. SLIP.CFG is a sample configuration file con-
tained in the ETC subdirectory of your TCP/IP for OS/2 directory.
CONFIG.SYS CHANGES
When you install SLIP using TCPINST, the following statements are added to
your CONFIG.SYS file:
DEVICE=\path\INET.SYS
DEVICE=\path\IFNDIS.SYS or IFNDISNL.SYS
RUN=c:\path\CNTRL.EXE
where \path is the path to the TCPIP\BIN directory or the IBMCOM\PROTOCOL
_____
directory when LAN Adapter Protocol Support (LAPS) is installed.
NOTE: If you are using SLIP as your only interface, you may be able to
replace IFNDIS.SYS with IFNDISNL.SYS. Replacing IFNDIS.SYS with IFNDISNL.SYS
removes the requirement for Protocol Manager and associated files (LAPS
portion of NTS/2).
SLIP.CFG CHANGES
The configuration file for slip is named SLIP.CFG and is located in the ETC
subdirectory. When you configure SLIP using the TCP/IP for OS/2 configura-
tion notebook, your SLIP.CFG file is modified to include the following param-
eters of the interface statement:
PARAMETER DESCRIPTION
device Is set to the COM device over which the SLIP interface is
to run (the default is COM1).
compression Is set to OFF if the remote end of the SLIP link does not
understand VJ compression.
Example:
For an interface using COM3 without compression, the interface line in your
SLIP.CFG file would be changed from:
interface sl0 { }
to
interface sl0 { device=COM3 compression=off }
If you want to use attachment scripts to automatically establish a SLIP con-
nection, you must specify two additional parameters as part of the interface
statement. You can add these parameters either by using the TCP/IP for OS/2
configuration notebook to configure SLIP or by editing the SLIP.CFG file man-
ually. The parameters to add are:
PARAMETER DESCRIPTION
attachcmd Specifies the name of the attachment script file to run.
If the file is not in a directory that is specified in the
PATH statement of your CONFIG.SYS file, you must specify the
full path name in your SLIP.CFG file. If you specify the
full path name in your SLIP.CFG file, you must use two back-
slash characters (\\).
For example:
attachcmd = C:\\TCPIP\\ETC\\ FONUSER.CMD)
attachparms Specifies the parameters to pass to the attachment script.
The parameters must be enclosed in double quotes and sepa-
rated by spaces. SLIP will automatically pass the interface
(sl0) as the first parameter.
For example:
attachparms = "ATDT 123-555-1111"
CONFIGURING A COMMUNICATIONS PORT
=================================
Before you establish a SLIP connection, you need to configure your communi-
cations port. For your first connection, we recommend you make only minimal
changes to SLIP.CFG and that you force the modem not to use compression.
Once this setup is working, you can modify the parameters to get the optimum
throughput for your network.
Use the MODE command to configure your communications port.
NOTE: If you are going to use this connection on a regular basis, you can
specify this information in your CONFIG.SYS file or in your STARTUP.CMD file.
Issue the MODE command as follows:
MODE COMn: speed,N,8,1,BUFFER=ON,RTS=HS
where n is the number of your communications port and speed is the speed of
your modem (1200 to 38400).
NOTE: If the Modem/COM port supports buffering (16550 UART chip), set buf-
fering to ON for optimum performance, especially if you are using data com-
pression. If your machine does not support buffering, you may need to force
your modem not to use compression. If you are not sure if your PC/Modem sup-
ports this function, you can issue the OS/2 MODE command:
MODE COMn BUFFER=ON
and check the result.
Also, the modem should be configured to follow DTR. This enables the modem
to end the connection when SLIP.EXE is halted.
For more information about setting up your modem, read your modem documenta-
tion.
ESTABLISHING A SLIP CONNECTION
==============================
There are three methods for establishing a SLIP connection:
1. Connecting manually with SLIPTERM
2. Connecting automatically with attachment scripts
3. Connecting through a null-modem cable
CONNECTING MANUALLY WITH SLIPTERM
To manually establish a SLIP connection using SLIPTERM, do the following:
1. Ensure that your communications port is configured correctly.
Read "Configuring a Communications Port" on page 3 for more information.
2. Start the SLIP driver.
At an OS/2 command prompt, type:
SLIP
and press Enter.
3. Start SLIPTERM.
At an OS/2 command prompt, type:
SLIPTERM
and press Enter.
NOTE: For information about the optional parameters of SLIPTERM, read
"SLIP Utilities" on page 8.
SLIPTERM requests access to the COM port from SLIP and enables interac-
tive communication with the modem. When communicating with the modem,
you may need to enter all commands in upper-case.
Type the following:
ATDT nnn-nnn-nnnn)
where nnn-nnn-nnnn) is the phone number of the system to which you want
to connect. To cause a pause when dialing, you can specify a comma
within the phone number. Each occurrence of a comma causes a two second
pause. For example, if you needed to access an outside line, wait for 4
seconds, then dial the phone number, you would enter:
ATDT 9,, nnn-nnn-nnnn)
When a connection is established, press ESC (or F10) to exit SLIPTERM.
4. Configure the SLIP interface (sl0) with your SLIP address, and with the
address of the destination machine.
At an OS/2 command prompt, type:
IFCONFIG SL0 local_IP_address remote_IP_address
and press Enter.
5. To add a default route, type:
ROUTE ADD DEFAULT destination_IP_address metric
and press Enter.
NOTE: You can place the IFCONFIG and ROUTE commands in a command file. If
you place them in the command file, the command file can check ERRORLEVEL
after running SLIPTERM. If you exit SLIPTERM using the ESC key, a non-zero
value will be returned. If you exit SLIPTERM using F10, a zero value will be
returned. This can be used to check whether the SLIP interface is config-
ured.
CONNECTING AUTOMATICALLY WITH ATTACHMENT SCRIPTS
One of the features of SLIP is the support for the use of REXX attachment
scripts to automate the attachment of a SLIP interface. The SLIP driver
automatically initiates the script when it attaches to the interface. The
script can use the full power of REXX and issue OS/2 commands as necessary.
The SLIP driver defines additional REXX functions that can be used to access
the COM port that the driver is using for the interface. SLIP.EXE will check
the return code on the exit of the script. If the result is a non-zero
value, SLIP.EXE will terminate.
You may want to use either SLIPWAIT or the -w option of SLIPTERM. SLIPWAIT
takes a single numeric argument, which is the number of seconds to wait for
SLIP to complete startup (defaults to 30). SLIPWAIT can be used to pause an
attachment script while waiting for SLIP.EXE to fully start up.
Defining the Interface
To use an attachment script for an interface, set the interface definition
parameters "attachcmd" and "attachparms" in the SLIP configuration file
SLIP.CFG. For example:
interface sl0 { attachcmd=FONUSER.CMD attachparms="parm1 parm2 parm3" }
causes SLIP to run the script FONUSER.CMD with the parameters "sl0, "parm1
parm2 parm3"".
SLIP always passes the name of the interface for which the script is running
as the first argument, with the remaining arguments used as attachment param-
eters.
SLIP REXX Functions
The following functions are available to REXX scripts run by the SLIP driver:
o "slip_com_input ( interface , [ max_characters ] , [ timeout ] )"
This function reads characters from an interface's COM port.
interface The name of the interface (sl0). This should be the same
as the interface name supplied as the first argument to
the script.
max_characters The maximum number of characters to return with this
call. The default is 255.
timeout The time to wait (in milliseconds) if no data is avail-
able on the port. If you do not specify this value or if
you specify zero, the port waits until data arrives.
o "slip_com_output ( interface , string )"
This function writes characters to an interface's COM port.
interface The name of the interface (sl0); should be the same as
the interface name supplied as the first argument to the
script.
string The character string to be sent to the COM port. Specify
the character string exactly as you want it sent.
NOTE: Even when this function returns to the REXX script, not all of the
characters may have actually been transmitted over the COM port. There
are internal buffers within the SLIP driver that may hold the outgoing
COM data while the port is busy or disconnected.
o "slip_getch ()"
This function reads a character from the keyboard and returns that char-
acter. It does not echo the character read to the screen. Use this
function when attachment scripts need to prompt the user for a password
or other sensitive information.
Sample Attachment Scripts
Three sample attachment scripts are provided with SLIP. They are
FONUSER.CMD, SLIPUP.CMD, and AUTOANS.CMD, and are located in the TCPIP\BIN
subdirectory.
FONUSER.CMD is a sample attachment script that can be used for a basic SLIP
client that does not require a userid and password prior to starting a SLIP
connection.
SLIPUP.CMD is a sample attachment script that can be used to connect to a
SLIP server that requires a userid and a password prior to getting a SLIP
connection. The sample also demonstrates how the client can receive IP
address information and issue IFCONFIG and ROUTE commands to establish the
connection.
AUTOANS.CMD is a sample attachment script that enables your modem to and
receive calls from other SLIP clients.
Additional information is available as comments in the attachment script
files in the ETC subdirectory.
CONNECTING USING A NULL-MODEM CABLE
To establish a SLIP connection using a null-modem cable, do the following:
1. Ensure that the null-modem cable is properly attached.
2. Ensure that your communications port is configured correctly.
Read "Configuring a Communications Port" on page 3 for more information.
3. Start the SLIP driver.
At an OS/2 command prompt, type:
SLIP
and press Enter.
4. Configure the SLIP interface (sl0) with your SLIP address, and with the
address of the destination machine.
At an OS/2 command prompt, type:
IFCONFIG SL0 local_IP_address remote_IP_address
and press Enter.
ENDING A SLIP CONNECTION
========================
Before you end a SLIP connection, ensure that no applications are using the
SLIP interface.
If your modem has been configured to follow DTR or if you are using a null-
modem cable, access the window in which the SLIP.EXE is running and press
CTRL+C. This will cause the modem to disconnect as the SLIP.EXE is halted.
If you established your SLIP connection over a phone line, you can also end
the SLIP connection by doing the following:
1. Start SLIPTERM.
At an OS/2 window, type SLIPTERM and press Enter.
2. Invoke the modem command mode:
Press and hold the Shift key and enter three plus signs (+ + +).
3. Send the modem a hang-up attention command:
Type ATH
SLIP UTILITIES AND FILES
========================
SLIP provides several utilities and files. This section summarizes the util-
ities and files.
SLIP UTILITIES
The following is a list of the utilities of the SLIP interface and the syntax
to invoke each.
SLIP.EXE The main SLIP driver
Syntax
>>--slip--.----.--><
'--d-'
-d enables debugging output
WARNING: A DEBUG OPTION CAN PRODUCE LARGE AMOUNTS OUTPUT AND
CAN SLOW PERFORMANCE. YOU MAY WANT TO REDIRECT THE DEBUGGING
OUTPUT TO A FILE.
SLIPWAIT.EXE A utility that causes a pause of a specified period of time
to wait for SLIP to complete startup (the default is 30).
Syntax
>>--slipwait--.----.--><
'-nn-'
nn specifies number of seconds to wait (the default is 30)
__
SLIPTERM.EXE A utility that enables interactive communication with a
modem.
Syntax
>>--slipterm--.------------.--.----.--><
'--w--.----.-' '--d-'
'-nn-'
-w invokes the SLIPWAIT utility
nn specifies the number of seconds to wait (the default is
__
30)
-d enables debugging mode
SLIPHOLD.EXE A utility to hold a communications port open.
Syntax
>>--sliphold--><
SLCFG.EXE A utility to test parsing of the SLIP.CFG file.
Syntax
>>--slcfg--slip.cfg--.----.--><
'--d-'
slip.cfg is the name of file to process
-d enables debugging mode
SLIP FILES
The following is a list of the files provided by SLIP:
ETC\SLIP.CFG A sample SLIP configuration file
BIN\AUTOANS.CMD A sample attachment script that enables your modem to and
receive calls from other SLIP clients. To use this file,
specify:
"attachcmd=autoans"
as a parameter of the interface statement.
BIN\SLIP.ICO The icon that represents the SLIP.EXE
BIN\FONUSER.CMD A sample attachment script that can be used for a basic SLIP
client that does not require a userid and password prior to
starting a SLIP connection. To use this file, specify:
"attachcmd=slipup attachparm=""dialcmd"
_______
as a parameter of the interface statement.
BIN\SLIPUP.CMD A sample attachment script that can be used to connect to a
SLIP server that requires a userid and a password prior to
getting a SLIP connection. The sample also includes informa-
tion on how the client can receive IP address information and
issue IFCONFIG and ROUTE commands to establish the con-
nection. To use this file, specify:
"attachcmd=slipup attachparm=""dialcmd username password"
as a parameter of the interface statement.
BIN\IFNDISNL.SYS
A null version of IFNDIS.SYS which can be used in place of
the standard IFNDIS.SYS if you are using only the SLIP inter-
face (not LAN, SNALINK, or X.25 interfaces)
IFNDISNL.SYS does not require LAPS, and it uses less system
resources than IFNDIS.SYS.