How to install TransSys PNI 1.9 beta (tested on NS/Moto 3.2) ************************************************************ Here is what I did to get TransSys PNI 1.9 beta to work on an '040 cube running a *clean* copy of NEXTSTEP 3.2 User+Developer (I re-installed the OS from scratch). I have a ZyXEL U1496-E modem on serial port A and use the default "dial-zyxel.tcl" modem script. If you have a different modem then you'll have to hack one of the existing dial scripts for your own settings. I dial into the UW-Madison DoIT modem pool which has CSLIP and dynamic IP address allocation. I include some pre-PNI system setup stuff that I do which may or may not be necessary in getting PNI to work. I get the following throughput for ftp transfers - I'd be interested in hearing what other's get for a ZyXEL modem talking to a 14.4K modem with CSLIP. - 1.2MB uncompressed PostScript file... 3.0 K/sec (tests V.42bis compression) - same file compressed file by gzip to 271K... 1.6 K/sec (tests raw throughput) Your mileage may vary. - Gareth bestor@cs.wisc.edu 06/13/94 ----------------------------------------------------------------------------- 1. Run HostManager.app to setup the hostname and stuff (my cube also has an ethernet connection so I assign it an IP address. If you're not using your ethernet port then leave the addresses as their default): - select "Local..." menu option: Hostname: jabberwocky IP Address: 144.92.180.230 Netmask: 255.255.255.0 Broadcast Address: 144.92.180.255 - open "localhost" - add "jabberwocky" as a host name alias - logout and reboot 2. Create a new file called "/etc/resolv.conf". Put in your domain name and the IP addresses of three nameservers. eg domain wisc.edu # dogie.macc.wisc.edu nameserver 128.104.30.17 # batman.cs.wisc.edu nameserver 128.105.1.12 # riddler.cs.wisc.edu nameserver 128.105.8.69 3. Install PNI.pkg. Use the demo keystring. 4. cp /etc/pni/SAMPLES/pniX.config.cslip /etc/pni/config/pni0.config (or rename this to pni0.config-auto to dial in automatically on bootup) 5. Edit the following entries in /etc/pni/config/pni0.config. If you don't use dynamic IP addresses then put your pre-assigned ADDRESS here. [My DoIT file is at the end] set Config(pni:MTU) 1500 <- SLIP host MTU set Config(pni:ADDRESS) 127.0.0.1 set Config(pni:REMOTEADDRESS) 144.92.180.1 <- SLIP host IP address set Config(tty:MODEMTYPE) zyxel <- modem dial script set Config(tty:SERVERTYPE) annex <- SLIP login script set Config(tty:NUMBER) 265-4321 <- SLIP host phone # 6. Copy and customize an appropriate login script from /etc/pni/support to /etc/pni/config. It helps to login manually using kermit to see what sort of prompts the SLIP host gives you. [My DoIT file is at the end] 7. Create a new file called /etc/pni/config/password.pni0 containing your username and password for logging into the SLIP host (used by the login script if appropriate). eg set username johndoe set password 12345 8. chmod 0600 /etc/pni/config/password.pni0 9. To open the SLIP connection type /etc/pni/pnirun pni0 & 10. To close the SLIP connection type /etc/pni/bin/pnistat -c down pni0 Thats it! ----------------------------------------------------------------------------- Here's my /etc/pin/config/login-annex.tcl. If you also use dynamic IP address allocation this might be a good place to start hacking. UW-Madison DoIT users can copy this unchanged. # Copyright 1993 by TransSys, Inc. # All rights reserved. # $Header: /local/SRCS/slip2/pnid/support/login-annex.tcl,v 1.9 1994/04/23 04:47:00 louie Exp $ # Modified 6/9/94 by Gareth Bestor for University of Wisconsin-Madison # Division of Information Technology (DoIT) dial-in modem pool proc annex-password { DIALER username password } { $DIALER xmit "$username\r" $DIALER expect "*assword:*" {$DIALER xmit "$password\r"} \ timeout {error "waiting for password prompt"} } # Used to put a Xylogics Annex terminal server into SLIP mode. # # This version will optionally support Annex SLIP security, # where if the Annex terminal server requests a username and # password in response to the SLIP command, they will be # sent. The username and password to be used are stored in a # seperate file. The name of the file is specified in the # Config array. # # This file should contain (at least) two TCL set commands to # set the variables 'username' and 'password'. Its likely # that you don't want these files generally readable for # security purposes, so a check is made for you, and the # script will fail if the file is readable. # # Alternatively, the members of the keyed list "username" and # "password" can be used to specify the username and password to be # passed to the terminal server. proc login-annex { DIALER cfg } { global Config encapList syslog LOG_INFO "Begin annex login" set username "" set password "" if {[info exists Config($cfg:SECRETFILE)] && [file exists $Config($cfg:SECRETFILE)]} { if {[file readable $Config($cfg:SECRETFILE)]} { source $Config($cfg:SECRETFILE) } file stat $Config($cfg:SECRETFILE) stat if {[expr $stat(mode)&04]} { error "File with password, $Config($cfg:SECRETFILE), is readable by 'other'!" } } else { if {[info exists Config($cfg:USERNAME)]} { set username $Config($cfg:USERNAME) } if {[info exists Config($cfg:PASSWORD)]} { set password $Config($cfg:PASSWORD) } } # # set parity of transmitted data # $DIALER parity ZERO # # For auto-baud nonsense.. sometimes its necessary to poke at it a couple # of times before it figures out what speed the modem is at. # set timeout 2 $DIALER xmit {\r\r} $DIALER sleep 1 # # look for annex command prompt # $DIALER expect "*sername:*" {annex-password $DIALER $username $password} $DIALER xmit {\r} set timeout 10 # # send command to put terminal server into SLIP mode # set mode SLIP if {[info exists Config($cfg:MODE)]} { set mode $Config($cfg:MODE) } case $mode in { {SLIP default} {$DIALER xmit "slip\r"} PPP {$DIALER xmit "ppp\r"} } # # Use regular-expression based expect command to match addresses in message # that the annex server emits. # while { 1 } { $DIALER rexpect \ {Your IP address is ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)[^0-9]} { break } } syslog LOG_DEBUG "Entering SLIP mode" # # Rather than just printing this message, you could ifconfig the interface, # for example, by using the exec TCL command: # exec /etc/ifconfig [[lindex $encapList 0] interface] $1 # # or # # [lindex $encapList 0] local-ip-address $2 # [lindex $encapList 0] remote-ip-address $2 # # syslog LOG_INFO "my address should be $1" # # wait a bit for server to switch to SLIP mode # $DIALER sleep 1 # # that's all # return "Connected" } ----------------------------------------------------------------------------- Here's my /etc/pni/config/pni0.config. UW-Madison folk can use this unchanged, assuming you're using the zyxel modem script. # # Pretty close to minimal configuration file for CSLIP using # a ZyXEL modem dialing into a Xylogics Annex SLIP servier. # # $Header: /local/SRCS/slip2/pnid/support/config.cslip,v 1.5 1994/05/16 02:31:16 louie Exp $ ## PART I. set Config(pni:INTERFACE) pni0 set Config(pni:MTU) 1500 set Config(pni:ADDRESS) 127.0.0.1 set Config(pni:REMOTEADDRESS) 144.92.180.1 set Config(pni:NETWORKMASK) 255.255.255.0 set Config(pni:DEFAULT) 1 set Config(slip:MODE) cslip set Config(tty:DEVICE) /dev/cufa set Config(tty:SPEED) 38400 set Config(tty:MODEMTYPE) zyxel set Config(tty:SERVERTYPE) annex set Config(tty:SERVERNAME) SlipServerName set Config(tty:NUMBER) 265-4321 set Config(SlipServerName:DIALTYPE) TONE set Config(SlipServerName:SECRETFILE) /etc/pni/config/password.pni0 # PART II. stack PNI pni stack SLIP slip stack TTY tty # PART III. proc LINK_start { encap } { log "LINK $encap connected" } proc LINK_stop { encap } { log "LINK $encap disconnected" } ------------------------------------------------------------------------------ Additional Comments: 1. Read pni.ps in the doc subdirectory, especially pages 76-83. 2. If PNI gets screwed up it will probably lock up your system and you'll have to do a dirty reboot *without* being able to sync. :-( 3. The stuff added to /etc/rc.local only starts up config files in /etc/pni/config with a "-auto" suffix. The quickstart instructions in pni.ps don't do this so you have to start up SLIP manually (step 9). 4. If you run pnistat and there's no pnid deamon running you'll get a long cryptic "RPC: Program not registered" error. Basically, this means there's nothing running; i.e. you forgot step 9. Type "ps axu | grep pnid" to check if a daemon is running.