From bry@netcom.com Fri Mar 31 09:30:02 EST 1995 Article: 39165 of comp.unix.solaris Newsgroups: comp.unix.solaris Path: babbage.ece.uc.edu!news.cs.indiana.edu!usenet.ucs.indiana.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!ix.netcom.com!netcom.com!bry From: bry@netcom.com (Bryan Althaus) Subject: Re: Where can I get PPP Cookbook? Message-ID:Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] References: <1b3_9503271707@mmbbs.com> Date: Wed, 29 Mar 1995 19:45:46 GMT Lines: 240 Sender: bry@netcom15.netcom.com Vern Kosloski (Vern.Kosloski@wilsons.mmbbs.com) wrote: : Where can I get the PPP Cookbook that I have seen mentioned in some of these : postings? It's short so here it is: 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. -- Regards, Bryan Althaus bryan@krf.com bry@netcom.com