1 1.1 christos Configuring a PPP link. 2 1.1 christos 3 1.1 christos After you have compiled and installed this package, there are some 4 1.1 christos configuration files which will generally need to be set up. The 5 1.1 christos pppd(8) man page is the best reference for the full details; this file 6 1.1 christos outlines the configuration process for the most common case, where 7 1.1 christos this package is being used to enable a machine to dial an ISP and 8 1.1 christos connect to the internet. The FAQ and README.linux files also provide 9 1.1 christos useful information about setting up PPP. 10 1.1 christos 11 1.1 christos Dialling an ISP. 12 1.1 christos **************** 13 1.1 christos 14 1.1 christos Usually, an ISP will assign an IP address to your machine, and will 15 1.1 christos refuse to authenticate itself to you. Some ISPs require a username 16 1.1 christos and password to be entered before PPP service commences, while others 17 1.1 christos use PPP authentication (using either the PAP or CHAP protocols). 18 1.1 christos 19 1.1 christos The recommended way to set up to dial an ISP is for the system 20 1.1 christos administrator to create a file under /etc/ppp/peers, named for the ISP 21 1.1 christos that you will be dialling. For example, suppose the file is called 22 1.1 christos /etc/ppp/peers/isp. This file would contain something like this: 23 1.1 christos 24 1.1 christos ttyS0 # modem is connected to /dev/ttyS0 25 1.1 christos 38400 # run the serial port at 38400 baud 26 1.1 christos crtscts # use hardware flow control 27 1.1 christos noauth # don't require the ISP to authenticate itself 28 1.1 christos defaultroute # use the ISP as our default route 29 1.1 christos connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp' 30 1.1 christos 31 1.1 christos If there are any other pppd options that should apply when calling 32 1.1 christos this ISP, they can also be placed in this file. 33 1.1 christos 34 1.1 christos The /etc/ppp/chat-isp file named in the last line contains the script 35 1.1 christos for chat(8) to use to dial the ISP and go through any username/ 36 1.1 christos password authentication required before PPP service starts. Here is 37 1.1 christos an example (for dialling an Annex terminal server): 38 1.1 christos 39 1.1 christos ABORT "NO CARRIER" 40 1.1 christos ABORT "NO DIALTONE" 41 1.1 christos ABORT "ERROR" 42 1.1 christos ABORT "NO ANSWER" 43 1.1 christos ABORT "BUSY" 44 1.1 christos ABORT "Username/Password Incorrect" 45 1.1 christos "" "at" 46 1.1 christos OK "at&d2&c1" 47 1.1 christos OK "atdt2479381" 48 1.1 christos "name:" "^Uusername" 49 1.1 christos "word:" "\qpassword" 50 1.1 christos "annex" "ppp" 51 1.1 christos "Switching to PPP-ppp-Switching to PPP" 52 1.1 christos 53 1.1 christos See the chat(8) man page for details of the script. If you are not 54 1.1 christos sure how the initial dialog with your ISP will go, you could use 55 1.1 christos a terminal emulator such as kermit or minicom to go through the 56 1.1 christos process manually. 57 1.1 christos 58 1.1 christos If your ISP requires PAP or CHAP authentication, you will have to 59 1.1 christos create a line in /etc/ppp/pap-secrets or /etc/ppp/chap-secrets like 60 1.1 christos this: 61 1.1 christos 62 1.1 christos myhostname * "password" 63 1.1 christos 64 1.1 christos (Replace myhostname with the hostname of your machine.) 65 1.1 christos 66 1.1 christos At this point, you can initiate the link with the command: 67 1.1 christos 68 1.1 christos /usr/sbin/pppd call isp 69 1.1 christos 70 1.1 christos (N.B.: pppd might be installed in a different directory on some 71 1.1 christos systems). 72 1.1 christos 73 1.1 christos This will return to the shell prompt immediately, as pppd will detach 74 1.1 christos itself from its controlling terminal. (If you don't want it to do 75 1.1 christos this, use the "nodetach" option.) 76 1.1 christos 77 1.1 christos Pppd will log messages describing the progress of the connection and 78 1.1 christos any errors using the syslog facility (see the syslogd(8) and 79 1.1 christos syslog.conf(5) man pages). Pppd issues messages using syslog facility 80 1.1 christos daemon (or local2 if it has been compiled with debugging enabled); 81 1.1 christos chat uses facility local2. It is often useful to see messages of 82 1.1 christos priority notice or higher on the console. To see these, find the line 83 1.1 christos in /etc/syslog.conf which has /dev/console on the right-hand side, and 84 1.1 christos add `daemon.notice' on the left. This line should end up something 85 1.1 christos like this: 86 1.1 christos 87 1.1 christos *.err;kern.debug;daemon,local2,auth.notice;mail.crit /dev/console 88 1.1 christos 89 1.1 christos If you want to see more messages from pppd, request messages of 90 1.1 christos priority info or higher for facility daemon, like this: 91 1.1 christos 92 1.1 christos *.err;kern.debug;daemon.info;local2,auth.notice;mail.crit /dev/console 93 1.1 christos 94 1.1 christos It is also useful to add a line like this: 95 1.1 christos 96 1.1 christos daemon,local2.debug /etc/ppp/ppp-log 97 1.1 christos 98 1.1 christos If you do this, you will need to create an empty /etc/ppp/ppp-log 99 1.1 christos file. 100 1.1 christos 101 1.1 christos After modifying syslog.conf, you will then need to send a HUP signal 102 1.1 christos to syslogd (or reboot). 103 1.1 christos 104 1.1 christos When you wish terminate the PPP link, you should send a TERM or INTR 105 1.1 christos signal to pppd. Pppd writes its process ID to a file called 106 1.1 christos ppp<n>.pid in /var/run (or /etc/ppp on older systems such as SunOS or 107 1.1 christos Ultrix). Here <n> is the PPP interface unit number, which will be 0 108 1.1 christos unless you have more than one PPP link running simultaneously. Thus 109 1.1 christos you can terminate the link with a command like 110 1.1 christos 111 1.1 christos kill `cat /var/run/ppp0.pid` 112