SETUP 4.1 KB

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