PPP: version 2.2.0 (dynamic channel allocation) TCP compression code copyright 1989 Regents of the University of California PPP Dynamic channel allocation code copyright 1995 Caldera, Inc. PPP line discipline registered.
If no such lines are found then you need to make and install a new kernel with PPP and networking support. In this case consult the Kernel-HOWTO at The Linux Kernel HOWTO http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html.
Configuration files may be changed by direct editing or by special
distribution-dependent configuration tools such as linuxconf in
the RedHat distribution. In this section we show what the files should look
like. For information on how to use RedHat's configuration tools, see below.
search localhost nameserver 129.137.178.240 nameserver 129.137.8.114If it doesn't, edit the file as superuser or, if you are using RedHat, run the control-panel or linuxconf as superuser and edit the network description (see below).
127.0.0.1 localhost loopback 129.137.10.199 franco.ececs.uc.edu francoAlthough the second line is not necessary for a successful ppp installation, you might want to include one like it for other reasons (it seems to me that linux does not enjoy the feeling of not being networked). Of course, if you add such a line, do not use my hostname, use your own. If you do not know what your hostname is and you are networking only through ppp, then make one up. However, in that case you should observe standard rules for choosing such names.
loopback 127.0.0.0 localhost
NETWORKING=yes HOSTNAME=franco.ececs.uc.edu DOMAINNAME=ececs.uc.edu GATEWAY="129.137.8.249" GATEWAYDEV="" FORWARD_IPV4=no ...where franco.ececs.uc.edu and ececs.uc.edu are my hostname and domain and you should substitute your own. If you have already had a UC PPP account in the past, editing this file is probably unnecessary. If you are uncomfortable editing this file, you may run control-panel or linuxconf as superuser (see below). For other distributions, make sure the gateway is set in the appropriate file.
Also in RedHat 5.1 there is a file /etc/sysconfig/network-scripts/ifcfg-ppp0 which should have some lines looking like this:
DEVICE="ppp0" IPADDR="" NETWORK="129.137.8.0" NETMASK="255.255.252.0" ONBOOT="no" BOOTPROTO="none" PPPOPTIONS="" MODEMPORT="/dev/cua1" LINESPEED="115200" ESCAPECHARS="no" DEFABORT="no" HARDFLOWCTL="yes" PAPNAME="franco" REMIP="" MTU="" MRU="" ...Important: Modem port /dev/cua1 corresponds to COM2. If your modem is on another port you should change the line above accordingly. The easiest way to do this is by means of the in the control-panel or by using linuxconf (see below). Usually, /dev/modem will work.
If you are uncomfortable editing this file, you may use control-panel or linuxconf as superuser. For other distributions, make sure the network and netmask numbers for the ppp0 device are set in the appropriate file. If you have already had a UC PPP account in the past, this step is probably unnecessary.
The pppd software must be run setuid. Check with the following:
ls -l /usr/sbin/pppdYou should see something like this:
-rwsr-xr-x 1 root root 104876 Apr 24 06:14 /usr/sbin/pppd*If the s is missing from -rwsr-xr-x, as superuser execute:
chmod u+s /usr/sbin/pppd
asyncmap 0 crtscts defaultroute lock modem netmask 255.255.252.0 noipdefault -detach name your-username user your-usernamewhere your-username is the account name supplied by CITS.
# PAP secrets file # remotenames ppp-n are reserved for netcfg # Format: # name remote secret your-username * your-passwordwhere your-username is the account name supplied by CITS and your-password is the password you have chosen for the account when you filled in the application for an account. The star (*) is important, so do not leave it out. Separate the three entries on the last line with blanks.
-rwx------ 1 root root 9562 Jul 10 21:52 options* -rwx------ 1 root root 141 Jul 9 02:52 pap-secrets*
You need to supply two scripts, one to connect to UC and one to drop the
connection. Both will reside in /usr/local/bin. Because the new
PPP connection software used by CITS requires PAP (Password Authentication
Protocol) and the old one didn't and because users are limited to one login
at a time, there are some subtle changes to previous scripts that must be
made or you will tear your hair out for days trying to figure out why the
connection drops 10 seconds after it is established.
#!/bin/sh kill -9 `ps aex | grep chat | awk '{print $1}'` kill -9 `ps aex | grep pppd | awk '{print $1}'` setserial /dev/cua1 spd_vhi /usr/sbin/pppd connect 'chat -e ABORT BUSY ABORT "NO CARRIER" "" "\dat\&fL3dt8619503" CONNECT' /dev/cua1 115200In this case we have assumed your modem is Hayes compatible and is connected to /dev/cua1 (COM2).
Please carefully notice that the chat script (between ' characters) only dials the number and waits for a response from CITS. It does not login as with previous scripts. This is important. Also, please change /dev/cua1 to whatever port your modem is connected to. Usually, /dev/modem can be used without problems.
#!/bin/sh kill -9 `ps aex | grep chat | awk '{print $1}'` kill -9 `ps aex | grep pppd | awk '{print $1}'`This file merely finds the handles for the chat and pppd processes and kills them.
-rwxr-xr-x 1 root root 370 Jul 11 08:11 /usr/local/bin/ppp-uc* -rwxr-xr-x 1 root root 159 Jul 5 11:25 /usr/local/bin/ppp-off*
ppp-uc >& /dev/null &To connect from X windows you can do a number of creative things in addition to directly executing ppp-uc as above. If you are running fvwm, for example, you can add a line to your menus that brings up the connection with a click. For example,
Exec "PPP to UC" exec rxvt -T PPP +sb -font 6x12 -bg LightSkyBlue -geometry +100+100 -e /usr/local/bin/ppp-ucThen you can customize the connect script to let you know exactly when you can start issuing remote commands.
ppp-off
There are two standard ways to do this: execute
ifconfigin which case there should be a section of the output that looks like this:
ppp0 Link encap:Point-to-Point Protocol inet addr:129.137.229.78 P-t-P:129.137.231.248 Mask:255.255.252.0 UP POINTOPOINT RUNNING MTU:1500 Metric:1 RX packets:15 errors:0 dropped:0 overruns:0 TX packets:16 errors:0 dropped:0 overruns:0and execute
route -nwhich produces output such as the following:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 129.137.231.248 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 2 lo 0.0.0.0 129.137.231.248 0.0.0.0 UG 0 0 0 ppp0If you see the line beginning 127.0.0.0 but not the lines containing 129.137.231.248 there is a problem. Never attempt to correct this by using the route command to add inet routes and gateways yourself. This will lead to more frustration.
Jul 11 11:34:17 franco pppd[9198]: pppd 2.3.3 started by franco, uid 500 Jul 11 11:34:40 franco pppd[9198]: Serial connection established. Jul 11 11:34:41 franco pppd[9198]: Using interface ppp0 Jul 11 11:34:41 franco pppd[9198]: Connect: ppp0 <--> /dev/cua1 Jul 11 11:34:44 franco pppd[9198]: Remote message: Jul 11 11:34:47 franco pppd[9198]: local IP address 129.137.229.78 Jul 11 11:34:47 franco pppd[9198]: remote IP address 129.137.231.248
Jul 11 14:12:53 franco pppd[11172]: pppd 2.3.3 started by franco, uid 500 Jul 11 14:12:53 franco pppd[11172]: Removed stale lock on cua1 (pid 9198) Jul 11 14:13:17 franco pppd[11172]: Serial connection established. Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set flags to f0000 Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set flags to f0000 Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set xasyncmap Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set xmit asyncmap ffffffff Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set flags to f0000 Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set mru to 5dc Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set rcv asyncmap ffffffff Jul 11 14:13:18 franco kernel: ppp_tty_ioctl: set flags to f0000 Jul 11 14:13:18 franco pppd[11172]: Using interface ppp0 Jul 11 14:13:18 franco pppd[11172]: Connect: ppp0 <--> /dev/cua1 Jul 11 14:13:18 franco kernel: ppp_dev_stats called<7>ppp: receive buffer, count = 8 Jul 11 14:13:18 franco kernel: ppp: successfully queued 41 bytes, flags = f0f0000 Jul 11 14:13:18 franco kernel: ppp_dev_stats called<7>ppp: receive buffer, count = 16 Jul 11 14:13:18 franco kernel: ppp: successfully queued 26 bytes, flags = f0f0000 Jul 11 14:13:21 franco kernel: ppp_dev_stats called<6>ppp_dev_stats called<6>ppp: write frame, count = 24 Jul 11 14:13:21 franco kernel: ppp_dev_stats called<7>ppp: receive buffer, count = 8 Jul 11 14:13:21 franco kernel: ppp: successfully queued 22 bytes, flags = f0f0000 Jul 11 14:13:21 franco kernel: ppp_tty_ioctl: set xmit asyncmap 0 Jul 11 14:13:21 franco kernel: ppp_tty_ioctl: set flags to f0f0003 Jul 11 14:13:21 franco kernel: ppp_tty_ioctl: set mru to 5dc Jul 11 14:13:21 franco kernel: ppp_tty_ioctl: set rcv asyncmap 0 Jul 11 14:13:21 franco kernel: ppp_tty_ioctl: set flags to f0f0003 Jul 11 14:13:21 franco kernel: ppp_dev_stats called<6>ppp_dev_stats called<7>ppp: receive buffer, count = 11 Jul 11 14:13:21 franco kernel: ppp: successfully queued 7 bytes, flags = f0f0003 Jul 11 14:13:21 franco pppd[11172]: Remote message: Jul 11 14:13:21 franco kernel: ppp_tty_ioctl: set flags to f0f0043 Jul 11 14:13:21 franco kernel: ppp_dev_stats called<7>ppp: receive buffer, count = 36 Jul 11 14:13:21 franco kernel: ppp: successfully queued 16 bytes, flags = f0f0043 Jul 11 14:13:21 franco kernel: ppp: successfully queued 12 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp_dev_stats called<6>ppp_dev_stats called<6>ppp_dev_stats called<7>ppp: receive buffer, count = 48 Jul 11 14:13:23 franco pppd[11172]: Unsupported protocol (0x8029) received Jul 11 14:13:23 franco pppd[11172]: Unsupported protocol (0x802b) received Jul 11 14:13:23 franco kernel: ppp: successfully queued 55 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp: successfully queued 34 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp: successfully queued 12 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp: successfully queued 6 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp: successfully queued 11 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp_dev_stats called<7>ppp: receive buffer, count = 28 Jul 11 14:13:23 franco kernel: ppp: successfully queued 12 bytes, flags = f0f0043 Jul 11 14:13:23 franco kernel: ppp: successfully queued 8 bytes, flags = f0f0043 Jul 11 14:13:24 franco kernel: ppp_dev_stats called<7>ppp: receive buffer, count = 16 Jul 11 14:13:24 franco kernel: ppp: successfully queued 12 bytes, flags = f0f0043 Jul 11 14:13:24 franco kernel: ppp_tty_ioctl: set flags to f0f004b Jul 11 14:13:24 franco kernel: ppp: channel ppp0 going up for IP packets! Jul 11 14:13:24 franco pppd[11172]: local IP address 129.137.229.177 Jul 11 14:13:24 franco pppd[11172]: remote IP address 129.137.231.251 Jul 11 14:13:24 franco kernel: ppp: successfully queued 6 bytes, flags = f0f004b Jul 11 14:13:24 franco kernel: ppp_tty_ioctl: set flags to f0f00cb Jul 11 14:13:25 franco kernel: ppp_dev_stats called<6>ppp_dev_stats called<6>ppp_dev_stats called<6>ppp_dev_stats called<7>ppp_tty_read: called buf=08063e50 nr=1504Do not forget to change the /etc/ppp/options to remove the debugging feature after you have reliable connection scripts and configuration files or else you will accumulate a lot of junk you don't want.
To run linuxconf you must have a RedHat installation and superuser
access. Login as superuser and run linuxconf. The page
LinuxConf may be accessed to see
screen dumps showing what you should enter in the various linuxconf
dialog boxes.
To run the control-panel you must have a RedHat installation and
superuser access. Login as superuser and run control-panel. The
page Control-Panel may be accessed to see
screen dumps showing what you should enter in the various control-panel
dialog boxes. The pictures do not show how to enter PAP information. So, if
the control panel is used, the PAP-secrets file must be adjusted manually.