New sentence, new line; use \*[Gt] instead of > for HTML output;

bump date for latest major change.
This commit is contained in:
wiz 2003-04-19 10:56:51 +00:00
parent 57fde84a63
commit a41d0875b7

View File

@ -1,4 +1,4 @@
.\" $NetBSD: pppoe.4,v 1.20 2003/04/19 10:08:40 martin Exp $
.\" $NetBSD: pppoe.4,v 1.21 2003/04/19 10:56:51 wiz Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 1, 2002
.Dd February 11, 2003
.Dt PPPOE 4
.Os
.Sh NAME
@ -51,11 +51,12 @@ packets inside Ethernet frames as defined by
.Li RFC2516 .
.Pp
This is often used to connect a router via a DSL modem to
an access concentrator. The
an access concentrator.
The
.Nm
interface does not by itself transmit or receive frames,
but needs an Ethernet interface to do so. This Ethernet interface
is connected to the
but needs an Ethernet interface to do so.
This Ethernet interface is connected to the
.Nm
interface via
.Xr pppoectl 8 .
@ -64,11 +65,14 @@ IP address.
.Pp
There are two basic modes of operation, controlled via the
.Em link1
switch. The default mode,
switch.
The default mode,
.Em link1
not being set, tries to keep the configured session open all the
time. If the session is disconnected, a new connection attempt is started
immediately. The
time.
If the session is disconnected, a new connection attempt is started
immediately.
The
.Dq dial on demand
mode, selected by setting
.Em link1 ,
@ -76,19 +80,19 @@ only establishes a connection when data is being sent to the interface.
.Pp
Before a
.Nm
interface is usable, it needs to be configured. The following steps
are necessary:
interface is usable, it needs to be configured.
The following steps are necessary:
.Bl -bullet
.It
Create the interface.
.It
Connect an Ethernet interface.
This interface is used for the physical communication. As noted above it
must be marked UP, but need not have an IP address.
This interface is used for the physical communication.
As noted above it must be marked UP, but need not have an IP address.
.It
Configure authentication.
The PPP session needs to identify the client to the peer. For more details
on the available options see
The PPP session needs to identify the client to the peer.
For more details on the available options see
.Xr pppoectl 8 .
.El
.Pp
@ -121,7 +125,8 @@ connected to the Internet.)
Unfortunately this sysctl does not fix the MSS advertised by hosts in
the network behind a
.Nm
connected router. To fix this you need
connected router.
To fix this you need
.Em MSS-clamping ,
explained below.
.Ss Setting up NAT with MSS-clamping
@ -153,19 +158,19 @@ router, you need to set the
options in your NAT rules, like in this example of
.Pa /etc/ipnat.conf :
.Bd -literal -offset indent
map pppoe0 192.168.1.0/24 -> 0/32 portmap tcp/udp 44000:49999 mssclamp 1440
map pppoe0 192.168.1.0/24 -> 0/32 mssclamp 1440
map pppoe0 192.168.1.0/24 -\*[Gt] 0/32 portmap tcp/udp 44000:49999 mssclamp 1440
map pppoe0 192.168.1.0/24 -\*[Gt] 0/32 mssclamp 1440
.Ed
.Pp
If you do not use NAT, you need to setup a 1:1 NAT rule, just to
get the clamping:
.Bd -literal -offset indent
map pppoe0 x.x.x.x/24 -> 0/0 mssclamp 1440
map pppoe0 x.x.x.x/24 -\*[Gt] 0/0 mssclamp 1440
.Ed
.Pp
The above examples assume a MTU of 1492 bytes. If the MTU on your PPPoE
connection is smaller use the MTU \- 52 bytes for clamping e.g. 1408 bytes
for a MTU of 1460 bytes.
The above examples assume a MTU of 1492 bytes.
If the MTU on your PPPoE connection is smaller use the MTU \- 52 bytes for
clamping e.g. 1408 bytes for a MTU of 1460 bytes.
.Em Note :
The theoretically correct value for the above example would be 1452 bytes
(it accounts for the smaller PPPoE MTU, the TCP header and the maximum of
@ -189,19 +194,22 @@ The commented out call to
.Xr route 8
may be omitted and the route added in the ip-up script called by
.Xr ifwatchd 8
when the real IP address is known. This is easy in the
when the real IP address is known.
This is easy in the
.Dq connect always
mode (link1 not set), but hard to accomplish in the
.Dq dial on demand
mode (link1 set). In the latter case adding an iface route is an easy
workaround.
mode (link1 set).
In the latter case adding an iface route is an easy workaround.
.Pp
The
.Nm
interfaces operate completely inside the kernel, without any userland
support. Because of this, a special daemon is used to fire ip-up or
support.
Because of this, a special daemon is used to fire ip-up or
down scripts to execute arbitrary code when the PPP session is established
and addresses of the interface become available. To enable the usage of
and addresses of the interface become available.
To enable the usage of
.Pa /etc/ppp/ip-up
and
.Pa /etc/ppp/ip-down
@ -217,30 +225,34 @@ See
for details and parameters passed to these scripts.
.Pp
Since this is a PPP interface, the addresses assigned to the interface
may change during PPP negotiation. There is no fine grained control available
for deciding which addresses are acceptable and which are not. For the local
side and the
may change during PPP negotiation.
There is no fine grained control available
for deciding which addresses are acceptable and which are not.
For the local side and the
remote address there is exactly one choice: hard coded address or wildcard.
If a real address is assigned to one side of the connection, PPP negotiation
will only agree to exactly this address. If one side is wildcarded, every
address suggested by the peer will be accepted.
will only agree to exactly this address.
If one side is wildcarded, every address suggested by the peer will
be accepted.
.Pp
To wildcard the local address set it to 0.0.0.0, to wildcard the remote
address set it to 0.0.0.1. Wildcarding is not available (nor necessary)
for IPv6 operation.
address set it to 0.0.0.1.
Wildcarding is not available (nor necessary) for IPv6 operation.
.Sh OPTIONS
A
.Nm
enabled kernel will not interfere with other
.Nm PPPoE
implementations running on the same machine. Under special circumstances
implementations running on the same machine.
Under special circumstances
(details below) this is not desirable, so the
.Nm
driver can be told to kill all unknown
.Nm PPPoE
sessions received by the ethernet interface used for a configured
.Nm
interface. To do this, add
interface.
To do this, add
.Pp
.Nm options
.Ar PPPOE_TERM_UNKNOWN_SESSIONS
@ -252,15 +264,16 @@ Note that this will break all userland
implementations using the same ethernet interface!
.Pp
This option is only useful if you have a static IP address assigned and
your ISP does not use LCP echo requests to monitor the link status. After
a crash or power failure the peer device still tries to send data to the no
longer active session on your computer, and might refuse to reestablish a
new connection, because there already is an open session. On receipt of such
packets the
your ISP does not use LCP echo requests to monitor the link status.
After a crash or power failure the peer device still tries to send data to
the no longer active session on your computer, and might refuse to
reestablish a new connection, because there already is an open session.
On receipt of such packets the
.Nm
driver with this option set will send a
.Nm PADT
packet (request to terminate the session). The peer will immediately disconnect
packet (request to terminate the session).
The peer will immediately disconnect
the orphaned session and allow a new one to be established.
.Sh SEE ALSO
.Xr ifwatchd 8 ,