This appendix lists some of the most common keywords that appear in the configuration files for Solstice PPP. It also describes the syntax of the CHAT scripts used by Solstice PPP, and includes examples of both interactive and non-interactive CHAT scripts.
The PPP path configuration file (/etc/opt/SUNWconn/ppp/ppp.conf) describes the path used to reach each remote server. Each path is identified by the keyword dialup_path. For example:
dialup_path ip_interface ipdptp0 remote_host miles-ppp request_ip_addr on inactivity_timeout 120 default_route . . |
The most common keywords that may appear in your PPP path configuration file are:
Indicates the start of an asynchronous (or dialup) path definition.
Mandatory parameter. Associates the path with one of the point-to-point (ipdptpn) IP interfaces defined in the ifconfig section of the file.
Mandatory parameter. Identifies the remote server reached using this path. The value name can be any character string.
Optional parameter. Adds the route to the routing table as the default destination.
Optional parameter. Specifies the number of seconds of inactivity that elapse before the connection is closed automatically.
The value seconds can be any integer. The default value is 120 seconds (2 minutes). If the value seconds is set to zero, the connection remains open until closed explicitly.
Optional parameter. Enables dynamic IP address allocation at the client side only. When the value state is set to on, the client requests its IP address from the server. This feature must also be configured and enabled at the server side.
The value state can be on (enabled) or off (disabled). The default value is off.
send_authentication mode
Optional parameter. Indicates whether the client will respond to a request for authentication by the server.
The value mode can be off (no authentication), pap (authentication using PAP), chap (authentication using CHAP), or pap|chap (authentication using both PAP and CHAP). The default value is off.
send_pap_id pap_id
Specifies the PAP identifier sent to the server when it requests authentication. The value pap_id can be any string, between zero and 255 characters in length.
send_pap_passwd pap_passwd
Specifies the PAP password sent to the server when it requests authentication. The value pap_passwd can be any string, between zero and 255 characters in length.
send_chap_name chap_name
Specifies the CHAP name sent to the server when it requests authentication. The value chap_name can be any string, between 1 and 255 characters in length.
chap_own_secret chap_secret
Specifies the CHAP secret that is combined with the challenge value to generate the response sent to the server. The value chap_secret can be any string, between 1 and 255 characters in length.
The link configuration file (/etc/opt/SUNWconn/ppp/link.conf) contains a description of your modem configuration and the dialing information used to make a connection to a remote server.
Each modem configuration is identified by the keyword dialup_device. For example:
dialup_device pppdev0 unix_device ttya line_speed 38400 modem Practical 14400 V32bis call_setup dial |
The most common keywords that may appear in this part of your link configuration file are:
Indicates the start of an asynchronous device definition, and assigns a name to the device.
Specifies the serial port used to connect the client to the modem.
Specifies the line speed for the connection between the client and the modem. For optimum performance, the line speed should be equal to, or greater than, the baud rate of the modem.
Specifies the type of modem connected to the serial port, and associates the asynchronous device with one of the modem definitions in the file /etc/opt/SUNWconn/ppp/modems. This parameter is set to none for a null modem configuration.
This parameter is always set to dial for client configurations.
Each remote server is identified by the keyword remote_host. For example:
remote_host miles phone_number 123456789 chat_script miles.scr |
The most common keywords that may appear in this part of your link configuration file are:
Indicates the start of a remote host definition, and associates it with one of the paths defined in the PPP path configuration file (ppp.conf).
Specifies the telephone number used to call the remote host. This can be an extension number if the call is within the same private branch exchange, and must include any special digits required to pass outside a private branch exchange. The telephone number can consist of digits and characters, including special characters such as # and *. A dummy telephone number is assigned for null modem configurations.
Specifies the name of the file that contains the CHAT script for this connection. By default, the connect scripts for remote hosts are located in the directory /etc/opt/SUNWconn/ppp/script.
The CHAT script defines the dialog that occurs between the client and the server during the connection phase. A simple non-interactive CHAT script uses send and expect keywords to specify the character strings exchanged, as shown in the following example:
# # Chat script for ppp login # # # Set the line regarding the remote site configuration # Due to UUCP limitations some systems only accept cs7 # # setline cs7 parodd send RETURN expect "ogin:" 10 onerror send BREAK repeat 3 send "ppp1" expect "word: " 40 # # Set the ppp password of the remote host here # send "okppp1" |
When it initiates the call, the client waits for a response from the remote server to begin the login sequence. The length of time the client waits, and the number of times it attempts to initiate the call, are defined by the following entry:
expect "ogin:" 10 onerror send BREAK repeat 3 |
The expected response is ogin. The first figure (10) defines the wait period, and the second figure (3) defines the number of call initiation attempts. You can modify both of these parameters.
For example, to retry the call initiation once every 5 seconds for a total of 10 attempts, change the line in the file to:
expect "ogin:" 5 onerror send BREAK repeat 10 |
Interactive CHAT scripts use echo and read keywords to display prompts and to acquire user input. The user input is stored as variables, which are identified by the $ prefix. For example, an interactive version of the previous script could be:
send RETURN expect "ogin:" 10 onerror send BREAK repeat 3 echo "Enter your PPP login id: " read $login send "$login" expect "word: " 40 echo "Enter your PPP password: " read $password send "$password" |
A more complex example shows a CHAT script used to manage the interaction between the user and a dynamic challenge-response authentication system:
send RETURN expect "ID:" 10 onerror send BREAK repeat 3 echo "Enter your user ID number: " read $id send "$id" expect "Challenge: ${challenge,6}" 10 echo "Enter the response for Challenge ${challenge}: " read $response send "$response" expect "${host}:" 20 echo "Connected to ${host}\n" send "ppp" |
In this example, the script reads a user id and sends it to the server. It waits for 10 seconds for a response from the server that starts with the string Challenge: and then reads the next six characters which represent the challenge value.
The script then displays the challenge value, waits for the user to enter the corresponding response, and sends this to the server. If the response is accepted, the connection is completed.
The {} brackets are used to delimit a variable when it appears with other characters as part of a character string.