1997-05-19 22:04:40 +00:00
|
|
|
.\"
|
2001-12-27 16:49:54 +00:00
|
|
|
.\" Copyright (c) 1997, 2001 Joerg Wunsch
|
1997-05-19 22:04:40 +00:00
|
|
|
.\"
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1997-05-19 22:04:40 +00:00
|
|
|
.\"
|
2001-12-30 16:40:48 +00:00
|
|
|
.Dd December 30, 2001
|
1997-05-19 22:04:40 +00:00
|
|
|
.Dt SPPP 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm sppp
|
1998-06-08 06:12:02 +00:00
|
|
|
.Nd point to point protocol network layer for synchronous lines
|
1997-05-19 22:04:40 +00:00
|
|
|
.Sh SYNOPSIS
|
2001-05-01 09:15:30 +00:00
|
|
|
.Cd "device sppp"
|
1997-05-19 22:04:40 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
network layer implements the state machine and the Link Control
|
|
|
|
Protocol (LCP) of the
|
|
|
|
.Em point to point protocol (PPP)
|
2004-07-03 18:29:24 +00:00
|
|
|
as described in RFC 1661.
|
|
|
|
Note that this layer does not provide
|
1997-05-19 22:04:40 +00:00
|
|
|
network interfaces of its own, it is rather intended to be layered on
|
2002-01-21 12:09:13 +00:00
|
|
|
top of drivers providing a synchronous point-to-point connection that
|
2004-07-03 18:29:24 +00:00
|
|
|
wish to run a PPP stack over it.
|
|
|
|
The corresponding network interfaces
|
1997-05-19 22:04:40 +00:00
|
|
|
have to be provided by these hardware drivers.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
2004-07-03 18:29:24 +00:00
|
|
|
layer provides three basic modes of operation.
|
|
|
|
The default mode,
|
1997-05-19 22:04:40 +00:00
|
|
|
with no special flags to be set, is to create the PPP connection
|
|
|
|
(administrative
|
|
|
|
.Em Open
|
|
|
|
event to the LCP layer) as soon as the interface is taken up with the
|
|
|
|
.Xr ifconfig 8
|
2004-07-03 18:29:24 +00:00
|
|
|
command.
|
|
|
|
Taking the interface down again will terminate the LCP layer
|
|
|
|
and thus all other layers on top.
|
|
|
|
The link will also terminate itself as
|
1997-05-19 22:04:40 +00:00
|
|
|
soon as no Network Control Protocol (NCP) is open anymore, indicating
|
|
|
|
that the lower layers are no longer needed.
|
|
|
|
.Pp
|
|
|
|
Setting the link-level flag
|
|
|
|
.Em link0
|
|
|
|
with
|
|
|
|
.Xr ifconfig 8
|
|
|
|
will cause the respective network interface to go into
|
|
|
|
.Em passive
|
2004-07-03 18:29:24 +00:00
|
|
|
mode.
|
|
|
|
This means, the administrative
|
1997-05-19 22:04:40 +00:00
|
|
|
.Em Open
|
|
|
|
event to the LCP layer will be delayed until after the lower layers
|
|
|
|
signals an
|
|
|
|
.Em Up
|
2001-05-01 09:15:30 +00:00
|
|
|
event (rise of
|
1997-05-19 22:04:40 +00:00
|
|
|
.Dq carrier ) .
|
|
|
|
This can be used by lower layers to support
|
|
|
|
a dialin connection where the physical layer isn't available
|
|
|
|
immediately at startup, but only after some external event arrives.
|
|
|
|
Receipt of a
|
|
|
|
.Em Down
|
|
|
|
event from the lower layer will not take the interface completely down
|
|
|
|
in this case.
|
|
|
|
.Pp
|
|
|
|
Finally, setting the flag
|
|
|
|
.Em link1
|
|
|
|
will cause the interface to operate in
|
|
|
|
.Em dial-on-demand
|
2004-07-03 18:29:24 +00:00
|
|
|
mode.
|
|
|
|
This is also only useful if the lower layer supports the notion
|
|
|
|
of a carrier (like with an ISDN line).
|
|
|
|
Upon configuring the
|
1997-05-19 22:04:40 +00:00
|
|
|
respective interface, it will delay the administrative
|
|
|
|
.Em Open
|
|
|
|
event to the LCP layer until either an outbound network packet
|
|
|
|
arrives, or until the lower layer signals an
|
|
|
|
.Em Up
|
2004-07-03 18:29:24 +00:00
|
|
|
event, indicating an inbound connection.
|
|
|
|
As with passive mode, receipt
|
1997-05-19 22:04:40 +00:00
|
|
|
of a
|
|
|
|
.Em Down
|
|
|
|
event (loss of carrier) will not automatically take the interface down,
|
|
|
|
thus it remains available for further connections.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
layer supports the
|
|
|
|
.Em debug
|
|
|
|
interface flag that can be set with
|
|
|
|
.Xr ifconfig 8 .
|
|
|
|
If this flag is set, the various control protocol packets being
|
|
|
|
exchanged as well as the option negotiation between both ends of the
|
|
|
|
link will be logged at level
|
|
|
|
.Dv LOG_DEBUG .
|
|
|
|
This can be helpful to examine configuration problems during the first
|
2004-07-03 18:29:24 +00:00
|
|
|
attempts to set up a new configuration.
|
|
|
|
Without this flag being set,
|
1997-05-19 22:04:40 +00:00
|
|
|
only the major phase transitions will be logged at level
|
|
|
|
.Dv LOG_INFO .
|
|
|
|
.Pp
|
|
|
|
It is possible to leave the local interface IP address open for
|
2004-07-03 18:29:24 +00:00
|
|
|
negotiation by setting it to 0.0.0.0.
|
|
|
|
This requires that the remote
|
1997-05-19 22:04:40 +00:00
|
|
|
peer can correctly supply a value for it based on the identity of the
|
2004-07-03 18:29:24 +00:00
|
|
|
caller, or on the remote address supplied by this side.
|
|
|
|
Due to the
|
1997-05-19 22:04:40 +00:00
|
|
|
way the IPCP option negotiation works, this address is being supplied
|
|
|
|
late during the negotiation, which might cause the remote peer to make
|
|
|
|
wrong assumptions.
|
1997-10-11 11:27:25 +00:00
|
|
|
.Pp
|
1998-02-28 21:01:09 +00:00
|
|
|
In a similar spirit the remote address can be set to the magical
|
2001-12-30 16:40:48 +00:00
|
|
|
value
|
2002-01-10 16:11:12 +00:00
|
|
|
.Li 0.0.0. Ns Em *
|
2001-12-30 16:40:48 +00:00
|
|
|
which means that we don't care what address the remote
|
1998-02-28 21:01:09 +00:00
|
|
|
side will use, as long as it is not 0.0.0.0.
|
|
|
|
This is useful if your ISP has several dial-in
|
2004-07-03 18:29:24 +00:00
|
|
|
servers.
|
|
|
|
You can of course
|
2002-01-10 16:11:12 +00:00
|
|
|
.Nm route Cm add Ar something_or_other 0.0.0. Ns Em *
|
1998-02-28 21:01:09 +00:00
|
|
|
and it will do exactly what you would want it to.
|
|
|
|
.Pp
|
1997-10-11 11:27:25 +00:00
|
|
|
The PAP and CHAP authentication protocols as described in RFC 1334,
|
2004-07-03 18:29:24 +00:00
|
|
|
and RFC 1994 resp., are also implemented.
|
|
|
|
Their parameters are being
|
1997-10-11 11:27:25 +00:00
|
|
|
controlled by the
|
|
|
|
.Xr spppcontrol 8
|
|
|
|
utility.
|
2001-12-27 16:49:54 +00:00
|
|
|
.Pp
|
2004-07-03 18:29:24 +00:00
|
|
|
VJ header compression is implemented, and enabled by default.
|
|
|
|
It can be
|
2001-12-27 16:49:54 +00:00
|
|
|
disabled using
|
|
|
|
.Xr spppcontrol 8 .
|
1997-05-19 22:04:40 +00:00
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
.Bl -diag
|
|
|
|
.It <ifname><ifnum>: <proto> illegal <event> in state <statename>
|
|
|
|
An event happened that should not happen for the current state
|
2004-07-03 18:29:24 +00:00
|
|
|
the respective control protocol is in.
|
|
|
|
See RFC 1661 for a description
|
1997-05-19 22:04:40 +00:00
|
|
|
of the state automaton.
|
|
|
|
.It <ifname><ifnum>: loopback
|
|
|
|
The state automaton detected a line loopback (that is, it was talking
|
2004-07-03 18:29:24 +00:00
|
|
|
with itself).
|
|
|
|
The interface will be temporarily disabled.
|
1997-05-19 22:04:40 +00:00
|
|
|
.It <ifname><ifnum>: up
|
|
|
|
The LCP layer is running again, after a line loopback had previously
|
|
|
|
been detected.
|
|
|
|
.It <ifname><ifnum>: down
|
|
|
|
The keepalive facility detected the line being unresponsive.
|
|
|
|
Keepalive must be explicitly requested by the lower layers in order to
|
|
|
|
take place.
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr inet 4 ,
|
1997-09-29 10:11:02 +00:00
|
|
|
.Xr intro 4 ,
|
1997-05-19 22:04:40 +00:00
|
|
|
.Xr ppp 4 ,
|
1997-10-11 11:27:25 +00:00
|
|
|
.Xr ifconfig 8 ,
|
|
|
|
.Xr spppcontrol 8
|
1997-05-19 22:04:40 +00:00
|
|
|
.Rs
|
|
|
|
.%A W. Simpson, Editor
|
|
|
|
.%T "The Point-to-Point Protocol (PPP)"
|
|
|
|
.%O RFC 1661
|
|
|
|
.Re
|
|
|
|
.Rs
|
|
|
|
.%A G. McGregor
|
|
|
|
.%T "The PPP Internet Protocol Control Protocol (IPCP)"
|
|
|
|
.%O RFC 1332
|
|
|
|
.Re
|
1997-10-11 11:27:25 +00:00
|
|
|
.Rs
|
2000-05-10 09:49:04 +00:00
|
|
|
.%A B. Lloyd
|
|
|
|
.%A W. Simpson
|
1997-10-11 11:27:25 +00:00
|
|
|
.%T "PPP Authentication Protocols"
|
|
|
|
.%O RFC 1334
|
|
|
|
.Re
|
|
|
|
.Rs
|
|
|
|
.%A W. Simpson
|
|
|
|
.%T "PPP Challenge Handshake Authentication Protocol (CHAP)"
|
|
|
|
.%O RFC 1994
|
|
|
|
.Re
|
1997-05-19 22:04:40 +00:00
|
|
|
.Sh AUTHORS
|
2000-11-22 09:35:58 +00:00
|
|
|
.An -nosplit
|
1997-05-19 22:04:40 +00:00
|
|
|
The original implementation of
|
|
|
|
.Nm
|
1998-03-12 07:31:21 +00:00
|
|
|
was written in 1994 at Cronyx Ltd., Moscow by
|
|
|
|
.An Serge Vakulenko Aq vak@cronyx.ru .
|
2000-11-10 17:46:15 +00:00
|
|
|
.An J\(:org Wunsch
|
1998-03-12 07:31:21 +00:00
|
|
|
.Aq joerg_wunsch@uriah.heep.sax.de
|
|
|
|
rewrote a large part in 1997 in order
|
1997-05-19 22:04:40 +00:00
|
|
|
to fully implement the state machine as described in RFC 1661, so it
|
2004-07-03 18:29:24 +00:00
|
|
|
could also be used for dialup lines.
|
|
|
|
He also wrote this man page.
|
1997-10-11 11:27:25 +00:00
|
|
|
Serge later on wrote a basic implementation for PAP and CHAP, which
|
|
|
|
served as the base for the current implementation, done again by
|
2000-11-10 17:46:15 +00:00
|
|
|
.An J\(:org Wunsch .
|
1997-05-19 22:04:40 +00:00
|
|
|
.Sh BUGS
|
|
|
|
Many.
|
|
|
|
.Pp
|
|
|
|
Currently, only the
|
|
|
|
.Em IPCP
|
|
|
|
control protocol and
|
|
|
|
.Xr ip 4
|
|
|
|
network protocol is supported.
|
2001-12-27 16:49:54 +00:00
|
|
|
More NCPs should be implemented, as well as other control protocols
|
|
|
|
for authentication and link quality reporting.
|
1997-05-19 22:04:40 +00:00
|
|
|
.Pp
|
2004-07-03 18:29:24 +00:00
|
|
|
Negotiation loop avoidance is not fully implemented.
|
|
|
|
If the negotiation
|
1997-10-11 11:27:25 +00:00
|
|
|
doesn't converge, this can cause an endless loop.
|
1997-05-19 22:04:40 +00:00
|
|
|
.Pp
|
|
|
|
The various parameters that should be adjustable per RFC 1661 are
|
1997-10-11 11:27:25 +00:00
|
|
|
currently hard-coded into the kernel, and should be made accessible
|
|
|
|
through
|
|
|
|
.Xr spppcontrol 8 .
|
1997-05-19 22:04:40 +00:00
|
|
|
.Pp
|
|
|
|
.Em Passive
|
1997-10-11 11:27:25 +00:00
|
|
|
mode has not been tested extensively.
|
1997-05-19 22:04:40 +00:00
|
|
|
.Pp
|
|
|
|
Link-level compression protocols should be supported.
|