Stallion Technologiessupport
Product documentation
online documentation
 
Documetation image, 8K

EasyServer II: Setting Up Devices and Services (continued)

EasyConnection

EasyIO

EasyServer II

Go to Previous Page Go to Contents Page Go to Next Page

Contents: 

Part Five: 

Click Here to go to Setting up Dial on Demand Page 2 


Setting up Dial on Demand

The INTERNET DOD command is used to modify the DOD table. 
The dial on demand subsystem uses this table to determine how and when to initiate, terminate and maintain connections. The table specifies a list of which filter to use,  the phone number to dial,  which dialer script to use and which ports may be used. 

Dial On Demand network connections are made only when required,  and will normally be configured to disconnect after a specified idle period. 

This section outlines the following topics: 

  • Overview
  • Creating a DIALER
  • Creating a simple FILTER
  • Creating the DOD Setup
  • Testing your setup
  • Routing considerations
  • Bi-directional DOD

Overview

The DOD configuration is comprised of three parts: 

Part 1. 
The dialup protocol and network addresses to be used for the connection. These addresses and this protocol determine the network that will be established by DOD.  This information is usually provided by the administrator of the site to which you are connecting.  It includes the local IP address,  the remote IP address and the subnet mask. 

Part 2.  
The DIALER configuration.  The DIALER configuration enables DOD to call a system,  login and start the appropriate networking.  DIALER configuration is crucial to the correct operation of DOD. 

Part 3. 
The FILTER configuration.  FILTERS allow DOD to determine which packets will cause a connection to be established,  which packets will maintain a link,  and how long the link will remain connected.  Filters can be simple or relatively complex, as required by the particular application. If a DOD setup has no filter, it will automatically connect and remain so. 

Creating a Dialer

Modem Dialers

Dialers are used with modems to initiate outgoing connections from the Communications Server.  There is a name associated with each dialer entry that will normally identify of the remote machine to be connected with. Each dialer specifies a script to issue modem commands which makes the connection.  Once the dialer script has completed successfully, the connection will be similar to a CONNECT LOCAL PORT session.  The dialer entries do not specify a particular port. 

When connecting with a dialer, the Communications Server searches for an available port with MODEM CONTROL ENABLED and its access mode set to REMOTE or DYNAMIC. The Server then proceeds to execute the dialer script to make the remote connection.  If the dialer script is not specified, the user will be allocated a modem port only and must then type in the proper modem commands to make an outgoing call. 

The following is an example of setting up a dialer and establishing a connection: 

Local 1>> DEFINE DIALER wysenet2 SCRIPT "atdt1234 CONNECT" 
Local 1>> LIST DIALERS 
Dialer Name     Protocol     Dialer Script 
wysenet2        None         "atdt1234 CONNECT" 
Local 1>> CONNECT DIALER wysenet2 
Local -129- Dialing "wysenet2" on port 8 
Local -133- Dialer connection [wysenet2] established 
Local -051- Session 1 [Port 1->8] established 

Dialer Scripts

Dialer scripts are lists of strings used to communicate with modems and remote hosts.  They are general  enough for most purposes and only have two reserved keywords.  A script is enclosed in quotes and consist of a series of smaller strings separated by spaces, for example: "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. 

Special Effect on expect or output string 

\c Do not append carriage return to output
\d Output delayed by 2 seconds
\p Output delayed by 1/4 second
\\ RP with backslash character "\"
\^ RP with caret character "^"
\ddd RP with ascii character whose value is = to the octal value ddd
\n RP with newline character
\r RP with carriage return character
\s RP with space character
^c RP with control character "c"
\T Output the phone number (above codes are not interpreted)
\D Output the phone number (above codes are interpreted)

Each output string has a carriage return character appended to it unless it contains the special sequence "\c".  Expect strings do not have anything appended to them and don't require the "\c" sequence. Expect strings can be 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 (default is 30 seconds). For example, the script "atdt1234 TIMEOUT 10 login: wysenet password: wysenet" sets the timeout value to 10 seconds and attempts to log into an account called wysenet.
  • 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.  For example, the script "atdt1234 ABORT NO\sDIALTONE ABORT BUSY login: wysenet password: wysenet" sets up two abort strings and attempts to log into an account called wysenet. If the modem cannot detect a dial tone or the phone line on the other modem is busy the script will fail immediately without waiting until the current timeout value expires.
  • An expect string can also be formed by a nested series of expect and output strings separated by dashes ('-').  "expecta-outputa-expectb-outputb-expectc-...-expectn"  This format is interpreted as expect string "expecta". If that fails then output string "outputa" and expect string "expectb". If that fails then output string "outputb" and expect string "expectc".  And so on until either a match occurs or there are no pairs of nested expect-output strings.

Creating a Simple Dialer

Using a Terminal or Terminal emulator,  go through all the steps to log onto the system you will be calling.  Make careful note of the text that appears just before you need to enter information.  Also take careful note of any information you need to enter.  These two pieces of information are basically the chat script for your DIALER. 

The following example sets up a dialer called "isp" for PPP using a typical login style chat script. 

CHANGE DIALER isp PROTOCOL PPP 
CHANGE DIALER isp HOST ADDRESS 192.168.0.1 
CHANGE DIALER isp LOCAL ADDRESS 192.168.0.2 
CHANGE DIALER isp SUBNET MASK 255.255.255.0 
CHANGE DIALER isp SCRIPT "atdt123 ogin:--ogin: npp password: 
nppp" 

Once we have created a dialer,  and configured a port for use with a modem (see MODEM tutorial), we are ready to test the dialer.  From the servers command prompt enter: 

CONNECT DIALER isp DIAGNOSTICS ENABLED 

It is best to test your dialer with diagnostics enabled so that you may see why it is failing and correct any errors in the script. 


   

Go to Top of Page

Go to Previous Page Go to Contents Page Go to Next Page

Copyright © 2007 Lantronix. All rights reserved