SUMMARY: SOLARIS STATIC PPP SETUP

From: Dave Schmitz (schmitz@stork.nas.nasa.gov)
Date: Fri Mar 31 1995 - 19:06:19 CST


I just thought I would pass along the great information I received from the
folks around the net...

  Cheerz,

  -Dave

 _____________________________________________________________________________
|-| Dave Schmitz __ |-| |-| Phone: 415.604.0767 |\ | /\ (_ /\ /\ ._ _ _ _ |-|
|-| E-Mail: schmitz@nas.nasa.gov | \|/--\__)/--\ /--\| | |(/__> |-|
|-| WWW: http://www.nas.nasa.gov/~schmitz |-|
|-| USmail: Ames Research Center, MS T27A-2, Moffett Field, California,94035|-|
|_|_________________________________________________________________________|_|

> I would be willing to pay $75/hour for a couple of hours help getting the
> /etc/asppp.cf, /etc/uucp/Systems, and other necessary files set up correctly.
>
> I'll be a single node (named nomad2) calling into one server (named annex),
> which also provides a name server. I can tell you exactly how the system is
> set
> up on the IPX with the older version of PPP.

asppp.cf:

ifconfig ipdptp0 plumb nomad2 annex up

path
       inactivity_timeout 120 # Approx. 2 minutes
        interface ipdptp0
        peer_system_name PPPlogin # The name we log in with (also in
                                   # /etc/uucp/Systems

/etc/uucp/Systems:
Ptest Any ACU 38400 Phone# "" P_ZERO login:--login: PPPlogin word:--word: Passwd

/etc/uucp/Devices:
ACU cua/a - Any hayes

/etc/hosts:
192.200.1.1 annex # whatever the real addresses are
192.200.1.2 nomad2

That's pretty much it. Be sure to have the PPP patch installed
 
> Is there a kind and knowedgable soul out there who can send me a sample
> configuration file or point me to a good reference? (I'm not a complete
> dummy.)
>
> Thanks in advance.
>
> ___Stephen Travis Pope
> ___Editor, Computer Music Journal, MIT Press (and)
> ___Res. Assoc., CNMAT, Dept. of Music, U.C.Berkeley
> ___stp@CNMAT.Berkeley.edu, (510) 644-3881

*******************************************************************************

>I've been working on setting up my new (used) SPARC 2 at home and was looking
>for ANY info on how to configure/setup PPP. I know this is probably a
>psuedo-FAQ but I've been looking around and can't seem to find any info.
>ANY info would be greatly appreicated....
>
>Cheerz,
>
> -Dave "No, I don't have the manual" Schmitz

If you want to set it up to dialout, here's a quick step-by-step

1) In /etc/asppp.cf:
        First enter interface config line, like
        ifconfig ipdptp0 plumb <yourip> [<dest ip if static>] up

        Then enter the path information, like
        
        path
                inactivity_timeout 0 # in seconds (0=never)
                interface ipdptp0
                peer_system_name PPP # this is the name of entry in Systems
                ipcp_async_map 0 # optional
                default_route # if appropriate

2) In /etc/uucp/Systems:

        Format is as follows:
        <peer sys name> <time can connect> <device type> <speed> <phone #> <script...>

        Example:
        PPP Any ACU 38400 5551234 login: jdoe Password: pencil

        The login script is just alternating fields of <expect> <send>. All
        sends are followed with a carriage return by default unless otherwise
        specified with escape chars. This and other escape chars can be found
        in the header of /etc/uucp/Dialers

        
3) In /etc/uucp/Devices:

        This maps the device type from ./etc/uucp/Systems to the port device and
        dialer entry in /etc/uucp/Dialers. Format is as follows:

        <device type> <port device> <dunno-unused?> <speed> <dialer entry name>

        Example:

        ACU cua/b - 38400 usrv32-nec

        To find which dialer entry to use, lookup and see what the closest matching
        modem to yours is that you can find in the /etc/uucp/Dialers file.

Good Luck!

-Cengiz Akinli

 __ __
< >--------------------------------------------------------------------< >
 || Cengiz Akinli | Every great achievement was once ||
 || Netmar, Inc. | considered impossible ||
 || Voice - (919) 309-2459 | -Unknown ||
 || Voice Mail - (919) 254-3561 |---------------------------------------||
 || root@netmar.com | The Tarheel Mall - shop till ya drop ||
 || staff@netmar.com | http://netmar.com/mall/ ||
<__>--------------------------------------------------------------------<__>

*******************************************************************************

Dave,

This might help...

                           PPP Cookbook
                          ===============

Sun Workstation Side (22 steps)
---------------------------------
(Note: these instructions assume the modem is on serial port "a")

1.) Be sure the PPP and UUCP software (part of Solaris) is
    installed. Install if necessary using either pkgadd or swmtool.

       # pkginfo | egrep "PPP|UUCP"
       (should return: pppk, apppr, apppu, bnuu, and bnur)

2.) Make sure the EEPROM settings are correct. The ignore-cd parameter
    setting must be "true" for bi-directional modem connections
    (although it seems incorrect I verified it with Sun tech support).

       # eeprom | grep ttya
       # eeprom ttya-mode=38400,8,n,1,h
       # eeprom ttya-ignore-cd=true
       # eeprom ttya-rts-dtr-off=false

3.) Reboot the system to enact the EEPROM changes (if they changed).

4.) Remove the following entries to make room for the new values.
    This assumes the modem will be on port "a".

       # sacadm -r -p zsmon0 2> /dev/null
       # sttydefs -r conttyH8hi 2> /dev/null
       # pmadm -r -p zsmon -s ttya 2> /dev/null
       # pmadm -r -p zsmon0 -s ttya 2> /dev/null

5.) Hook up the modem (I use a Hayes Optima 28.8K). Use a 25-wire
    straight-through RS-232 cable. Don't attempt to use a cable with
    only a few wires... Turn on the modem. You should see the following
    LEDs lit: "TR", "MS" and "HS".

6.) Create a new port monitor. Verify it.

       # sacadm -a -p zsmon0 -t ttymon -c /usr/lib/saf/ttymon \
           -v `ttyadm -V` -y "Dial in/out on serial port a"
       # sacadm -l

7.) Create an 8-bit clean, HW flow control, 38400 locked, modem entry.
    Verify it.

       # echo "conttyH8hi:38400 -parenb cs8 ignpar opost onlcr:38400 hupcl \
           -clocal -parenb ignpar cs8 -istrip -ixon ixany \
           crtscts::conttyH8hi" >> /etc/ttydefs
       # sttydefs -l conttyH8hi

8.) Create a port listener. Verify it.

       # pmadm -a -p zsmon0 -s ttya -i root -f u -v `ttyadm -V` \
           -m "`ttyadm -b -S n -d /dev/term/a -l conttyH8hi -s /usr/bin/login \
           -m ldterm,ttcompat -T vt100 -i 'Terminal Disabled.' \
           -p 'modem login: '`" -y " Modem port ttya"
       # pmadm -l

9.) Add a line to /etc/remote to support "tip".

       # echo "cuaa:dv=/dev/cua/a:br#38400" >> /etc/remote

10.) Ensure the devices are setup properly. Verify them.

       # chown uucp /devices/obio/zs*:a*
       # chgrp sys /devices/obio/zs*:a*
       # chmod 666 /devices/obio/zs*:a*
       # ls -las /devices/obio/zs*:a*

11.) Remove any processes (and lock files) attached to term/a. These
     cause the dreaded "All ports busy" message.

       # ps -elf | grep "term/a" | awk '{ print $4 }' | xargs -i -t kill -9 {}
       # rm /var/spool/locks/LK*

12.) Talk to the modem and set it up (modify as necessary for your
     particular modem). Note the two at&w steps which help if the
     at&c1 command kicks you out of tip. If it does, get back in and
     issue the remaining commands.

       # tip cuaa
       [connected]
       at&f reset active to factory defaults for a clean slate

       ate1 echo characters in command state
       atq2 do not return result codes when answering
       atw1 return negotiation progress messages

       ats0=1 auto answer after 1 rings.
       ats37=15 set max modulation speed to 28.8K.
       ats11=60 speed up dialing by shortening inter-DTMF delays
       ats70=32 increase max # frame retransmissions (default is 10)

       at&k3 use hardware flow control instead of XON/XOFF
       at&q5 Error control mode
       at&d3 Monitor DTR signal, hangup & reset if on->off.
       at&s0 assert DSR always
       at&w save these custom settings in the user profile

       at&c1 track presence of carrier detect signal.
       at&w save these custom settings in the user profile

       ~. exit out of tip

13.) Find TWO free IP addresses on the SAME (sub)net as the Sun
     workstation. One will be used for the serial port "network
     interface" and the other will be assigned to the remote PC.

     You can do this by asking your network folks, or by using
     ping (to detect non-registered devices) AND nslookup (to detect
     registered but unavailable devices). Here is a quick little
     sh script to find open slots on a "class C" or 8-bit subnetted
     Class B net. This works for Solaris. Modify the ping and
     nslookup statements as necessary for your OS.

       #!/bin/sh
       # Dave Brillhart - (c) 1995
       net=132.158.62
       ip=0
       while [ $ip -lt 256 ]
       do
         ping $net.$ip 2 > /dev/null
         if [ $? -eq 1 ]
         then
           nslookup $net.$ip | grep -i find
         fi
         ip=`expr $ip + 1`
       done

14.) Once you find two free IP addresses - come up with unique names
     and ask your DNS folks to register the addresses. Be sure to
     request both forward ("A" or name-to-IP) and reverse ("PTR" or
     IP-to-name) mappings. The reverse mappings are required to
     satisfy some services which employee domain filtering.

     For example, my addresses are:

       132.158.62.200 unix_ppp.mis.semi.harris.com
       132.158.62.205 pc_ppp.mis.semi.harris.com

15.) Now enter the two new addresses in your /etc/hosts file. Do this
     even if you use DNS - since PPP starts up prior to the name
     service.

       132.158.62.200 unix_ppp
       132.158.62.205 pc_ppp

16.) Create the "PPP" user account by editing the /etc/passwd and
     /etc/shadow files. Here are my entries. Change the password for
     the ppp_user account using the "passwd" command.

       /etc/passwd
       ------------
       ppp_user:x:1115:10:PPP User:/:/usr/sbin/aspppls

       /etc/shadow
       ------------
       ppp_user:e465dfvf2sqwi:9119::::::

17.) Add the following to the bottom of the /etc/asppp.cf file. Modify
     the names of your two IP addresses.

       ifconfig ipdptp0 plumb unix_ppp pc_ppp up netmask +
       path
         ipcp_async_map 0
         inactivity_timeout 90000
         interface ipdptp0
         peer_system_name ppp_user

18.) Add a published "arp" entry for the new interface. First find the
     Physical address (ethernet address) of the network adapter attached
     to the ethernet (mine is le0). Substitute your ethernet address and
     the DNS name of your remote PC.

       ifconfig -a | grep ether
       /usr/sbin/arp -s pc_ppp 8:0:20:11:e4:2d pub
       /usr/sbin/arp -a

19.) Create a file so that the arp entry is added at boot time. I called
     the file "/etc/rc3.d/S99arp_ppp". Owner: root. Perm: 755. It
     contains the following line.

       # echo "/usr/sbin/arp -s pc_ppp 8:0:20:11:e4:2d pub" > /etc/rc3.d/S99arp_ppp
       # chown root /etc/rc3.d/S99arp_ppp
       # chmod 755 /etc/rc3.d/S99arp_ppp

20.) Create (or append to) the file /etc/gateways and add the following
     line. Kill and restart in.routed.

       norip ipdptp0

21.) Create a defaultrouter entry in the file /etc/defaultreouter. This
     will eliminate the possibility of RIP packets and IP forwarding
     down the PPP pipe. This also disables Solaris' dynamic routing.
     Determine which router to put in by running "netstat -r" and
     using the most common "gateway" entry. The file should contain
     a single line such as the following (use the IP address for your
     router). I had to reboot for this to take effect. HUPing
     in.routed did not do the trick.

       132.158.62.254

21.) Manually start the PPP process. This is not normally needed since
     it will start at boot time.

       /etc/init.d/asppp start (replace start with stop to stop it)

22.) Verify things are working:

       a.) ps -e | grep asppp
       b.) tail /var/adm/log/asppp.log
       c.) arp -a (verify arp entry)
       d.) ifconfig -a (verify ipdptp0 entry)
       e.) netstat -rn | egrep "default|ipdptp0"
              verify only one default pointed to router and
              that there is an ipdptp0 entry.

       132.158.62.205 132.158.62.200 UH 2 76 ipdptp0
       default 132.158.62.254 UG 0 1796

At this point, you can fire up your PC software. I use both Trumpet
Winsock and Netmanage's Chameleon_Sampler. They both work great. I've
been on for days, using Netscape, telnet, finger, FTP, and other
clients simultaneously. I've even got NCD's PC-Xware to work as an
X-server over the PPP link, but that only works with Chameleon.

Good Luck... Let me know if you have any other questions.

*******************************************************************************

Hello Dave,

I am haveing the same problems. I have setup uucp many times. I can get the modem to dal-out and call local bbs systems.
When I try to connect to my internet provider, I can't get the scripting to work.

These are the files that you need to configure.

/etc/uucp/Systems
/etc/uucp/Dialers
/etc/uucp/Devices

/etc/asppp.cf

The command to start PPP is:

/etc/init.d/asppp start

If you look in the script you will see the command:

/usr/sbin/aspppd -d 1

change the 1 to 9 and then the log file in:

/var/adm/log/asppp.log

will contain the results of you efforts.

Please keep me informed about your progress for I am walking down the same path..

Cheers
Q.Ray

*******************************************************************************

 I am trying to set up my home machine through a local provider, best.com, in
 Mt View. When I got the account, he handed me a page of IP numbers:

 Gateway IP
 DNS nameserver IP
 NNTP IP
 Shell IP
 ftp IP
 www/http IP
 smtp/pop Mail Server IP

On my home system, I use the following approach, and it works well,
except that DNS responses from my provider are painfully slow. Cautions
and examples are given at the end of this email. If you find better ways
I can do some of this, please let me know.

Good luck,
dennis

/etc/uucp/Systems:
Ptest Any ACU 38400 Phone# "" P_ZERO login:--login: PPPlogin word:--word: Passwd

/etc/uucp/Devices:
ACU cua/a - Any hayes

a.) Add a line to /etc/remote to support "tip".

       # echo "cuaa:dv=/dev/cua/a:br#38400" >> /etc/remote

b) Ensure the devices are setup properly. Verify them.

       # chown uucp /devices/obio/zs*:a*
       # chgrp sys /devices/obio/zs*:a*
       # chmod 666 /devices/obio/zs*:a*
       # ls -las /devices/obio/zs*:a*

c) Remove any processes (and lock files) attached to term/a. These
     cause the dreaded "All ports busy" message.

       # ps -elf | grep "term/a" | awk '{ print $4 }' | xargs -i -t kill -9 {}
       # rm /var/spool/locks/LK*

d) Talk to the modem and set it up (modify as necessary for your
     particular modem). Note the two at&w steps which help if the
     at&c1 command kicks you out of tip. If it does, get back in and
     issue the remaining commands.

       # tip cuaa
       [connected]
       at&f reset active to factory defaults for a clean slate

       ate1 echo characters in command state
       atq2 do not return result codes when answering
       atw1 return negotiation progress messages

       ats0=1 auto answer after 1 rings.
       ats37=15 set max modulation speed to 28.8K.
       ats11=60 speed up dialing by shortening inter-DTMF delays
       ats70=32 increase max # frame retransmissions (default is 10)

       at&k3 use hardware flow control instead of XON/XOFF
       at&q5 Error control mode
       at&d3 Monitor DTR signal, hangup & reset if on->off.
       at&s0 assert DSR always
       at&w save these custom settings in the user profile

       at&c1 track presence of carrier detect signal.
       at&w save these custom settings in the user profile

       ~. exit out of tip

1. Insert all IP addresses into hosts table, to be able to use names.
   Your provider needs to give you the names. You can determine them
   using nslookup at work, but that is a nuisance.

2. Create /etc/resolv.conf, and add your domainname and nameserver lines.
   Your provider can provide the domainname (probably best.com, unless they
   have a multi-location operation). The DNS nameserver goes on the
   nameserver line.

3. Edit /etc/mail/sendmail.cf to use relay mailer ether, and relay host
   should be the smtp server. This hostname needs to be accurate.

4. Most news readers (like xvnews and Mosaic/Netscape) refer to the
   environment variable NNTPSERVER to find the NNTP server. Set that
   in your environment before invoking the reader. This can go in your
   .profile, .cshrc, or whatever, depending on what shell you use.

5. Different www clients use different mechanisms for locating/identifying
   their home page, but as an example, netscape allows you to put the
   URL into the preference sheet under Styles.

6. If you want to use a shell acount on their machine, you would do
   something along the lines of telnet .

7. For ftp to their server, again do ftp .

8. The gateway hostname can go into the /etc/gateways file. Check the
   man page (in.routed man page) for syntax.

9. For the actual PPP connection, the only thing that counts is the
   machine you dial up to (most likely the gateway machine). You will
   have to edit the /etc/uucp/{Systems,Dialers,Devices} with things
   like your preferred modem setup unless you like one of the defaults
   (one of my character flaws, I guess, I don't like any of them),
   dialing info for the gateway machine (note that our PPP is broken,
   and ignores the time-to-call field, disaster for a lot of us), and
   what serial port you have your modem connected to. Then edit the
   /etc/asppp.cf file to configure the ipdptp0 interface.

10.For Netscape and Mosaic you'll have to enable host DNS lookup by setting
   the hosts entry in the /etc/nsswitch.conf file to
   dns [NOTFOUND=return] files.

Notes for the examples:
I have my modem configured to power-on in the mode I like to use for my
PPP configuration. DISABLE LOGINS ON THE MODEM PORT. I don't recall the
nameserver IP address of my DNS server, so the example has a bogus
address for resolv.conf. After I login to my provider, there is a delay
(SCO on Intel at the provider) and I get a menu with a choice prompt.
To start PPP, I choose choice # 3. I also found that I had to put a
delay at the end of the chat script in /etc/uucp/Systems, or I couldn't
get connected. Loopback problems and config error problems, caused by
the remote system still being in echo mode on the line when my machine
started sending the first PPP configure packets. Also, I have yet to
find a 2.3 or 2.4 setup where ttymon grabs the line after PPP times out
and disconnects (but before the modem has recognized a DTR-down
condition (my speculation is that our streams stuff doesn't actually
take DTR down)) causing the line to essentially be hung. This is
avoided by not enabling ttymon on that port. In other words, in keeping
with Sun's long tradition, truly bidirectional lines are a crapshoot
on Suns. Yes, I have an escalated service order open on it, so do
our customers, and I am not holding my breath.

Examples for my home machine:

/etc/hosts:
165.154.15.142 daddy
165.154.1.1 noc mail
165.154.1.8 nnrp
127.0.0.1 localhost

/etc/resolv.conf:
domainname tor.hookup.net
nameserver 165.154.1.7

/etc/mail/sendmail.cf:
- stuff not included here for brevity -
Dmether
- stuff not included here for brevity -
DRmail.tor.hookup.net
CRmail.tor.hookup.net
- stuff not included here for brevity -

~/.cshrc:
- stuff not included here for brevity -
setenv NNTPSERVER nnrp.tor.hookup.net
- stuff not included here for brevity -

net default gateway noc metric 1 passive

/etc/uucp/Dialers (I have the power-on settings of my modem set up for 14.4K):
wb144 =W-, "" \dAT\r\c OK\r \EATDT\T\r\c CONNECT

/etc/uucp/Devices:
ACUWB cua/0 - Any wb144

/etc/uucp/Systems:
noc Any ACUWB 38400 somenumbertodial in:-\r-in: myloginnamegoeshere rd: mypasswordgoeshere "" \d\d\c choice: 3 "" \d\d\d\c

/etc/asppp.cf:
ifconfig ipdptp0 plumb daddy noc netmask 0xffffff00 -trailers up
path
        inactivity_timeout 90000
        interface ipdptp0
        peer_system_name noc
        debug_level 9

/etc/nsswitch.conf:

- stuff not included here for brevity -
hosts: dns [NOTFOUND=return] files
- stuff not included here for brevity -
services: files



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:21 CDT