pppoe(4) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
PPPOE(4)                  NetBSD Programmer's Manual                  PPPOE(4)


NAME
pppoe - PPP over Ethernet protocol network interface
SYNOPSIS
pseudo-device pppoe
DESCRIPTION
The pppoe interface encapsulates Point-to-Point Protocol (PPP) packets inside Ethernet frames as defined by RFC2516. 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 inter- face is connected to the pppoe interface via pppoectl(8). The Ethernet interface 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. 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 physical 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 pppoectl(8). This all is typically accomplished using an /etc/ifconfig.pppoe0 file.
IMPORTANT NOTE
If you are using a pppoe interface, you will have an unusual low MTU for todays internet. Combined with a lot of misconfigured sites (host using path MTU discovery behind a router blocking all ICMP traffic) this will often cause problems. Connections to this servers will only work if your system advertises the right MSS in the TCP three way handshake. To get the right MSS, you need to set # Obey interface MTUs when calculating MSS net.inet.tcp.mss_ifmtu=1 in your /etc/sysctl.conf file. This causes the calculated MSS to be based on the MTU of the interface via which the packet is sent. This is always the right value if you are sure the answer to this packet will be received on the same interface (I.e. you only have one interface connect- ed to the internet.) Unfortunately this sysctl does not fix the MSS advertised by hosts in the network behind a pppoe connected router.
EXAMPLES
A typical /etc/ifconfig.pppoe0 file looks like this: create ! /sbin/ifconfig ne0 up ! /sbin/pppoectl -e ne0 $int ! /sbin/pppoectl $int myauthproto=pap myauthname=testcaller myauthsecret=donttell inet 0.0.0.0 0.0.0.1 #! /sbin/route add default -iface 0.0.0.1 up The commented out call to route(8) may be omitted and the route added in the ip-up script called by ifwatchd(8) when the real IP address is known. This is easy in the ``connect always'' mode (link1 not set), but hard to accomplish in the ``dial on demand'' mode (link1 set). In the latter case adding an iface route is an easy workaround. The pppoe interfaces operate completely inside the kernel, without any userland 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 es- tablished and addresses of the interface become available. To enable the usage of /etc/ppp/ip-up and /etc/ppp/ip-down for this purpose, simply add ifwatchd=YES to /etc/rc.conf. See ifwatchd(8) for details and parameters passed to these scripts. 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 address. 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. Wildcarding is not available (nor necessary) for IPv6 operation.
SEE ALSO
ifwatchd(8), pppoectl(8) A Method for Transmitting PPP Over Ethernet (PPPoE), RFC, 2516, February 1999.
HISTORY
The pppoe device appeared in NetBSD 1.6.
BUGS
This implementation is client side only. NetBSD 1.6 December 10, 2001 2
Powered by man-cgi (2024-03-18). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.