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