1I run PPP between crappie.morningstar.com (137.175.6.3, my home 2machine) and remora.morningstar.com (137.175.2.7, my workstation at 3the office). This document describes how I use it. The installation 4of PPP itself is covered in the PPP distribution. 5 6I put a line like this in remora's /etc/passwd: 7 8 Pkarl:2y4613BDaQD3x:51:10:Karl's PPP login:/tmp:/usr/local/etc/pppstart 9 10I created a login shell script on remora called 11/usr/local/etc/pppstart: 12 13 #!/bin/sh 14 /usr/bin/mesg n 15 stty -tostop 16 exec /usr/local/etc/ppp 137.175.2.7: 17 18I use the ppp-on command to bring up a connection, and ppp-off to shut 19it down. These shell scripts, plus the unlock and fix-cua scripts and 20the source to the chat program are included. You will need to heavily 21modify these to suit your own situation, including Internet addresses, 22machine names, telephone numbers, modem dialing commands, baud rates, 23login names and passwords. Make the "ppp..." command in the ppp-on 24script look something like this: 25 26 ppp 137.175.6.3: /dev/cua & 27 28The "137.175.6.3:" is of the format "local-addr:remote-addr" with the 29remote address null (it will be negotiated by PPP). Look at the login 30shell script above; it can be common to all dial-in PPP users on your 31machine because it only specifies the address of the remora 32(receiving) end of the link. 33 34If you use the enclosed chat and unlock programs, be sure they are 35suid uucp, and fix-cua should be suid root. The ppp-on script should 36be chmod 700, owner yourself, to keep the password (semi-) secure. 37 38I use the following eeprom settings and /dev and /etc/ttytab entries 39in order to support dial-in and dial-out on a single phone line: 40 41 crappie 12% eeprom | grep ttya 42 ttya-mode=19200,8,1,n,h 43 ttya-rts-dtr-off=false 44 ttya-ignore-cd=false 45 crappie 13% ls -lg /dev/cua /dev/ttya 46 crw-rw-rw- 1 root staff 12, 128 Nov 20 09:14 /dev/cua 47 crw--w--w- 1 root wheel 12, 0 Nov 20 08:25 /dev/ttya 48 crappie 14% grep ttya /etc/ttytab 49 ttya "/usr/etc/getty std.19200" unknown on 50 crappie 15% 51 52On SunOS 4.1 and later, make sure that the /etc/ttytab line for ttya 53doesn't say "local": 54 55 ttya "/usr/etc/getty std.38400" unknown on 56 57Make sure your modem passes data transparently; watch out especially 58for ^S, ^Q, ^P (UUCP spoofing) and parity problems. I have a Telebit 59Trailblazer+ attached to /dev/ttya with the following register 60settings: 61 62 aaatz 63 OK 64 aat&n 65 E1 F1 M1 Q6 P V1 X0 Version BA4.00 66 S00=001 S01=000 S02=043 S03=013 S04=010 S05=008 S06=002 S07=060 S08=002 S09=006 67 S10=007 S11=070 S12=050 68 S45=000 S47=004 S48=000 S49=000 69 S50=000 S51=005 S52=002 S53=003 S54=001 S55=000 S56=017 S57=019 S58=002 S59=000 70 S60=000 S61=000 S62=003 S63=001 S64=000 S65=000 S66=001 S67=000 S68=255 71 S90=000 S91=000 S92=001 S95=000 72 S100=000 S101=000 S102=000 S104=000 73 S110=001 S111=030 S112=001 74 S121=000 75 N0: 76 N1: 77 N2: 78 N3: 79 N4: 80 N5: 81 N6: 82 N7: 83 N8: 84 N9: 85 OK 86 87And, the following entry is in /etc/gettytab: 88 89 # 90 # 19200/2400 dialin for Telebit Trailblazer+ modem 91 # 92 T|T19200:dial-19200:\ 93 :nx=T2400:sp#19200: 94 T2400|dial-2400:\ 95 :nx=T19200:sp#2400: 96 97My chat script dialing command looks like "ATs50=255s111=0DT4515678" 98instead of just "ATDT4515678" in order to force a PEP mode connection 99and to disable the UUCP spoofing (otherwise, the modem swallows or 100delays ^P characters). 101 102I run /usr/etc/in.routed on crappie (the calling end) and have this in 103my /etc/gateways file: 104 105 net 0.0.0.0 gateway remora metric 1 passive 106 host crappie gateway crappie metric 0 passive 107 108Routed is started in /etc/rc.local. This way, I don't have to 109manually add or delete routes when links come up. I ifconfig the ppp0 110interface on crappie at boot time like this (in /etc/rc.local with the 111other ifconfig's): 112 113 ifconfig ppp0 crappie remora netmask 0xffffff00 down 114 115I put "init ppp_attach" in my /sys/sun4c/conf/CRAPPIE file so that the 116above ifconfig down will work: 117 118 pseudo-device ppp1 init ppp_attach # Point-to-Point Protocol, 1 line 119 120Routed now keeps my routes sane at the crappie.MorningStar.Com end. 121 122My ethernet (le0) and PPP (ppp0) interfaces are configured with the 123same address and netmask. IP is smart enough to figure out (via the 124routes in /etc/gateways) that everything useful needs to go out ppp0. 125Also, the remora end of my PPP link is configured the same way -- the 126ppp0 interface there is configured with the same address and netmask 127as remora's le0 ethernet. This means that separate interface names 128like "remora-ppp" are not needed; point-to-point links (whether PPP, 129Xerox Synchronous Point-to-Point Protocol, SLIP, IGP or whatever) have 130(apparently) been used this (seemingly bizarre) way for some time. 131This works because when IP looks at a POINTOPOINT link it ignores the 132local address (unlike an ethernet interface) and only looks at the 133remote address. 134 135Here's what netstat shows for me: 136 137 crappie 109% netstat -r 138 Routing tables 139 Destination Gateway Flags Refcnt Use Interface 140 localhost localhost UH 0 0 lo0 141 crappie crappie UH 1 11339 le0 142 default remora UG 0 1266 ppp0 143 mstar-net-ppp-remora crappie U 0 0 le0 144 crappie 110% netstat -rn 145 Routing tables 146 Destination Gateway Flags Refcnt Use Interface 147 127.0.0.1 127.0.0.1 UH 0 0 lo0 148 137.175.6.3 137.175.6.3 UH 1 11339 le0 149 default 137.175.2.7 UG 0 1266 ppp0 150 137.175.6.0 137.175.6.3 U 0 0 le0 151 crappie 111% 152 153The default route to remora is a result of the first line in the 154/etc/gateways file ("default" can't be used there; you have to say 155"0.0.0.0"). 156 157On the network at work, I add a static route in our gateway machine's 158/etc/rc.local file: 159 160 /usr/etc/route add net 137.175.6 remora 1 161 162All the other machines in the office have default routes pointing at 163the gateway machine, and all PPP-connected external machines are on the 164137.175.6 subnet. 165 166Send me mail or post to the newsgroup comp.protocols.ppp if you have 167any questions. 168 169Karl Fox <karl@MorningStar.Com> 170