xref: /freebsd/libexec/pppoed/pppoed.8 (revision 5521ff5a4d1929056e7ffc982fac3341ca54df7c)
1.\"-
2.\" Copyright (c) 1999 Brian Somers <brian@Awfulhak.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd November 8, 1999
29.Dt PPPOED 8
30.Os FreeBSD
31.Sh NAME
32.Nm pppoed
33.Nd handle incoming PPP over Ethernet connections
34.Sh SYNOPSIS
35.Nm
36.Op Fl Fd\&
37.Op Fl P Ar pidfile
38.Op Fl a Ar name
39.Op Fl e Ar exec
40.Op Fl n Ar ngdebug
41.Op Fl p Ar provider
42.Ar interface
43.Sh DESCRIPTION
44The
45.Nm
46program listens to the given
47.Ar interface
48for PPP over Ethernet (PPPoE) service request packets, and actions them
49by negotiating a session then envoking a
50.Em PPP
51program.  The negotiation is implemented by the
52.Dq pppoe
53netgraph node.  See
54.Xr ng_pppoe 4
55for details.
56.Pp
57.Nm
58will only offer services to clients requesting services from the given
59.Ar provider ,
60which is taken as an empty name if not provided.
61If a provider name of
62.Dq \&*
63is given, any PPPoE requests will be offered service.
64.Pp
65The supplied
66.Ar name
67will be given as the access concentrator name when establishing the
68connection.  If no
69.Ar name
70is given, the current base hostname is used.
71.Pp
72After receiving a request (PADI) from the PPPoE netgraph node,
73.Nm
74.Xr fork 2 Ns No s
75a child process and returns to service further requests.  The child process
76offers service
77.Pq using Ar name
78and waits for a
79.Dv SUCCESS
80indication from the PPPoE node.  On receipt of the SUCCESS indication,
81.Nm
82will execute
83.Pp
84.D1 Ic exec /usr/sbin/ppp -direct Ar provider
85.Pp
86as a shell sub-process.  It is possible to specify another command using the
87.Ar exec
88argument.  This is mandatory if
89.Ar provider
90is not given.  The child process will have standard input and standard output
91attached to the same
92.Xr netgraph 4
93data socket
94.Pq see Xr ng_socket 4
95when started.
96.Pp
97Upon invocation,
98.Nm
99will attach a
100.Dq pppoe
101netgraph node to the relevant
102.Dq ether
103node using
104.Dq Ar interface Ns No \&:
105as the node name, and then connect that
106.Dq pppoe
107node to a local
108.Dq socket
109node.  If the
110.Fl F
111flag has not been given,
112.Nm
113will then go into the background and disassociate itself from the controlling
114terminal.  When the
115.Fl F
116flag is given,
117.Nm
118stays in the foreground.
119.Pp
120If the
121.Fl d
122flag is given, additional diagnostics are provided (see the
123.Sx DIAGNOSTICS
124section below).
125If the
126.Fl n
127flag is given,
128.Fn NgSetDebug
129is called with an argument of
130.Ar ngdebug .
131.Pp
132If
133.Ar pidfile
134is given,
135.Nm
136will write its process ID to this file on startup.
137.Sh DIAGNOSTICS
138After creating the necessary
139.Xr netgraph 4
140nodes as described above,
141.Nm
142uses
143.Xr syslogd 8
144to report all incoming connections.  If the
145.Fl d
146flag is given,
147.Nm
148will report on the child processes creation of a new netgraph socket, it's
149service offer and the invocation of the
150.Em PPP
151program.
152If the
153.Fl n
154option is given, netgraph diagnostic messages are also redirected to
155.Xr syslogd 8 .
156.Pp
157It is sometimes useful to add the following to
158.Pa /etc/syslog.conf :
159.Pp
160.Dl !pppoed
161.Dl "*.*				/var/log/pppoed.log
162.Pp
163and the following to
164.Pa /etc/newsyslog.conf :
165.Pp
166.Dl "/var/log/pppoed.log			640  3	   100	*     Z
167.Pp
168.Sh SEE ALSO
169.Xr NgSetDebug 3 ,
170.Xr netgraph 4 ,
171.Xr ng_ether 4 ,
172.Xr ng_pppoe 4 ,
173.Xr ng_socket 4 ,
174.Xr syslog.conf 5 ,
175.Xr ppp 8 ,
176.Xr syslogd 8
177.Sh BUGS
178If another netgraph node is using the given interface,
179.Nm
180will fail to start.  This is because
181.Xr netgraph 4
182does not currently allow node chaining.  This may change in the future.
183.Sh HISTORY
184The
185.Nm
186program was written by
187.An Brian Somers Aq brian@Awfulhak.org
188and first appeared in
189.Fx 3.4 .
190