# pmadm -r -p ttymon0 -s 0 # pmadm -a -p ttymon0 -s 0 -i root -fu -v 1 -m "`ttyadm -S n \ -d /dev/term/0 -b -l 38400 -s /usr/bin/login`" -y "/dev/term/0"
Solaris 2.X version:
# # Config file for Dialup PPP. # # This file specifies the paths where all the related PPP files and # programs are located. # DPCONF_DIR=/etc/dp # System Specific Files DPLOG_DIR=/var/adm/dp # Log Files and Other Writeable Files DPPID_DIR=${DPLOG_DIR}/Pid # Files for Process IDs DPTRACE_DIR=${DPLOG_DIR}/Trace # Trace Files DPROTARY_DIR=${DPLOG_DIR}/Rotary # Rotary Files DPMUX_DIR=${DPLOG_DIR}/Mux # Streams Mux IDs DPID_DIR=${DPLOG_DIR}/Id # Module IDs DP_DIR=/opt/dp # Common Files for All Systems DPBIN_DIR=${DP_DIR}/bin # Programs DPSCRIPT_DIR=${DP_DIR}/script # Standard Dialing Scripts DPACCESS_DIR=${DP_DIR}/access # Standard Access Files DPAUX_DIR=${DP_DIR}/aux # Auxilliary Programs DPCRON_DIR=${DP_DIR}/cron # Scripts Run from Cron DPMODEM_DIR=${DP_DIR}/modem # Modem Support Programs DPMODULE_DIR=${DP_DIR}/modules # Kernel Modules
Solaris 1.X version
# # Config file for Dialup PPP. # # This file specifies the paths where all the related PPP files and # programs are located. # DPCONF_DIR=/etc/dp # System Specific Files DPLOG_DIR=/var/adm/dp # Log Files and Other Writeable Files DPPID_DIR=${DPLOG_DIR}/Pid # Files for Process IDs DPTRACE_DIR=${DPLOG_DIR}/Trace # Trace Files DPROTARY_DIR=${DPLOG_DIR}/Rotary # Rotary Files DPMUX_DIR=${DPLOG_DIR}/Mux # Streams Mux IDs DPID_DIR=${DPLOG_DIR}/Id # Module IDs DP_DIR=/usr/dp # Common Files for All Systems DPBIN_DIR=${DP_DIR}/bin # Programs DPSCRIPT_DIR=${DP_DIR}/script # Standard Dialing Scripts DPACCESS_DIR=${DP_DIR}/access # Standard Access Files DPAUX_DIR=${DP_DIR}/aux # Auxilliary Programs DPCRON_DIR=${DP_DIR}/cron # Scripts Run from Cron DPMODEM_DIR=${DP_DIR}/modem # Modem Support Programs DPMODULE_DIR=${DP_DIR}/modules # Kernel Modules
The DPCONF_DIR typically contains files that are specific to a given system. The ${DPCONF_DIR}/conf file contains the bulk of the interface configuration. In addition, script and access files specific to a single system can be placed in this directory.
The DPLOG_DIR contains log files and files that get written frequently.
The other directories should be relatively static from one machine
to the next. The default configuration file groups them all under
${DP_DIR}.
This can be changed to suit local needs.
If you have 3 interfaces, and all of them have the same local IP address,
and you have 3 remote sites with (necessarily) unique addresses, the
file would look like this:
A definition begins in the first column of a new line.
Continuation lines must begin with white space (SPACE or TAB
characters). Comments can be placed anywhere in a line after
a #. Strings can be delimited by double quote characters (""),
if necessary.
For a given definition, each variable is given a value with the
variable name, an equal sign, and the value. For instance, the first
entry in the definition for the dp0 interface is:
${DPCONF_DIR}/hostnames
This file should contain a list of all the dp interfaces and include
the local and remote IP address used on the interface.
dp0 local-dp remote0-dp
dp1 local-dp remote1-dp
dp2 local-dp remote2-dp
${DPCONF_DIR}/conf
When, the programs dpd and dplogin are started, they read a
configuration file ${DPCONF_DIR}/conf. This file has a
definition for each interface, each modem, and optionally a number of
modem rotaries.
IF=dp0
This section defines all the possible options, their possible values,
and gives some examples to show how they might be used.
Interfaces
Each interface corresponds to a logical network connection to a
single remote site. Provisions are made in the interface definition
to specify how calls should be made and received in order to handle
traffic on that interface.
IF
The IF variable must be the first entry in the interface definition.
Its value is the name of the network interface (e.g. IF=dp0).
SYS
The SYS variable can be optionally set to indicate a system name to
be used when making log entries. If the SYS variable is not
explicitly set, it defaults to the internet name of the remote site
(as returned by gethostbyaddr()), or if that fails, the internet
address of the remote site in dot notation.
MODEMS
The MODEMS variable specifies the modems or modem rotaries that
should be used to make calls for this interface. At least one modem
or modem rotary must be specified. If more than one modem or modem
rotary is specified, when a call request is made, each entry in the
list is tried in turn until an available modem is found. The names
used in this list must correspond to a MODEM or ROTARY
definition as
specified in the configuration file.
PHONE
The PHONE variable specifies the phone number that will be passed to
the DIAL_SCRIPT as defined by the modem in use on a particular call.
In dp-3.1 and later, this variable can be given as a comma separated
list of numbers. If a dial script returns busy, the next number in
the list will be attempted.
LOGIN_SCRIPT
The LOGIN_SCRIPT variable specifies an expect script that will be
used to log into the remote system for the purposes of establishing a
PPP connection. These scripts are found, by default, in
${DPSCRIPT_DIR} and will be described in detail later.
Scripts specific to a single system can also be placed in ${DPCONF_DIR}.
LOGIN_ARGS
The LOGIN_ARGS variable is a comma-separated list of arguments to the
expect script as defined by the value of LOGIN_SCRIPT. This is
typically the login and password on the remote machine.
LOGIN
The LOGIN variable has practically nothing to do with the
LOGIN_SCRIPT and LOGIN_ARGS variables, both of which deal with
outgoing calls. The LOGIN variable, instead, is set to allow a
particular login id to be used to call in to establish a PPP
connection. When dplogin is called, it knows what account was used
to log into the system. It searches the configuration file for an
interface where the LOGIN variable is set to that same account.
TRACE
The TRACE variable can be used to specify a trace file for the
calling script. The trace files are written in ${DPTRACE_DIR}.
If there is a problem with establishing a particular connection,
this variable can be set to see what characters are being
transferred when the DIAL_SCRIPT and LOGIN_SCRIPT are both run.
ACCESS
An ACCESS file can be specified. This file defines a number of
additional variables and can be used to limit the conditions for
which calls will be made. This file is located, by default, in the
${DPACCESS_DIR} directory. Access files local to a single system can
be placed in the ${DPCONF_DIR}. This file will be described in detail in
the its own section.
PPP_ARGS=vjmode,rfc1172This will talk to very old PPP servers. Also, in dp-3.1.3 or newer, the default VJ compression mode is rfc1332. Although negotiation should work normally, if you have trouble talking to dp-3.1.2 or earlier, you will need:
PPP_ARGS=vjmode,pre1332Two new options are available in dp-3.1.3 or newe. As an example, in order to disable VJ header slot compression and set up for 4 compression slots, you would use the following PPP_ARGS:
PPP_ARGS=-vjccomp,vj-max-slots,4This was tested with a Xyplex terminal server which was set up with those options.
Additionally, a new option is available called "dynamic". This should allow dynamic addressing and is available for testing. For instance to dialin to a terminal server with a fixed address (A.B.C.D) but the local address is dynamic, use he following arguments:
PPP_ARGS=dynamic,:A.B.C.DThis should allow the dynamic allocation of a local address. Also, please note that in Solaris 2.1 or Solaris 2.2, this option may cause problems with multiple interfaces sharing the same local address.
The POST_AUX variable specifies an auxiliary program that will be run after a PPP link is torn down for a particular interface. The default location for these programs is ${DPAUX_DIR}. This might be used to udpate a status file or work around bugs in the terminal drivers.
The FAIL_AUX variable specifies an auxiliary program that will be run after a failed call attempt. The default location for these programs is ${DPAUX_DIR}. This might be used to udpate a status file or work around bugs in the terminal drivers.
Under Solaris 1, you may have to make this device as follows. The dialout device the one with the 0x80 bit set in the minor number. As an example, assume we are using "ttya" and we want to make a dialout device "cua0". Here are some example commands run as root to make the device.
# ls -lg /dev/ttya crw--w--w- 1 root wheel 12, 0 May 21 12:30 /dev/ttya # /etc/mknod /dev/cua0 c 12 128 # chmod 660 /dev/cua0 # /etc/chown uucp.uucp /dev/cua0 # ls -lg /dev/ttya /dev/cua0 crw--w--w- 1 root wheel 12, 0 May 21 12:30 /dev/ttya crw-rw---- 1 uucp uucp 12, 128 May 21 12:30 /dev/cua0Then, you would put DEV=cua0 in your modem definitions to use this device.
The next section describes modem rotaries. If all the modems in a rotary use the same DIAL_SCRIPT, it is not necessary to set each one individually. The DIAL_SCRIPT variable is set from the ROTARY definition.
The next section describes modem rotaries. If all the modems in a rotary use the same baud rate, it is not necessary to set each one individually. The BAUD variable is set from the ROTARY definition.
DIAL_CHARMAP==W-,which means wait for dial tone is 'W', and a short pause is ','. This allows modems of different brands to be used without undue difficulty.
An alternative approach is to define modem rotaries. A rotary is best described as a "next available" approach. The software keeps track of the last modem used, and always starts with the next modem in the list. When the end of the list is reached, the search wraps aournd to the first modem. This reduces overhead of finding a free modem and insures that a bad modem will not totally shut down communications.
This entry will be used if the MODEM definition does not define a DIAL_SCRIPT itself. This is useful when a pool of modems are all the same type and the DIAL_SCRIPT is the same for all of them.
This entry will be used if the MODEM definition does not define a BAUD itself. This is useful when a pool of modems are all the same type and the baudrate is the same for all of them.
In dp-3.1 and later, the format of this file has been changed significantly. The file is no longer line oriented and directives can be split among lines freely. If the first line of the file is "DPAccess 2.0", the file will be interpreted as follows. Otherwise, the old syntax is still recognized, but not described here.
directive = times:[allow | disallow] { time_expr } = protos:[allow | disallow ] { proto_expr } = addrs:[allow | disallow ] { addr_expr } = timeouts:[ | dial | answer ] { expr { timeoutlist } ... timeoutlist } expr = ( expr ) = expr || expr = expr && expr = ! expr = true = false = times:time_pat = protos:proto_pat = addrs:addrs_pat pat = rangelist = rangelist/pat rangelist = integer # single number [integer,integer] # range of numbers rangelist,rangelist # list of ranges or numbers timeoutlist = timeout = timeout timeoutlist timeout = failedcall timeval = callwait timeval = inactivity timeval = last_close timeval = non_stream timeval timeval = seconds = minutes:seconds = hours:minutes:secondsExpressions are all parsed left to right. The integer specified in patterns can be given symbolically and will be interpreted in the context of the pattern as given. For instance, the keywords mon, tue, ip, tcp, smtp, etc. can all be used in place of integer numbers in the appropriate places.
When specifying call conditions for times, protos, or addresses, the leading times:, protos: or addrs: can be left off.
sun sunday mon monday tue tuesday wed wednesday thu thursday fri friday sat saturday weekdays weekendsFor instance, if calls should only be allowed during "business" hours of monday through saturday (8-12 or 1-5), and 1-5 on Sunday with no calls in the evening or weekends, you would use the following entries:
times:allow { [mon,sat]/[8:00,12:00],[13:00-17:00] || sun/[13:00-17:00] }
protos:disallow { ip/tcp/smtp || ip/icmp/echo }Either protos:allow or protos:disallow can be set, but not both at the same time.
The program knows about ip, tcp, udp, and icmp protocol names.
A protocol can be prefixed with src: or dst: and will only match a packet with that protocol in the source or destination port, respectively. If a :src or :dst is appended to the protos directive, then all protocols are treated in that manner.
In order to limit calls to packets which are destined to a list of specific hosts, you would use the addrs:allow keyword. So, if we wish calls to be placed for only hosts on the 192.100.10.0 network and the goodhost.com host, a line of the following form would be used:
addrs:allow { ip/192.100.10 || goodhost.com }The addresses given in these lists can be the name of a host, or an internet host or network address in dot notation.
An address can be prefixed with src: or dst: and will only match a packet with that address in the source or destination field, respectively. If a :src or :dst is appended to the addrs directive, then all addresses are treated in that manner.
timeouts { failedcall 2:00 # time to mark network as down after failed call callwait 0:50 # time to allow for call to go through } timeouts:dial { protos:ip/tcp/70,80 { # Handle Gopher and WWW traffic specially last_close 2:00 # fast timeout after last TCP close non_stream 2:00 # fast timeout for non-TCP traffic } inactivity 3:00 # time to let the connection sit idle last_close 0:08 # fast timeout after last TCP close non_stream 0:20 # fast timeout for non-TCP traffic } timeouts:answer { inactivity 4:00 # time to let the connection sit idle }Since we are paying for outgoing calls made, we set short timers so that disconnections are prompt. For incoming calls, we set some limits just to keep the modem pool from being tied up.
Expressions can be given that limit the use of certain timeouts to certain types of packets. The packets can be filtered by protocol address, or time of day, or boolean combinations of these conditions. These tests are applied in order until all the timeout values are specified. The dial or answer timeouts are applied first depending on the nature of the connection. Then, if all timeouts are not specified, the generic timeouts are applied. Any given timeout is set to the value of the first directive that matches the conditions. The timeout specifications without a match expression apply to all packets.
Several example script files are provided in the distribution for dialing several different Telebit modems directly into a remote system as follows:
usr-dial Dials the given number on a US Robotics Courier modem. t1600-dial Dials the given number on a Telebit T1600 modem. t3000-dial Dials the given number on a Telebit T3000 modem. wb-dial Dials the given number on a Telebit WorldBlazer modem. ppp-login Logs into a remote system directly. The first argument is a login, and the second argument is the password. This assumes the login shell on the remote system is "dplogin", and performs simple synchronization with that program.You may note that the t3000 and Worlblazer scripts are the same since we use V.32bis in both cases. For PEP usage, the WorldBlazer script will need to be modified to handle additional CONNECT messages.
The format is as follows:
{ alternate commands... alternate commands... }The {, }, and alternate keywords are actually commands and must be on separate lines. If a recv command fails, then control is passed to the next alternate. If all alternatives fail, then the select block returns a failure, and is equivalent to an abort.