]> Cypherpunks.ru repositories - nncp.git/blob - doc/integration/ppp.texi
e274cd16c72883545b638a82ee7dbc04803de823
[nncp.git] / doc / integration / ppp.texi
1 @node PPP
2 @section Serial connection
3
4 It is not trivial to run online @command{nncp-daemon},
5 @command{nncp-call} and @command{nncp-caller} commands over the serial
6 link, because it is link without built-in error detection. For efficient
7 usage you have to use some kind of window-sliding error correction
8 protocol, like Kermit, ZMODEM, UUCP's g-protocol and similar well known
9 ones.
10
11 However TCP is already satisfying and existing protocol for the same
12 purposes. So it would be more easier to bring up the IP interconnection
13 and use TCP over it. Most distributions already have
14 @url{https://en.wikipedia.org/wiki/Point-to-point_protocol, PPP}
15 protocol out-of-box.
16
17 Ordinary man page for @command{ppp} in FreeBSD is enough for being able
18 to setup it:
19
20 @itemize
21
22 @item Enable PPP-aware default terminal to run @command{ppplogin} script:
23
24 @example
25 /etc/gettytab:
26     default:pp=/usr/local/bin/ppplogin:@dots{}
27 @end example
28
29 @example
30 /usr/local/bin/ppplogin:
31     #!/bin/sh
32     exec /usr/sbin/ppp -direct incoming
33 @end example
34
35 @item Enable listening on necessary UART:
36
37 @example
38 /etc/ttys:
39     ttyU0 "/usr/libexec/getty 3wire.115200" vt100 on
40 @end example
41
42 @item
43 Create @code{incoming} PPP profile, allowing authenticated @code{ppp}
44 user to log in:
45
46 @example
47 /etc/ppp/ppp.conf:
48     incoming:
49         allow ppp
50         disable deflate pred1 mppe protocomp vjcomp ipcp dns
51         enable lqr # null-modem cables might not have carrier detection
52 /etc/ppp/ppp.secret:
53     ppp PASSWORD
54 @end example
55
56 @item
57 Configure PPP client to access that server:
58
59 @example
60 /etc/ppp/ppp.conf:
61     outgoing:
62         set device /dev/cuaU0
63         set speed 115200
64         set dial
65         set login
66         set authname ppp
67         set authkey PASSWORD
68         disable deflate pred1 mppe protocomp vjcomp ipcp dns
69         enable lqr
70 @end example
71
72 @end itemize
73
74 That configuration does not negotiate any kind of IPv4 addresses,
75 routing or DNS servers. Also all compression is turned off, because
76 NNCP's traffic is encrypted and uncompressible. Only IPV6CP will
77 negotiate IPv6 link-local addresses, on which you can run @ref{MCD,
78 multicast discovered} daemons for simplicity.