PPPOE(4) BSD Programmer's Manual PPPOE(4)
pppoe - PPP over Ethernet protocol network interface
The pppoe interface encapsulates Point-to-Point Protocol (PPP) packets inside Ethernet frames as defined by RFC 2516. This is often used to connect a router via a DSL modem to an access con- centrator. The pppoe interface does not by itself transmit or receive frames, but needs an Ethernet interface to do so. This Ethernet interface is connected to the pppoe interface via ifconfig(8). The Ethernet inter- face needs to be marked UP, but does not need to have an IP address. There are two basic modes of operation, controlled via the link1 switch. The default mode, link1 not being set, tries to keep the configured ses- sion open all the time. If the session is disconnected, a new connection attempt is started immediately. The "dial on demand" mode, selected by setting link1, only establishes a connection when data is being sent to the interface. If the kernel is compiled with option PPPOE_SERVER, there are two modes of connection, controlled via the link0 switch. The default mode, link0 not being set, is client mode. The "PPPoE server" mode, selected by set- ting link0, is to wait for incoming PPPoE session. This option is not set in the GENERIC kernel and discouraged because it does not offer authenti- cation. Before a pppoe interface is usable, it needs to be configured. The fol- lowing steps are necessary: • Create the interface. • Connect an Ethernet interface. This interface is used for the physi- cal communication. As noted above it must be marked UP, but need not have an IP address. • Configure authentication. The PPP session needs to identify the client to the peer. For more details on the available options see spppcontrol(8). This all is typically accomplished using an /etc/hostname.pppoe0 file.
A typical /etc/hostname.pppoe0 file looks like this: pppoedev ne0 !/sbin/ifconfig ne0 up !/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=testcaller \ myauthkey=donttell #!/usr/sbin/ifwatchd -d /etc/ppp/ip-down -u /etc/ppp/ip-up \$if !/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xFFFFFFFF !/sbin/route -n add -inet default 0.0.0.1 -mtu 1454 up link2 Attention regarding the link2 option given; please read about it under OPTIONS below before using (it is only included as the majority of users probably does want to use this flag). Using ifwatchd(8) may not work correctly, so it's commented out in the example now. 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 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 ad- dress. If one side is wildcarded, every address suggested by the peer will be accepted. To wildcard the local address set it to 0.0.0.0, to wildcard the remote address set it to 0.0.0.1.
A pppoe enabled kernel will not interfere with other PPPoE implementa- tions running on the same machine. Under special circumstances (details below) this is not desirable, so the pppoe driver can be told to kill all unknown PPPoE sessions received by the Ethernet interface used for a con- figured pppoe interface. To do this, set the link2 flag on any interface. Note that this will break all userland PPPoE implementations using the same Ethernet interface! But if this Kernel PPPoE is the only implementa- tion used, it is a useful device in case you accidentally destroy an in- terface while a session is open; in the case of German NetDSL it can reduce downtimes from 5 to 10 minutes down to half a minute or less. 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 reestab- lish a new connection, because there already is an open session. On re- ceipt of such packets, the pppoe driver with this option set will send a PADT packet (request to terminate the session). The peer will immediately disconnect the orphaned session and allow a new one to be established.
hostname.if(5), ifconfig(8), ifwatchd(8), ppp(8), pppoe(8), spppcontrol(8) A Method for Transmitting PPP Over Ethernet (PPPoE), RFC 2516, February 1999. http://www.mynetwatchman.com/kb/adsl/pppoemtu.htm has got an explanation how PPPoE is further encapsulated on the way to your ISP and why 1454 is the optimum MTU for native IPv4 and native IPv6 connections. Tunneled IPv6 connections using gif(4) tunnels have an optimum MTU of 1434, the difference is just the size of an IPv4 header for the simple encapsula- tion.
The pppoe device appeared in NetBSD 1.6 and was ported via OpenBSD 3.7 to MirOS #8.
This implementation is client side only. It is important to specify "netmask 0xFFFFFFFF" to ifconfig(8). If the netmask is unspecified, it will be set to 8 when 0.0.0.0 is configured to the interface, and it will persist after negotiation. MirOS BSD #10-current March 26, 2011 1
Generated on 2016-02-08 23:56:27 by $MirOS: src/scripts/roff2htm,v 1.82 2016/01/02 20:05:08 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002–2016 The MirOS Project, Germany.
This product includes material provided by mirabilos.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.