SPPP(4)
πΈ sppp(4) β PPP and Link Control Protocol πΈ
okay so this is sppp(4), a page from the Kernel Interfaces Manual, and honestly? she's a whole vibe. buckle up bestie π
β¨ SYNOPSIS β¨
pseudo-device sppp [count]
π DESCRIPTION π
okay so the sppp network layer is the girlboss that implements the state machine and the Link Control Protocol (LCP) of the Point-to-Point Protocol (PPP), exactly as described in RFC 1661. iconic behavior.
big important thing though: this layer does not provide network interfaces of its own. like, she's not building her own house, she's moving in on top of drivers that provide a point-to-point connection and want to run a PPP stack over it. the actual network interfaces have to be provided by those hardware drivers. iykyk π«Ά
sppp serves up three basic modes of operation:
- default mode (no special flags set) β creates the PPP connection (that's the administrative Open event to the LCP layer) as soon as the interface is taken up with the
ifconfig(8)command. taking the interface down again terminates the LCP layer and therefore every other layer on top of it. the link also terminates itself as soon as no Network Control Protocol (NCP) is open anymore, which is basically the signal that the lower layers aren't needed anymore. slay, clean exit. link0(set withifconfig(8)) β puts the respective network interface into passive mode. this means the administrative Open event to the LCP layer gets delayed until the lower layers signal an Up event (the rise of "carrier"). this is the move for lower layers supporting a dial-in connection where the physical layer isn't available immediately at startup, but only after some external event arrives. and here's the cute part: receipt of a Down event from the lower layer will not take the interface completely down in this case.link1β dial-on-demand mode. this is also only useful if the lower layers support the notion of a carrier (like with an ISDN line). upon configuring the respective interface, it delays the administrative Open event to the LCP layer until either an outbound network packet arrives, or until the lower layers signal an Up event, indicating an inbound connection. as with passive mode, receipt of a Down event (loss of carrier) will not automatically take the interface down, so she stays available for further connections. main character energy, honestly.
the sppp layer also supports the debug interface flag, which you can set with ifconfig(8). if this flag is set, the various control protocol packets being exchanged plus the option negotiation between both ends of the link get logged at level LOG_DEBUG. this is genuinely so helpful for examining configuration problems during your first attempts to set up a new configuration. and without this flag being set, only the major phase transitions get logged, at level LOG_INFO. no cap, turn it on when you're debugging.
okay so you can leave the local interface IP address open for negotiation by setting it to 0.0.0.0. but this requires that the remote peer can correctly supply a value for it based on the identity of the caller, or on the remote address supplied by this side. and because of the way the IPCP option negotiation works, this address is supplied late during the negotiation, which could cause the remote peer to make false assumptions. β οΈ so like, know what you're doing.
in a similar spirit, the remote address can be set to a magical value in the range 0.0.0.1 to 0.0.0.255, which means we don't care what address the remote side will use, as long as it is not 0.0.0.0. this is so useful if your ISP has several dial-in servers. and you can of course route add something or other 0.0.0.1 and it will do exactly what you would want it to. π
once a connection is established, the device sends out a nameserver proposal, which resolvd(8) can act on. and if during IPCP negotiation no DNS server options were exchanged, the nameserver proposal will be empty. sad but true π₯²
also!! the PAP and CHAP authentication protocols, as described in RFCs 1334 and 1994 respectively, are implemented too. their parameters are controlled by the ifconfig(8) utility.
π EXAMPLES π
displaying the settings for pppoe0
so the interface is currently in the establish phase and is trying to connect to the remote peer. other possible PPP phases are dead, authenticate, network, or terminate. both ends of the connection use the CHAP protocol, the local client tells the remote peer the system name 'uriah', and the peer is expected to authenticate by the name 'ifb-gw'. once the initial CHAP handshake has been successful, no further CHAP challenges will be transmitted. there are supposedly some known CHAP secrets for both ends of the link which are not displayed. π
$ ifconfig pppoe0
pppoe0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1492
dev: em0 state: PADI sent
sid: 0x0 PADI retries: 0 PADR retries: 0
sppp: phase establish authproto chap authname "uriah" \
peerproto chap peername "ifb-gw" norechallenge
groups: pppoe
inet 0.0.0.0 --> 0.0.0.1 netmask 0xffffffff
the call that got us there
a possible call to ifconfig(8) that could have been used to bring the interface into the state shown by the previous example:
# ifconfig em0 up
# ifconfig pppoe0 0.0.0.0 0.0.0.1 netmask 0xffffffff \
pppoedev em0 \
authproto chap authname uriah authkey "some secret" \
peerproto chap peername "ifb-gw" peerkey "another" \
peerflag norechallenge \
up
π₯ DIAGNOSTICS π₯
<ifname><ifnum>: <proto> illegal <event> in state <statename>β an event happened that should not happen for the current state the respective control protocol is in. see RFC 1661 for a description of the state automaton.<ifname><ifnum>: loopbackβ the state automaton detected a line loopback (that is, it was talking with itself π). the interface will be temporarily disabled.<ifname><ifnum>: upβ the LCP layer is running again, after a line loopback had previously been detected.<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.
π¦ SEE ALSO π¦
inet(4), pppoe(4), ifconfig(8)
β STANDARDS β
- G. McGregor, The PPP Internet Protocol Control Protocol (IPCP), RFC 1332, May 1992.
- B. Lloyd and W. Simpson, PPP Authentication Protocols, RFC 1334, October 1992.
- W. Simpson, The Point-to-Point Protocol (PPP), RFC 1661, July 1994.
- S. Cobb, PPP Internet Protocol Control Protocol Extensions for Name Server Addresses, RFC 1877, December 1995.
- W. Simpson, PPP Challenge Handshake Authentication Protocol (CHAP), RFC 1994, August 1996.
- S. Varada, D. Haskins, and E. Allen, IP Version 6 over PPP, RFC 5072, September 2007.
π AUTHORS π
the original implementation of sppp was written in 1994 at Cronyx Ltd., Moscow, by Serge Vakulenko <vak@cronyx.ru>. Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> rewrote a large part in 1997 in order to fully implement the state machine as described in RFC 1661, so it could also be used for dialup lines β he also wrote the initial version of this man page. Serge later on wrote a basic implementation for PAP and CHAP, which served as the base for the current implementation, done again by Joerg Wunsch. collaborative queens π«Ά
Reyk Floeter implemented sppp support for ifconfig(8) in OpenBSD 4.0 in order to remove the original 'spppcontrol' utility, which was previously used to configure and display the sppp settings.
π BUGS π
Many. π
- negotiation loop avoidance is not fully implemented. if the negotiation doesn't converge, this can cause an endless loop.
- the various parameters that should be adjustable per RFC 1661 are currently hard-coded into the kernel, and should be made accessible through
ifconfig(8). - passive mode has not been tested extensively. π
- more NCPs should be implemented, as well as other control protocols for authentication and link quality reporting.
- IPCP should support VJ header compression.
- link-level compression protocols should be supported.
okay that's the whole page, bestie π this one's from Debian, dated March 23, 2023, and it's the SPPP(4) page β go forth and negotiate responsibly β¨ππ¦
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 1997 Joerg Wunsch
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms