summaryrefslogtreecommitdiff
path: root/man/pppoe.8 (plain)
blob: 6ef60c6f121a2a2f8633e09b969633b90acc12b9
1.\" LIC: GPL
2.TH PPPOE 8 "3 July 2000"
3.UC 4
4.SH NAME
5pppoe \- user-space PPPoE client.
6.SH SYNOPSIS
7.B pppd pty 'pppoe \fR[\fIpppoe_options\fR]\fB' \fR[\fIpppd_options\fR]
8.P
9.B pppoe -A \fR[\fIpppoe_options\fR]
10.SH DESCRIPTION
11\fBpppoe\fR is a user-space client for PPPoE (Point-to-Point Protocol
12over Ethernet) for Linux and other UNIX systems. \fBpppoe\fR works in
13concert with the \fBpppd\fR PPP daemon to provide a PPP connection
14over Ethernet, as is used by many DSL service providers.
15
16.SH OPTIONS
17.TP
18.B \-I \fIinterface\fR
19The \fB\-I\fR option specifies the Ethernet interface to use. Under Linux,
20it is typically \fIeth0\fR or \fIeth1\fR. The interface should be "up"
21before you start \fBpppoe\fR, but should \fInot\fR be configured to have
22an IP address.
23
24.TP
25.B \-T \fItimeout\fR
26The \fB\-T\fR option causes \fBpppoe\fR to exit if no session traffic
27is detected for \fItimeout\fR seconds. I recommend that you use this
28option as an extra safety measure, but if you do, you should make sure
29that PPP generates enough traffic so the timeout will normally not be
30triggered. The best way to do this is to use the
31\fIlcp-echo-interval\fR option to \fBpppd\fR. You should set the
32PPPoE timeout to be about four times the LCP echo interval.
33
34.TP
35.B \-D \fIfile_name\fR
36The \fB\-D\fR option causes every packet to be dumped to the specified
37\fIfile_name\fR. This is intended for debugging only; it produces huge
38amounts of output and greatly reduces performance.
39
40.TP
41.B \-V
42The \fB\-V\fR option causes \fBpppoe\fR to print its version number and
43exit.
44
45.TP
46.B \-A
47The \fB\-A\fR option causes \fBpppoe\fR to send a PADI packet and then print
48the names of access concentrators in each PADO packet it receives. Do not
49use this option in conjunction with \fBpppd\fR; the \fB\-A\fR option is
50meant to be used interactively to give interesting information about the
51access concentrator.
52
53.TP
54.B \-S \fIservice_name\fR
55Specifies the desired service name. \fBpppoe\fR will only initiate sessions
56with access concentrators which can provide the specified service. In
57most cases, you should \fInot\fR specify this option. Use it only if you
58know that there are multiple access concentrators or know that you need a
59specific service name.
60
61.TP
62.B \-C \fIac_name\fR
63Specifies the desired access concentrator name. \fBpppoe\fR will only
64initiate sessions with the specified access concentrator. In
65most cases, you should \fInot\fR specify this option. Use it only if you
66know that there are multiple access concentrators. If both the
67\fB\-S\fR and \fB\-C\fR options are specified, they must \fIboth\fR match
68for \fBpppoe\fR to initiate a session.
69
70.TP
71.B \-U
72Causes \fBpppoe\fR to use the Host-Uniq tag in its discovery packets. This
73lets you run multiple \fBpppoe\fR daemons without having their discovery
74packets interfere with one another. You must supply this option to
75\fIall\fR \fBpppoe\fR daemons if you intend to run multiple daemons
76simultaneously.
77
78.TP
79.B \-s
80Causes \fBpppoe\fR to use \fIsynchronous\fR PPP encapsulation. If you
81use this option, then you \fImust\fR use the \fBsync\fR option with
82\fBpppd\fR. You are encouraged to use this option if it works, because
83it greatly reduces the CPU overhead of \fBpppoe\fR. However, it
84MAY be unreliable on slow machines -- there is a race condition between
85pppd writing data and pppoe reading it. For this reason, the default
86setting is asynchronous. If you encounter bugs or crashes with Synchronous
87PPP, turn it off -- don't e-mail me for support!
88
89.TP
90.B \-m \fIMSS\fR
91Causes \fBpppoe\fR to \fIclamp\fR the TCP maximum segment size at the specified
92value. Because of PPPoE overhead, the maximum segment size for PPPoE is
93smaller than for normal Ethernet encapsulation. This could cause problems
94for machines on a LAN behind a gateway using PPPoE. If you have a LAN
95behind a gateway, and the gateway connects to the Internet using PPPoE,
96you are strongly recommended to use a \fB\-m 1412\fR option. This avoids
97having to set the MTU on all the hosts on the LAN.
98
99.TP
100.B \-p \fIfile\fR
101Causes \fBpppoe\fR to write its process-ID to the specified file. This
102can be used to locate and kill \fBpppoe\fR processes.
103
104.TP
105.B \-e \fIsess:mac\fR
106Causes \fBpppoe\fR to skip the discovery phase and move directly to the
107session phase. The session is given by \fIsess\fR and the MAC address of
108the peer by \fImac\fR. This mode is \fInot\fR meant for normal use; it
109is designed only for \fBpppoe-server\fR(8).
110
111.TP
112.B \-n
113Causes \fBpppoe\fR not to open a discovery socket. This mode is
114\fInot\fR meant for normal use; it is designed only for
115\fBpppoe-server\fR(8).
116
117.TP
118.B \-k
119Causes \fBpppoe\fR to terminate an existing session by sending a PADT frame,
120and then exit. You must use the \fB\-e\fR option in conjunction with this
121option to specify the session to kill. This may be useful for killing
122sessions when a buggy peer does not realize the session has ended.
123
124.TP
125.B \-d
126Causes \fBpppoe\fR to perform discovery and then exit, after printing
127session information to standard output. The session information is printed
128in exactly the format expected by the \fB\-e\fR option. This option lets
129you initiate a PPPoE discovery, perform some other work, and then start
130the actual PPP session. \fIBe careful\fR; if you use this option in a loop,
131you can create many sessions, which may annoy your peer.
132
133.TP
134.B \-f disc:sess
135The \fB\-f\fR option sets the Ethernet frame types for PPPoE discovery
136and session frames. The types are specified as hexadecimal numbers
137separated by a colon. Standard PPPoE uses frame types 8863:8864.
138\fIYou should not use this option\fR unless you are absolutely sure
139the peer you are dealing with uses non-standard frame types. If your
140ISP uses non-standard frame types, complain!
141
142.TP
143.B \-h
144The \fB\-h\fR option causes \fBpppoe\fR to print usage information and
145exit.
146
147.SH PPPOE BACKGROUND
148
149PPPoE (Point-to-Point Protocol over Ethernet) is described in RFC 2516
150and is a protocol which allows the session abstraction to be maintained
151over bridged Ethernet networks.
152
153PPPoE works by encapsulating PPP frames in Ethernet frames. The protocol
154has two distinct stages: The \fIdiscovery\fR and the \fIsession\fR stage.
155
156In the discovery stage, the host broadcasts a special PADI (PPPoE
157Active Discovery Initiation) frame to discover any \fIaccess
158concentrators\fR. The access concentrators (typically, only one
159access concentrator) reply with PADO (PPPoE Active Discovery Offer)
160packets, announcing their presence and the services they offer. The
161host picks one of the access concentrators and transmits a PADR (PPPoE
162Active Discovery Request) packet, asking for a session. The access
163concentrator replies with a PADS (PPPoE Active Discovery
164Session-Confirmation) packet. The protocol then moves to the session stage.
165
166In the session stage, the host and access concentrator exchange PPP frames
167embedded in Ethernet frames. The normal Ethernet MTU is 1500 bytes, but
168the PPPoE overhead plus two bytes of overhead for the encapsulated PPP
169frame mean that the MTU of the PPP interface is at most 1492 bytes.
170This causes \fIall kinds of problems\fR if you are using a Linux machine
171as a firewall and interfaces behind the firewall have an MTU greater than
1721492. In fact, to be safe, I recommend setting the MTU of machines
173behind the firewall to 1412, to allow for worst-case TCP and IP options
174in their respective headers.
175
176Normally, PPP uses the Link Control Protocol (LCP) to shut down a PPP
177link. However, the PPPoE specification allows the link to be shut down
178with a special PADT (PPPoE Active Discovery Terminate) packet. This client
179recognizes this packet and will correctly terminate if a terminate request
180is received for the PPP session.
181
182.SH DESIGN GOALS
183
184My design goals for this PPPoE client were as follows, in descending order
185of importance:
186
187.TP
188.B o
189It must work.
190
191.TP
192.B o
193It must be a user-space program and not a kernel patch.
194
195.TP
196.B o
197The code must be easy to read and maintain.
198
199.TP
200.B o
201It must be fully compliant with RFC 2516, the proposed PPPoE standard.
202
203.TP
204.B o
205It must never hang up forever -- if the connection is broken, it must
206detect this and exit, allowing a wrapper script to restart the connection.
207
208.TP
209.B o
210It must be fairly efficient.
211
212.P
213I believe I have achieved all of these goals, but (of course) am open
214to suggestions, patches and ideas. See my home page,
215http://www.roaringpenguin.com, for contact information.
216
217.SH NOTES
218
219For best results, you must give \fBpppd\fR an mtu option of
2201492. I have observed problems with excessively-large frames
221unless I set this option. Also, if \fBpppoe\fR is running on a firewall
222machine, all machines behind the firewall should have MTU's of 1412.
223
224If you have problems, check your system logs. \fBpppoe\fR logs interesting
225things to syslog. You may have to turn on logging of \fIdebug\fR-level
226messages for complete diagnosis.
227
228.SH AUTHORS
229\fBpppoe\fR was written by David F. Skoll <dfs@roaringpenguin.com>,
230with much inspiration from an earlier version by Luke Stras.
231
232The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
233
234.SH SEE ALSO
235pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8)
236
237