Deleted Added
full compact
1.\" manual page [] for ppp 0.93
2.\" $Id:$
3.\" SH section heading
4.\" SS subsection heading
5.\" LP paragraph
6.\" IP indented paragraph
7.\" TP hanging label
8.TH PPP 8
9.SH NAME
10ppp \- Point to Point Protocol (aka iijppp)
11.SH SYNOPSIS
12.B ppp
13[
14.I -auto | -direct -dedicated
15] [
16.I system
17]
18.SH DESCRIPTION
19.LP
20 This is user process \fIPPP\fR software package. Normally, \fIPPP\fR is implemented as a part of kernel and hard to debug and/or modify its behavior. However, in this implementation, \fIPPP\fR is implemented as a user process with the help of tunnel device driver.
21.LP
22
23.SH Major Features
24
25.TP 2
26o
27Provide interactive user interface. Using its command mode, user can easily enter commands to establish the connection with the peer, check the status of connection, and close the connection.
28
29.TP 2
30o
31Supports both of manual and automatic dialing. Interactive mode has ``term'' command which enables you to talk to your modem directory. When your modem is connected to the peer, and it starts to speak \fIPPP\fR, \fIPPP\fR software detects it and turns into packet mode automatically. Once you have convinced how to connect with the peer, you can write chat script to define necessary dialing and login procedure for later convenience.
32.TP 2
33o
34Supports on-demand dialup capability. By using auto mode, \fIPPP\fR program will act as a daemon and wait for the packet send to the peer. Once packet is found, daemon automatically dials and establish the connection.
35
36.TP 2
37o
38Can act as server which accept incoming \fIPPP\fR connection.
39
40.TP 2
41o
42Supports PAP and CHAP authentification.
43
44.TP 2
45o
46Supports packet filtering. User can define three kinds of filters; ifilter for incoming packet, ofilter for outgoing packet and dfilter to define dialing trigger packet.
47
48.TP 2
49o
50Tunnel driver supports bpf. That is, user can use tcpdump to check packet flow over the \fIPPP\fR link.
51
52.TP 2
53o
54Supports \fIPPP\fR over TCP capability.
55
56.TP 2
57o
58Supports IETF draft Predictor-1 compression.
59
60.TP 2
61o
62Runs under BSDI-1.1 and FreeBSD-1.1. Patch for NeXTSTEP 3.2 is also available on the net.
63
64.SH MANUAL DIALING
65.LP
66
67 % ppp
68 User Process PPP written by Toshiharu OHNO.
69 -- You can specify modem and device name using following commands.
70 ppp> set line /dev/cua01
71 ppp> set speed 38400
72 ppp> set parity even
73 ppp> show modem
74 -- Modem related parameters are shown in here
75 ppp>
76 -- Use term command to talk with your modem
77 ppp> term
78 at
79 OK
80 atdt123456
81 CONNECT
82
83 login: ppp
84 Password:
85 -- PPP started in remote side ---
86
87 -- When peer start to speak PPP, the program will detect it
88 -- automatically and back to command mode.
89 ppp>
90 \fBPPP\fR>
91
92 -- NOW, you are get connected !! Note that prompt has changed to
93 -- capital letters
94 PPP> show lcp
95
96 -- You'll see LCP status --
97
98 PPP> show ipcp
99
100 -- You'll see IPCP status --
101 -- At this point, your machine has host route to the peer.
102 -- If your want to add default route entry, then enter
103
104 PPP> add 0 0 HISADDR
105
106 -- Here string `HISADDR' represents IP address of connected peer.
107
108 PPP>
109 -- Use applications (i.e. ping, telnet, ftp) in other windows
110
111 PPP> show log
112
113 -- Gives you some logging messages
114
115 PPP> close
116
117 -- Connection is closed, and modem will be hanged.
118
119 ppp> quit
120 %
121.LP
122.SH AUTOMATIC DIALING
123
124.LP
125To use automatic dialing, you must prepare Dial and Login chat script.See example definition found in ppp.conf.sample(Format of ppp.conf is pretty simple.)
126.LP
127
128.TP 2
129o
130Each line contains one command, label or comment.
131
132.TP 2
133o
134Line stating with # is treated as a comment line.
135
136.TP 2
137o
138Label name has to start from first column and should be followed by colon (:).
139
140.TP 2
141o
142Command line must contains space or tab at first column.
143
144.LP
145If ppp.conf is ready, specify destination label name when you invoke ppp. Commands associated with destination label is executed when ppp command is invoked. Note that commands associated with ``default'' label is ALWAYS executed.
146
147Once connection is made, you'll find that prompt is changed to
148
149 capital \fIPPP\fR>.
150
151 % ppp pm2
152 ...
153 ppp> dial
154 dial OK!
155 login OK!
156 PPP>
157
158If ppp.linkup file is available, its contents are executed when \fIPPP\fR link is connected. See example which add default route. The string HISADDR matches with IP address of connected peer.
159.LP
160
161.SH DAIL ON DEMAND
162
163.LP
164 To play with demand dialing, you must use -auto option. Also, you must specify destination label with proper setup in ppp.conf. It must contain ``ifaddr'' command to define peer's IP address. (refer /etc/ppp/ppp.conf.sample)
165.LP
166
167 % ppp -auto pm2demand
168 ...
169 %
170
171.LP
172When -auto is specified, \fIPPP\fR program works as a daemon. But, you are still able to use command features to check its behavior.
173.LP
174
175 % telnet localhost 3000
176 ...
177 PPP> show ipcp
178 ....
179
180.LP
181 Each ppp has associated port number, which is computed as "3000 + tunnel_device_number". If 3000 is not good base number, edit defs.h. When packet toward to remote network is detected, \fIPPP\fR will take dialing action and try to connect with the peer. If dialing is failed, program will wait for 30 seconds. Once this hold time expired, another trigger packet cause dialing action. Note that automatic re-dialing is NOT implemented.
182.LP
183
184 To terminate program, use
185
186 PPP> close
187 \fBppp\fR> quit all
188
189.LP
190 Simple ``quit'' command will terminates telnet connection, but \fIPPP\fR program itself is not terminated. You must use ``quit all'' to terminate the program running as daemon.
191.LP
192
193.SH PACKET FILTERING
194
195.LP
196This implementation supports packet filtering. There are three filters; ifilter, ofilter and dfilter. Here's some basics.
197.LP
198
199.TP 2
200o
201Filter definition has next syntax.
202
203 set filter-name rule-no action [src_addr/src_width] [dst_addr/dst_width]
204 [proto [src [lt|eq|gt] port ] [dst [lt|eq|gt] port] [estab]
205
206 a) filter-name should be ifilter, ofilter or dfiler.
207
208 b) There are two actions permit and deny. If given packet is matched
209 against the rule, action is taken immediately.
210
211 c) src_width and dst_width works like a netmask to represent address range.
212
213 d) proto must be one of icmp, udp or tcp.
214
215.TP 2
216o
217Each filter can hold upto 20 rules. Rule number starts from 0. Entire rule set is not effective until rule 0 is defined.
218
219.TP 2
220o
221If no rule is matched with a packet, that packet will be discarded (blocked).
222
223.TP 2
224o
225Use ``set filer-name -1'' to flush all rules.
226
227.LP
228 See /etc/ppp/ppp.conf.filter.example
229.LP
230
231.SH RECEIVE INCOMING PPP CONNECTION
232
233.LP
234 To receive incoming \fIPPP\fR connection request, follow next steps.
235.LP
236
237 a) Prepare bidir entry in your /etc/gettytab
238
239 bidir.38400:\
240 :bi:ap:hf:tc=38400-baud:
241
242 b) Edit /etc/ttys to enable getty on the port where modem is attached.
243
244 cua00 "/usr/libexec/getty stdir.38400" dialup on
245
246 Don't forget to send HUP signal to init process.
247
248 # kill -HUP 1
249
250 c) Prepare account for incoming user.
251
252ppp:*:21:0:PPP Login User:/home/ppp:/usr/local/bin/ppplogin
253
254 d) Create /usr/local/bin/ppplogin file with next contents.
255
256 #!/bin/sh
257 /usr/local/bin/ppp -direct
258
259 You can specify label name for further control.
260
261.LP
262 Direct mode (-direct) lets \fIPPP\fR to work with standard in and out. Again, you can telnet to 3000 to get command mode control.
263.LP
264
265.SH SETTING IDLE TIMER
266
267.LP
268 To check/set idletimer, use ``show timeout'' and ``set timeout'' command.
269.LP
270
271 Ex. ppp> set timeout 600
272
273.LP
274 Timeout period is measured in secs and default value is 180 or 3 min. To disable idle timer function, use ``set timeout 0''.
275.LP
276
277.LP
278 In -auto mode, idle timeout cause \fIPPP\fR session closed. However, \fIPPP\fR program itself is keep running. Another trigger packet cause dialing action.
279.LP
280
281.SH Predictor-1 compression
282
283.LP
284 This version supports CCP and Predictor type 1 compression based on current IETF-draft specs. As a default behavior, \fIPPP\fR will propose to use (or willing to accept) this capability and use it if peer agrees (or requests).
285.LP
286
287.LP
288 To disable CCP/predictor function completely, use ``disable pred'' and ``deny pred'' command.
289.LP
290
291.SH Controlling IP address
292
293.LP
294 \fIPPP\fR uses IPCP to negotiate IP addresses. Each side of node informs IP address that willing to use to the peer, and if requested IP address is acceptable, \fIPPP\fR returns ACK to requester. Otherwise, \fIPPP\fR returns NAK to suggest the peer to use different IP address. When both side of nodes agrees to accept the received request (and send ACK), IPCP is reached to open state and network level connection is established.
295.LP
296
297.LP
298 To control, this IPCP behavior, this implementation has ``set ifaddr'' to define MY and HIS IP address.
299.LP
300
301.TP3
302ifaddr src_addr dst_addr
303
304.LP
305 Where, src_addr is the IP address that my side is willing to use, and dst_addr is the IP address which his side should use.
306.LP
307
308.TP3
309ifaddr 192.244.177.38 192.244.177.2
310
311For example, above specification means
312
313.TP
314o
315I strongly want to use 192.244.177.38 as my side. I'll disagree when peer suggest me to use other addresses.
316
317.TP 2
318o
319I strongly insists peer to use 192.244.177.2 as his side address. I don't permit him to use any IP address but 192.244.177.2. When peer request other IP address, I always suggest him to use 192.244.177.2.
320
321.LP
322 This is all right, when each side has pre-determined IP address.
323However, it is often the case one side is acting as a server which
324controls IP address and the other side should obey the direction from him.
325In order to allow more flexible behavior, `ifaddr' command allows user to specify IP address more loosely.
326.LP
327
328.TP 2
329ifaddr 192.244.177.38/24 192.244.177.2/20
330
331 Number followed by slash (/) represents number of bits significant in IP address. That is, this example means
332
333.TP 2
334o
335I'd like to use 192.244.177.38 as my side address, if it is possible. But I also accept any IP address between 192.244.177.0 and 192.244.177.255.
336
337.TP 2
338o
339I'd like to make him to use 192.244.177.2 as his side address. But I also permit him to use any IP address between 192.244.176.0 and 192.244.191.255.
340
341 Notes:
342
343.TP 2
344o
345As you may have already noticed, 192.244.177.2 is equivalent to say 192.244.177.2/32.
346
347.TP 2
348o
349As an exception, 0 is equivalent to 0.0.0.0/0. Means, I have no idea about IP address and obey what he says.
350
351.TP 2
352o
353192.244.177.2/0 means that I'll accept/permit any IP address but I'll try to insist to use 192.244.177.2 at first.
354
355.SH Connecting with service provider
356
357.LP
358 1) Describe provider's phone number in DialScript. Use ``set dial'' or
359 ``set phone'' command.
360
361 2) Describle login procedure in LoginScript. Use ``set login'' command.
362
363.TP
3643) Use ``set ifaddr'' command to define IP address.
365
366 o If you know what IP address provider uses, then use it as his address.
367
368 o If provider has assigned particular IP address for you, then use it
369 as my address.
370
371 o If provider assigns your address dynamically, use 0 as my address.
372
373 o If you have no info on IP addresses, then try
374
375 set ifaddr 0 0
376.TP 2
3774) If provider request you to use PAP/CHAP auth method,
378add next lines into your ppp.conf.
379
380.TP 3
381.B enable pap (or enable chap)
382.TP 3
383.B disable chap (or disable pap)
384.TP 3
385.B set authname MyName
386.TP 3
387.B set authkey MyPassword
388.TP 3
389
390.LP
391Please refer /etc/ppp/example/ppp.conf.iij for some real examples.
392.LP
393
394.SH Logging facility
395
396.LP
397 \fI\fIPPP\fR\fR is able to generate following level log info as /var/log/ppp.log
398.LP
399
400.TP
401.B Phase
402Phase transition log output
403.TP
404.B Chat
405Generate Chat script trace log
406.TP
407.B LQM
408Generate LQR report
409.TP
410.B LCP
411Generate LCP/IPCP packet trace
412.TP
413.B TCP/IP
414Dump TCP/IP packet
415.TP
416HDLC
417Dump HDLC packet in hex
418.TP
419.B Async
420Dump async level packet in hex
421
422.LP
423 ``set debug'' command allows you to set logging output level,
424and multiple levels can be specified.
425Default is equivalent to ``set debug phase lcp''.
426
427.SH For more details
428
429.TP 2
430o
431Please read Japanese doc for complete explanation.
432Well, it is not useful for non-japanese readers,
433but examples in the document may help you to guess.
434
435.TP 2
436o
437Please read example configuration files.
438
439.TP 2
440o
441Use ``help'', ``show ?'' and ``set ?'' command.
442
443.TP 2
444o
445NetBSD and BSDI-1.0 has been supported in previous release,
446but no longer supported in this release.
447Please contact to author if you need old driver code.
448
449.SH FILES
450.LP
451\fIPPP\fR may refers three files, ppp.conf, ppp.linkup and ppp.secret.
452These files are placed in /etc/ppp,
453but user can create his own files under HOME directory as .ppp.conf,
454.ppp.linkup and .ppp.secret.
455the ppp always try to consult to user's personal setup first.
456
457.TP
458.B $HOME/ppp/.ppp.[linkup|secret]
459User depend configuration files.
460
461.TP
462.B /etc/ppp/ppp.conf
463System default configuration file.
464
465.TP
466.B /etc/ppp/ppp.secret
467A authorization file for each system.
468
469.TP
470.B /etc/ppp/ppp.linkup
471A checking file when
472.I ppp
473establishes network level connection.
474
475.TP
476.B /var/log/ppp.log
477Logging and debug information file.
478
479.TP
480.B /var/spool/lock/Lck..*
481tty port locking file.
482
483.SH BUGS
484A Proxy arp is not support, yet.
485The TTS is little bit longer than pppd2.1, it's under improving ;-)
486
487.SH HISTORY
488This programm has deliverd into core since FreeBSD-2.1
489by Atsushi Murai (amurai@spec.co.jp).
490
491.SH AUTHORS
492Toshiharu OHNO (tony-o@iij.ad.jp)