xref: /freebsd/libexec/pppoed/pppoed.8 (revision 41466b50c1d5bfd1cf6adaae547a579a75d7c04e)
1.\"-
2.\" Copyright (c) 1999-2001 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
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 | Fl l Ar label
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.
52The negotiation is implemented by the
53.Dq pppoe
54netgraph node.
55See
56.Xr ng_pppoe 4
57for details.
58.Pp
59.Nm
60will only offer services to clients requesting services from the given
61.Ar provider ,
62which is taken as an empty name if not provided.
63If a provider name of
64.Dq \&*
65is given, any PPPoE requests will be offered service.
66.Pp
67The supplied
68.Ar name
69will be given as the access concentrator name when establishing the connection.
70If no
71.Ar name
72is given, the current base hostname is used.
73.Pp
74After receiving a request (PADI) from the PPPoE netgraph node,
75.Nm
76.Xr fork 2 Ns No s
77a child process and returns to service further requests.
78The child process offers service
79(using
80.Ar name )
81and waits for a
82.Dv SUCCESS
83indication from the PPPoE node.
84On receipt of the SUCCESS indication,
85.Nm
86will execute
87.Pp
88.D1 Ic exec /usr/sbin/ppp -direct Ar label
89.Pp
90as a shell sub-process.
91If
92.Ar label
93has not been specified, it defaults to
94.Ar provider .
95It is possible to specify another command using the
96.Ar exec
97argument.
98This is mandatory if
99.Ar provider
100and
101.Ar label
102are not given.
103The child process will have standard input and standard output
104attached to the same
105.Xr netgraph 4
106data socket
107(see
108.Xr ng_socket 4 )
109when started.
110.Pp
111Upon invocation,
112.Nm
113will attach a
114.Dq pppoe
115netgraph node to the relevant
116.Dq ether
117node using
118.Dq Ar interface Ns No \&:
119as the node name, and then connect that
120.Dq pppoe
121node to a local
122.Dq socket
123node.
124If the
125.Fl F
126flag has not been given,
127.Nm
128will then go into the background and disassociate itself from the controlling
129terminal.
130When the
131.Fl F
132flag is given,
133.Nm
134stays in the foreground.
135.Pp
136If the
137.Fl d
138flag is given, additional diagnostics are provided (see the
139.Sx DIAGNOSTICS
140section below).
141If the
142.Fl n
143flag is given,
144.Fn NgSetDebug
145is called with an argument of
146.Ar ngdebug .
147.Pp
148If
149.Ar pidfile
150is given,
151.Nm
152will write its process ID to this file on startup.
153.Sh DIAGNOSTICS
154After creating the necessary
155.Xr netgraph 4
156nodes as described above,
157.Nm
158uses
159.Xr syslogd 8
160to report all incoming connections.
161If the
162.Fl d
163flag is given,
164.Nm
165will report on the child processes creation of a new netgraph socket, it's
166service offer and the invocation of the
167.Em PPP
168program.
169If the
170.Fl n
171option is given, netgraph diagnostic messages are also redirected to
172.Xr syslogd 8 .
173.Pp
174It is sometimes useful to add the following to
175.Pa /etc/syslog.conf :
176.Pp
177.Dl !pppoed
178.Dl "*.*				/var/log/pppoed.log
179.Pp
180and the following to
181.Pa /etc/newsyslog.conf :
182.Pp
183.Dl "/var/log/pppoed.log			640  3	   100	*     Z
184.Sh SEE ALSO
185.Xr NgSetDebug 3 ,
186.Xr netgraph 4 ,
187.Xr ng_ether 4 ,
188.Xr ng_pppoe 4 ,
189.Xr ng_socket 4 ,
190.Xr syslog.conf 5 ,
191.Xr ppp 8 ,
192.Xr syslogd 8
193.Sh BUGS
194If another netgraph node is using the given interface,
195.Nm
196will fail to start.
197This is because
198.Xr netgraph 4
199does not currently allow node chaining.
200This may change in the future.
201.Sh HISTORY
202The
203.Nm
204program was written by
205.An Brian Somers Aq brian@Awfulhak.org
206and first appeared in
207.Fx 3.4 .
208