PPP Cookbook


This document describes how to get PPP (point-to-point protocol) running between a PC running Windows and a Sun workstation running Solaris 2.x (I use Solaris 2.4).
These instructions describe a basic "point-to-point" static IP setup. More advanced configurations are available, but I've found this to be adequate. I've only included the Sun workstation side in this document, but I plan to add the PC side sometime this week or next.

Sun Workstation Side (23 steps)

(Note: these instructions assume the modem is on serial port "a")
1.) Are the required packages installed?
Be sure the PPP and UUCP software (part of Solaris) is installed. Install if necessary using either pkgadd or swmtool. The following command should return: pppk, apppr, apppu, bnuu, and bnur.

2.) Are your EEPROM settings correct?
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).

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


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

5.) Attach your modem to your workstation's serial port
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", "MR" and "HS".


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

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

8.) Create a port listener. Verify it.

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

10.) Configure devices. Verify them.

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

12.) Configure Modem.
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.

13.) Determine IP addresses.
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.) Determine host names.
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.) Update your host file.
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 a passwd and shadow entry.
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.) Create an asppp.cf file.
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 an ARP entry.
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.

19.) Create a boot time initialization file.
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.

20.) Keep RIP packets off serial interface.
Create (or append to) the file /etc/gateways and add the following line. Kill and restart in.routed.

21.) Create a defaultrouter entry.
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

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

23.) FINALLY - Verify that things are working.

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.
Send me your comments.
Dave Brillhart * David.Brillhart@harris.com *
Last Modified: Sunday, February 19, 1995 at 10:13:36 PM
Copyright (C) Harris Corporation 1995