1dbc7ba8dSBrian Somers.\"- 2e9ffffffSBrian Somers.\" Copyright (c) 1999-2001 Brian Somers <brian@Awfulhak.org> 3dbc7ba8dSBrian Somers.\" All rights reserved. 4dbc7ba8dSBrian Somers.\" 5dbc7ba8dSBrian Somers.\" Redistribution and use in source and binary forms, with or without 6dbc7ba8dSBrian Somers.\" modification, are permitted provided that the following conditions 7dbc7ba8dSBrian Somers.\" are met: 8dbc7ba8dSBrian Somers.\" 1. Redistributions of source code must retain the above copyright 9dbc7ba8dSBrian Somers.\" notice, this list of conditions and the following disclaimer. 10dbc7ba8dSBrian Somers.\" 2. Redistributions in binary form must reproduce the above copyright 11dbc7ba8dSBrian Somers.\" notice, this list of conditions and the following disclaimer in the 12dbc7ba8dSBrian Somers.\" documentation and/or other materials provided with the distribution. 13dbc7ba8dSBrian Somers.\" 14dbc7ba8dSBrian Somers.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15dbc7ba8dSBrian Somers.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16dbc7ba8dSBrian Somers.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17dbc7ba8dSBrian Somers.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18dbc7ba8dSBrian Somers.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19dbc7ba8dSBrian Somers.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20dbc7ba8dSBrian Somers.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21dbc7ba8dSBrian Somers.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22dbc7ba8dSBrian Somers.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23dbc7ba8dSBrian Somers.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24dbc7ba8dSBrian Somers.\" SUCH DAMAGE. 25dbc7ba8dSBrian Somers.\" 26dbc7ba8dSBrian Somers.Dd November 8, 1999 27dbc7ba8dSBrian Somers.Dt PPPOED 8 280efe23d6SRuslan Ermilov.Os 29dbc7ba8dSBrian Somers.Sh NAME 30dbc7ba8dSBrian Somers.Nm pppoed 31dbc7ba8dSBrian Somers.Nd handle incoming PPP over Ethernet connections 32dbc7ba8dSBrian Somers.Sh SYNOPSIS 3376081989SRuslan Ermilov.Nm 3458eaff23SRuslan Ermilov.Op Fl Fd\& 3597cba131SBrian Somers.Op Fl P Ar pidfile 36dbc7ba8dSBrian Somers.Op Fl a Ar name 37c4d9468eSRuslan Ermilov.Op Fl e Ar exec | Fl l Ar label 38fd845ee4SBrian Somers.Op Fl n Ar ngdebug 39dbc7ba8dSBrian Somers.Op Fl p Ar provider 40dbc7ba8dSBrian Somers.Ar interface 41dbc7ba8dSBrian Somers.Sh DESCRIPTION 42dbc7ba8dSBrian SomersThe 43dbc7ba8dSBrian Somers.Nm 443f162cb8SPhilippe Charnierutility listens to the given 45dbc7ba8dSBrian Somers.Ar interface 46dbc7ba8dSBrian Somersfor PPP over Ethernet (PPPoE) service request packets, and actions them 47aa54a2e8SRuslan Ermilovby negotiating a session then invoking a 48aa54a2e8SRuslan Ermilov.Xr ppp 8 49e9ffffffSBrian Somersprogram. 50e9ffffffSBrian SomersThe negotiation is implemented by the 51dbc7ba8dSBrian Somers.Dq pppoe 52e9ffffffSBrian Somersnetgraph node. 53e9ffffffSBrian SomersSee 54fe11f6f6SMaxim Sobolev.Xr ng_pppoe 4 55dbc7ba8dSBrian Somersfor details. 56dbc7ba8dSBrian Somers.Pp 573f162cb8SPhilippe CharnierThe 58dbc7ba8dSBrian Somers.Nm 593f162cb8SPhilippe Charnierutility 60dbc7ba8dSBrian Somerswill only offer services to clients requesting services from the given 61dbc7ba8dSBrian Somers.Ar provider , 62dbc7ba8dSBrian Somerswhich is taken as an empty name if not provided. 63dbc7ba8dSBrian SomersIf a provider name of 64aa54a2e8SRuslan Ermilov.Dq * 65dbc7ba8dSBrian Somersis given, any PPPoE requests will be offered service. 66dbc7ba8dSBrian Somers.Pp 67dbc7ba8dSBrian SomersThe supplied 68dbc7ba8dSBrian Somers.Ar name 69e9ffffffSBrian Somerswill be given as the access concentrator name when establishing the connection. 70e9ffffffSBrian SomersIf no 71dbc7ba8dSBrian Somers.Ar name 72dbc7ba8dSBrian Somersis given, the current base hostname is used. 73dbc7ba8dSBrian Somers.Pp 74dbc7ba8dSBrian SomersAfter receiving a request (PADI) from the PPPoE netgraph node, 75dbc7ba8dSBrian Somers.Nm 76aa54a2e8SRuslan Ermilov.Xr fork 2 Ns s 77e9ffffffSBrian Somersa child process and returns to service further requests. 78e9ffffffSBrian SomersThe child process offers service 79c4d9468eSRuslan Ermilov(using 80c4d9468eSRuslan Ermilov.Ar name ) 81dbc7ba8dSBrian Somersand waits for a 82dbc7ba8dSBrian Somers.Dv SUCCESS 83e9ffffffSBrian Somersindication from the PPPoE node. 84aa54a2e8SRuslan ErmilovOn receipt of the 85aa54a2e8SRuslan Ermilov.Dv SUCCESS 86aa54a2e8SRuslan Ermilovindication, 87dbc7ba8dSBrian Somers.Nm 88dbc7ba8dSBrian Somerswill execute 89dbc7ba8dSBrian Somers.Pp 90aa54a2e8SRuslan Ermilov.D1 Ic exec Pa /usr/sbin/ppp Fl direct Ar label 91dbc7ba8dSBrian Somers.Pp 92e9ffffffSBrian Somersas a shell sub-process. 93e9ffffffSBrian SomersIf 94e9ffffffSBrian Somers.Ar label 95e9ffffffSBrian Somershas not been specified, it defaults to 96e9ffffffSBrian Somers.Ar provider . 97e9ffffffSBrian SomersIt is possible to specify another command using the 98dbc7ba8dSBrian Somers.Ar exec 99e9ffffffSBrian Somersargument. 100e9ffffffSBrian SomersThis is mandatory if 101dbc7ba8dSBrian Somers.Ar provider 102e9ffffffSBrian Somersand 103e9ffffffSBrian Somers.Ar label 104e9ffffffSBrian Somersare not given. 105e9ffffffSBrian SomersThe child process will have standard input and standard output 106dbc7ba8dSBrian Somersattached to the same 107dbc7ba8dSBrian Somers.Xr netgraph 4 108dbc7ba8dSBrian Somersdata socket 109c4d9468eSRuslan Ermilov(see 110c4d9468eSRuslan Ermilov.Xr ng_socket 4 ) 111dbc7ba8dSBrian Somerswhen started. 112dbc7ba8dSBrian Somers.Pp 1137f77b559SBrian SomersThe environment variables 114aa54a2e8SRuslan Ermilov.Ev HISMACADDR 1157f77b559SBrian Somersand 1167f77b559SBrian Somers.Ev ACNAME 1177f77b559SBrian Somersare made available to the child process and are set to the MAC address of 1187f77b559SBrian Somersthe peer and the name of the AC respectively. 11910ecab16SBrian Somers.Pp 120dbc7ba8dSBrian SomersUpon invocation, 121dbc7ba8dSBrian Somers.Nm 122dbc7ba8dSBrian Somerswill attach a 123dbc7ba8dSBrian Somers.Dq pppoe 124dbc7ba8dSBrian Somersnetgraph node to the relevant 125dbc7ba8dSBrian Somers.Dq ether 126dbc7ba8dSBrian Somersnode using 127aa54a2e8SRuslan Ermilov.Dq Ar interface Ns \&: 128dbc7ba8dSBrian Somersas the node name, and then connect that 129dbc7ba8dSBrian Somers.Dq pppoe 130dbc7ba8dSBrian Somersnode to a local 131dbc7ba8dSBrian Somers.Dq socket 132e9ffffffSBrian Somersnode. 133e9ffffffSBrian SomersIf the 134dbc7ba8dSBrian Somers.Fl F 135aa54a2e8SRuslan Ermilovoption has not been given, 136dbc7ba8dSBrian Somers.Nm 137dbc7ba8dSBrian Somerswill then go into the background and disassociate itself from the controlling 138e9ffffffSBrian Somersterminal. 139e9ffffffSBrian SomersWhen the 140dbc7ba8dSBrian Somers.Fl F 141aa54a2e8SRuslan Ermilovoption is given, 142dbc7ba8dSBrian Somers.Nm 143dbc7ba8dSBrian Somersstays in the foreground. 144dbc7ba8dSBrian Somers.Pp 145dbc7ba8dSBrian SomersIf the 146dbc7ba8dSBrian Somers.Fl d 147aa54a2e8SRuslan Ermilovoption is given, additional diagnostics are provided (see the 148dbc7ba8dSBrian Somers.Sx DIAGNOSTICS 149dbc7ba8dSBrian Somerssection below). 150fd845ee4SBrian SomersIf the 151fd845ee4SBrian Somers.Fl n 152aa54a2e8SRuslan Ermilovoption is given, 153fd845ee4SBrian Somers.Fn NgSetDebug 154fd845ee4SBrian Somersis called with an argument of 155fd845ee4SBrian Somers.Ar ngdebug . 15697cba131SBrian Somers.Pp 15797cba131SBrian SomersIf 15897cba131SBrian Somers.Ar pidfile 15997cba131SBrian Somersis given, 16097cba131SBrian Somers.Nm 16197cba131SBrian Somerswill write its process ID to this file on startup. 162dbc7ba8dSBrian Somers.Sh DIAGNOSTICS 163dbc7ba8dSBrian SomersAfter creating the necessary 164dbc7ba8dSBrian Somers.Xr netgraph 4 165dbc7ba8dSBrian Somersnodes as described above, 166dbc7ba8dSBrian Somers.Nm 167dbc7ba8dSBrian Somersuses 168dbc7ba8dSBrian Somers.Xr syslogd 8 169e9ffffffSBrian Somersto report all incoming connections. 170e9ffffffSBrian SomersIf the 171dbc7ba8dSBrian Somers.Fl d 172aa54a2e8SRuslan Ermilovoption is given, 173dbc7ba8dSBrian Somers.Nm 17436a142c4SRuslan Ermilovwill report on the child processes creation of a new netgraph socket, its 175dbc7ba8dSBrian Somersservice offer and the invocation of the 176aa54a2e8SRuslan Ermilov.Xr ppp 8 177dbc7ba8dSBrian Somersprogram. 178fd845ee4SBrian SomersIf the 179fd845ee4SBrian Somers.Fl n 180fd845ee4SBrian Somersoption is given, netgraph diagnostic messages are also redirected to 181fd845ee4SBrian Somers.Xr syslogd 8 . 182dbc7ba8dSBrian Somers.Pp 183dbc7ba8dSBrian SomersIt is sometimes useful to add the following to 184dbc7ba8dSBrian Somers.Pa /etc/syslog.conf : 185aa54a2e8SRuslan Ermilov.Bd -literal -offset indent 186aa54a2e8SRuslan Ermilov!pppoed 187aa54a2e8SRuslan Ermilov*.* /var/log/pppoed.log 188aa54a2e8SRuslan Ermilov.Ed 189dbc7ba8dSBrian Somers.Pp 190dbc7ba8dSBrian Somersand the following to 191dbc7ba8dSBrian Somers.Pa /etc/newsyslog.conf : 192dbc7ba8dSBrian Somers.Pp 193aa54a2e8SRuslan Ermilov.Dl "/var/log/pppoed.log 640 3 100 * Z" 194dbc7ba8dSBrian Somers.Sh SEE ALSO 195fd845ee4SBrian Somers.Xr NgSetDebug 3 , 196dbc7ba8dSBrian Somers.Xr netgraph 4 , 197fe11f6f6SMaxim Sobolev.Xr ng_ether 4 , 198fe11f6f6SMaxim Sobolev.Xr ng_pppoe 4 , 199fe11f6f6SMaxim Sobolev.Xr ng_socket 4 , 200d7075b33SRuslan Ermilov.Xr syslog.conf 5 , 201dbc7ba8dSBrian Somers.Xr ppp 8 , 202dbc7ba8dSBrian Somers.Xr syslogd 8 203a3ac07a5SRuslan Ermilov.Sh HISTORY 204a3ac07a5SRuslan ErmilovThe 205a3ac07a5SRuslan Ermilov.Nm 206a3ac07a5SRuslan Ermilovutility was written by 207*01c2b8acSBaptiste Daroussin.An Brian Somers Aq Mt brian@Awfulhak.org 208a3ac07a5SRuslan Ermilovand first appeared in 209a3ac07a5SRuslan Ermilov.Fx 3.4 . 210dbc7ba8dSBrian Somers.Sh BUGS 211dbc7ba8dSBrian SomersIf another netgraph node is using the given interface, 212dbc7ba8dSBrian Somers.Nm 213e9ffffffSBrian Somerswill fail to start. 214e9ffffffSBrian SomersThis is because 215dbc7ba8dSBrian Somers.Xr netgraph 4 216e9ffffffSBrian Somersdoes not currently allow node chaining. 217e9ffffffSBrian SomersThis may change in the future. 218