xref: /freebsd/libexec/pppoed/pppoed.8 (revision 8fa113e5fc65fe6abc757f0089f477a87ee4d185)
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 invoking a
50.Xr ppp 8
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 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
85.Dv SUCCESS
86indication,
87.Nm
88will execute
89.Pp
90.D1 Ic exec Pa /usr/sbin/ppp Fl direct Ar label
91.Pp
92as a shell sub-process.
93If
94.Ar label
95has not been specified, it defaults to
96.Ar provider .
97It is possible to specify another command using the
98.Ar exec
99argument.
100This is mandatory if
101.Ar provider
102and
103.Ar label
104are not given.
105The child process will have standard input and standard output
106attached to the same
107.Xr netgraph 4
108data socket
109(see
110.Xr ng_socket 4 )
111when started.
112.Pp
113The environment variable
114.Ev HISMACADDR
115is made available to the child process and is set to the MAC address of
116the peer.
117.Pp
118Upon invocation,
119.Nm
120will attach a
121.Dq pppoe
122netgraph node to the relevant
123.Dq ether
124node using
125.Dq Ar interface Ns \&:
126as the node name, and then connect that
127.Dq pppoe
128node to a local
129.Dq socket
130node.
131If the
132.Fl F
133option has not been given,
134.Nm
135will then go into the background and disassociate itself from the controlling
136terminal.
137When the
138.Fl F
139option is given,
140.Nm
141stays in the foreground.
142.Pp
143If the
144.Fl d
145option is given, additional diagnostics are provided (see the
146.Sx DIAGNOSTICS
147section below).
148If the
149.Fl n
150option is given,
151.Fn NgSetDebug
152is called with an argument of
153.Ar ngdebug .
154.Pp
155If
156.Ar pidfile
157is given,
158.Nm
159will write its process ID to this file on startup.
160.Sh DIAGNOSTICS
161After creating the necessary
162.Xr netgraph 4
163nodes as described above,
164.Nm
165uses
166.Xr syslogd 8
167to report all incoming connections.
168If the
169.Fl d
170option is given,
171.Nm
172will report on the child processes creation of a new netgraph socket, it's
173service offer and the invocation of the
174.Xr ppp 8
175program.
176If the
177.Fl n
178option is given, netgraph diagnostic messages are also redirected to
179.Xr syslogd 8 .
180.Pp
181It is sometimes useful to add the following to
182.Pa /etc/syslog.conf :
183.Bd -literal -offset indent
184!pppoed
185*.*				/var/log/pppoed.log
186.Ed
187.Pp
188and the following to
189.Pa /etc/newsyslog.conf :
190.Pp
191.Dl "/var/log/pppoed.log			640  3	   100	*     Z"
192.Sh SEE ALSO
193.Xr NgSetDebug 3 ,
194.Xr netgraph 4 ,
195.Xr ng_ether 4 ,
196.Xr ng_pppoe 4 ,
197.Xr ng_socket 4 ,
198.Xr syslog.conf 5 ,
199.Xr ppp 8 ,
200.Xr syslogd 8
201.Sh BUGS
202If another netgraph node is using the given interface,
203.Nm
204will fail to start.
205This is because
206.Xr netgraph 4
207does not currently allow node chaining.
208This may change in the future.
209.Sh HISTORY
210The
211.Nm
212program was written by
213.An Brian Somers Aq brian@Awfulhak.org
214and first appeared in
215.Fx 3.4 .
216