Contents:
Part Six:
Configuring
the Server for a dialup PPP link to a SCO UNIX host
The process for configuring a dialup PPP connection between an Communications
Server and a Unix Host can be broken down into a number of steps.
Firstly, a port has to be configured to be used as the modem port on
which to dial out. Then a dialer script has to be configured to
do the dialling. PPP has to be associated with the appropriate
dialer script.
The commands to be used to configure the Communications Server are
as follows. Assuming Port 4 is to be used, the commands are as
follows::
Configuring the
Communications Server
Port Configuration
- change port 4 autobaud disabled speed
- change port 4 modem control enabled
- change port 4 access dynamic
Dialer Script Configuration
Please also refer to section 'Dialer Scripts' below.
- change dialer script 'atz0 OK at OK atdt\T TIMEOUT 60 ogin:
\dnppp word:' password
- change dialer protocol ppp
- change dialer host address
- change dialer local address
The first dialer command creates the dialer script, which is used by
the Communications Server to connect to the Unix host. The actual
script is contained within the double quote characters, and the commands
are as follows.
- the atz0 resets the modem and loads the profile stored as profile
0
- the modem responds with the string OK
- the at simply sees if the modem is available after the reset
- the modem responds with an OK
- the atdt dials the number of the modem attached to the Unix host
- the TIMEOUT 60 allows up to 60 seconds for the modem to dial and
connect
- the ogin: is the end of the login prompt from the Unix host
- the \dnppp waits for 2 seconds after receiving the login prompt
and then sends the user name nppp. This is how you start PPP
on a SCO Unix system and may be different for operating systems other
than SCO Unix.
- the Unix host should then ask for a password and the prompt should
end in word:
- the script then sends the appropriate password for this username
- After this sequence has completed successfully, a PPP connection
will be established between the Communications Server and the UNIX
Host.
The second command associates the PPP protocol with the dialer script.
The third and fourth commands associate IP addresses with both ends
of the PPP link.
Making the Connection
to the Unix Host
The command to make the PPP connection between the Server and the Unix
host is:
connect dialer name
Whilst debugging the dialer script, you can use the command:
connect dialer name diagnostics enabled
This command will output trace to the terminal screen indicating the
progress of the dialer script and any error messages that may occur.
Once the PPP connection has been established, you will be able to telnet
or rlogin to the Unix host.
Dialer Scripts
Dialer scripts are lists of strings used to communicate with modems
and remote hosts. A script is enclosed in quotes and consists of a series
of smaller strings separated by spaces, as follows:
'output1 expect1 output2
expect2...outputn expectn'
The strings alternate between data to be output to the port and data
to be expected from the port. The strings may contain special character
sequences to aid with inserting control characters. Table 5-1 lists
special character sequences and their effect when used in an expect
or output string.
Table 5-1 Special Character Sequences
|
Special Character
|
Effect on Expect or Output String
|
|
\c
|
Does not append carriage return to output |
|
\d
|
Delays output by two seconds |
|
\p
|
Delays output by - second |
|
\\
|
Replaces with backslash character (\) |
|
\^
|
Replaces with caret character (^) |
|
\ddd
|
Replaces with ASCII character whose value is equal
to the octal value of ddd |
|
\n
|
Replaces with newline character |
|
\r
|
Replaces with carriage return character |
|
\s
|
Replaces with space character |
|
^c
|
Replaces with control character 'c' |
Each output string has a carriage return character appended to it,
unless it contains the no carriage return sequence (\c). Expect strings
do not have anything appended to them and don't require the no carriage
return sequence (\c).
Expect strings can be a little more complicated. An expect string of
a single dash (-) means to expect nothing and proceed with the next
output string. An expect string of 'TIMEOUT' followed by a number of
seconds will change the timeout value (the default is 30 seconds). An
expect string of 'ABORT' followed by a second string will cause the
script to abort if the second string is encountered on any input from
the port. Multiple abort strings can be specified within a script. A
match with any of the abort strings will cause the script to fail.
An expect string can also be formed by a nested series of expect and
output strings separated by dashes (-).
'expect -output
-expect -output -expect ...-expect'
a a
b b
c n
This format is interpreted as expect string expect a. If that
fails then output string outputa and expect string expect b.
If that fails then output string output b and expect string expect
c. And so on until either a match occurs or there are no more
pairs of nested strings.
The information within quotes following the word 'SCRIPT' shows an
example of a dialer script.
Local 1>> CHANGE DIALER
termserv_ppp SCRIPT 'atdt1234
ABORT BUSY TIMEOUT 20 CONNECT \r\d\r\d\r username: termserv_ppp Password:
netbox'
Go to
Top of Page