1 TITLE: How to QUICKLY install PPP 2.4.1 over a modem
8 AUTHOR: Sebastien Millet <sebastien.millet2@libertysurf.fr>
12 When you manage to install a simple PPP access over a
13 modem (a SERIAL modem, connected to a regular RTC
14 phone line), in order to get connected to your ISP,
15 you need to know where is the latest PPP package
16 available and how to install and configure it.
18 This hint will indicate you how to do this WITHOUT
19 downloading huge packages like wvdial, linuxconf
20 or other high level configuration tools. You'll
21 only need to download the PPP source
22 (ppp-2.4.1.tar.gz at the time of this writing).
24 Also, this hint includes an option to make connection
25 be automatic (on demand).
33 http://www.samba.org/ppp
34 Alternative freshmeat URL
35 http://freshmeat.net/projects/pppd
40 Once you've downloaded ppp source, extract it from
41 the gzipped tarball by running
42 tar -zxvf ppp-2.4.1.tar.gz
44 Then CD to ppp-2.4.1 directory and run the usual triptic
49 As usually "make install" must be run as root.
54 It is assumed here that you compiled your kernel with
55 support for PPP. To make PPP available in your kernel,
56 CD into /usr/src/linux, execute
58 and answer Y (or M when possible, if you manage
59 to make PPP be available as a module) to the questions
65 PPP (point-to-point protocol) support
67 PPP support for async serial ports
68 PPP support for sync tty ports
69 PPP Deflate compression
70 PPP SD_Compress compression
72 Also you have to enable the "dummy network driver", so to
73 have PPP manage an "empty" network device when the PPP
76 Starting from this point, it is assumed that you're root.
78 Execute the following to create the file ppp-on-dialer:
80 cat > /etc/ppp/ppp-on-dialer << "EOF"
86 ABORT '\nNO ANSWER\r' \
87 ABORT '\nRINGING\r\n\r\nRINGING\r' \
93 ogin:--ogin: $ACCOUNT \
96 chmod a+x /etc/ppp/ppp-on-dialer
98 Note that \rATM0 is used to turn modem speaker off.
99 If you want your modem speaker on or if ATM0 command
100 fails on your modem, simply write \rAT (original
101 string, given by the PPP-HOWTO) instead of \rATM0.
103 Now create ppp-on script:
105 cat > /etc/ppp/ppp-on << "EOF"
108 # Beginning of /etc/ppp/ppp-on
110 TELEPHONE=my-phone-number
111 ACCOUNT=-my-account-name
116 export TELEPHONE ACCOUNT PASSWORD
118 DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
120 exec /usr/sbin/pppd /dev/ttyS0 115200 $LOCAL_IP:$REMOTE_IP \
121 connect $DIALER_SCRIPT disconnect "chat -v -- \d+++\d\c OK ATH0 OK"
123 # End of /etc/ppp/ppp-on
125 chmod a+x /etc/ppp/ppp-on
127 You have to replace my-phone-number, my-account-name and
128 my-password with your values. Also, in the "exec ..."
129 line, replace /dev/ttyS0 with the correct serial port
130 on which your modem is installed. Consider that
131 /dev/ttyS0 corresponds to COM1:
132 /dev/ttyS1 corresponds to COM2:
135 Now ADD an option to the options file, by executing:
137 cat >> /etc/ppp/options << "EOF"
142 If you want you can also specify the option
144 in /etc/ppp/options, where <n> is the hang-up timeout in seconds
145 (for example idle 60 to get a one minute idle timeout).
147 Now create the file ppp-off:
149 cat > /etc/ppp/ppp-off << "EOF"
152 # Beginning of /etc/ppp/ppp-off
154 if [ "$1" = "" ]; then
160 if [ -r /var/run/$DEVICE.pid ]; then
161 kill -INT `cat /var/run/$DEVICE.pid`
163 if [ ! "$?" = "0" ]; then
164 rm -f /var/run/$DEVICE.pid
165 echo "ERROR: Removed staled pid file"
169 echo "PPP link to $DEVICE terminated."
173 echo "ERROR: PPP link is not active on $DEVICE"
176 # End of /etc/ppp/ppp-off
178 chmod a+x /etc/ppp/ppp-off
180 Now you can connect to your ISP by running
182 and disconnect by running
185 To analyze what's going on in case of failure,
186 switch to a terminal that you'll dedicate
187 to display system messages (or open a xterm if
188 you're working under X), execute
189 tail -f /var/log/sys.log
190 and you'll see chat and pppd logs on the fly.
191 When you're OK you can remove the debug option
192 from pppd options file (/etc/ppp/options). You can
193 also consider removing -v option of chat invocation
194 (in the /etc/ppp/ppp-on-dialer file), though this
195 logging is useful and often left.
198 4. Configure name resolution
200 Configure name resolution by executing the following:
202 cat > /etc/host.conf << "EOF"
209 cat > /etc/resolv.conf << "EOF"
212 domain my-isp-domain-name
213 nameserver first-dns-ip-address
214 nameserver second-dns-ip-address
217 In the file /etc/resolv.conf, replace my-isp-domain-name,
218 first-dns-ip-address and second-dns-ip-address
219 with the correct values.
222 5. Configure on-demand connection (optional)
224 Execute the following:
226 cat > /etc/sysconfig/network-devices/ifconfig.ppp0 << "EOF"
230 cat > /etc/sysconfig/network-devices/ifup-ppp0 << "EOF"
238 cat > /etc/sysconfig/network-scripts/ifdown-ppp0 << "EOF"
247 cat >> /etc/ppp/options << "EOF"
253 Note that you may have already supplied the idle option.
254 Tune the idle option to a value that fits your wishes.
257 6. How to get detailed informations about PPP
260 http://www.tldp.org/HOWTO/PPP-HOWTO/index.html
261 The same HOWTO as above, but in a single HTML file
262 http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/PPP-HOWTO.html
265 ftp://sunsite.unc.edu/pub/Linux/docs/faqs/PPP-FAQ/PPP-FAQ