PPPOE(8)

๐Ÿ“ฆ
version 4.0 ยท 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

๐Ÿ’… PPPOE(8) โ€” the pppoe(8) manual, but make it make sense ๐ŸŽ€

okay so bestie, welcome to the pppoe(8) page from the System Manager's Manual. grab a lil snack, we're getting your DSL connection literally slaying โœจ


๐ŸŒˆ NAME ๐ŸŒˆ

pppoe โ€” the user-space PPPoE client. that's it, that's the vibe ๐Ÿฆ‹


๐Ÿ’– SYNOPSIS ๐Ÿ’–

pppd pty 'pppoe [pppoe_options]' [pppd_options]

pppoe -A [pppoe_options]

like yes, that's the whole invocation, no cap ๐Ÿ‘‘


โœจ DESCRIPTION โœจ

so pppoe is a user-space client for PPPoE (that's Point-to-Point Protocol over Ethernet, iykyk) for Linux and other UNIX systems. it works in concert with the pppd PPP daemon to give you a PPP connection over Ethernet โ€” the exact setup a ton of DSL service providers use. it's giving teamwork, it's giving main character energy ๐Ÿซถ


๐ŸŽ€ OPTIONS ๐ŸŽ€

okay this is the part you actually came for, bestie. every single flag, no skipping ๐Ÿ’…

  • -I interface โ€” tells pppoe which Ethernet interface to use. on Linux that's typically eth0 or eth1. the interface should be "up" before you start pppoe, but it should not be configured to have an IP address. so close, yet so far ๐Ÿ™ˆ
  • -T timeout โ€” makes pppoe exit if no session traffic is detected for timeout seconds. the author recommends you use this as an extra safety measure โ€” but if you do, make sure PPP generates enough traffic that the timeout won't normally trigger. best way to do that? use the lcp-echo-interval option to pppd. and set the PPPoE timeout to be about four times the LCP echo interval. math, but make it cute ๐Ÿงš
  • -D file_name โ€” dumps every packet to the specified file_name. this is for debugging only, fr fr โ€” it produces huge amounts of output and greatly reduces performance. like, catastrophic amounts of output. you've been warned ๐Ÿ’€
  • -V โ€” prints its version number and exits. short, sweet, iconic.
  • -A โ€” sends a PADI packet, then prints the names of access concentrators in each PADO packet it receives. do not use this with pppd โ€” the -A option is meant to be used interactively to give you interesting info about the access concentrator. it's a lil detective moment ๐Ÿ”ฅ
  • -S service_name โ€” specifies the desired service name. pppoe will only initiate sessions with access concentrators that can provide that specified service. in most cases you should not specify this. only use it if you know there are multiple access concentrators, or you know you need a specific service name. picky queen behavior ๐Ÿ‘‘
  • -C ac_name โ€” specifies the desired access concentrator name. pppoe will only initiate sessions with that specified access concentrator. again, most cases: don't. use it only if you know there are multiple access concentrators. and if you specify both -S and -C, they must both match for pppoe to initiate a session. strict standards, honestly valid ๐Ÿ’…
  • -U โ€” makes pppoe use the Host-Uniq tag in its discovery packets. this lets you run multiple pppoe daemons without their discovery packets interfering with one another. you must supply this option to all pppoe daemons if you intend to run multiple daemons simultaneously. the specific Host-Uniq value used is the hexadecimal representation of the pppoe process's PID. nerdy and specific, we love her ๐Ÿฆ‹
  • -W value โ€” also uses the Host-Uniq tag in discovery packets, and furthermore sets the value of Host-Uniq to value. use with caution. note that -W and -U are mutually-incompatible. pick a lane bestie ๐Ÿ˜ญ
  • -s โ€” uses synchronous PPP encapsulation. if you use this, you must use the sync option with pppd. you're encouraged to use it if it works, because it greatly reduces the CPU overhead of pppoe. however โ€” it MAY be unreliable on slow machines: there's a race condition between pppd writing data and pppoe reading it. for that reason the default setting is asynchronous. if you hit bugs or crashes with Synchronous PPP, turn it off โ€” don't e-mail the author for support! ๐Ÿ”ฅ (dramatic but fair)
  • -m MSS โ€” clamps the TCP maximum segment size at the specified value. because of PPPoE overhead, the MSS for PPPoE is smaller than for normal Ethernet encapsulation, and that could cause problems for machines on a LAN behind a gateway using PPPoE. if you've got a LAN behind a gateway and the gateway connects to the Internet using PPPoE, you are strongly recommended to use a -m 1412 option. this avoids having to set the MTU on all the hosts on the LAN. one flag, saving you a whole afternoon ๐ŸŒธ
  • -p file โ€” writes its process-ID to the specified file. this can be used to locate and kill pppoe processes. so you can find her later ๐ŸŽ€
  • -e sess:mac โ€” skips the discovery phase and moves directly to the session phase. the session is given by sess and the MAC address of the peer by mac. this mode is not meant for normal use โ€” it's designed only for pppoe-server(8). backstage access only ๐Ÿ’œ
  • -n โ€” doesn't open a discovery socket. again, not meant for normal use โ€” designed only for pppoe-server(8). same backstage energy ๐Ÿ“
  • -k โ€” terminates an existing session by sending a PADT frame, then exits. you must use the -e option in conjunction with this to specify the session to kill. useful for killing sessions when a buggy peer doesn't realize the session has ended. it's giving ghosting, but productive ๐Ÿ’€
  • -d โ€” performs discovery and then exits, after printing session information to standard output. the session info is printed in exactly the format expected by the -e option. this lets you initiate a PPPoE discovery, do some other work, and then start the actual PPP session. be careful โ€” if you use this in a loop you can create many sessions, which may annoy your peer. don't spam, bestie ๐Ÿ˜ญ
  • -f disc:sess โ€” sets the Ethernet frame types for PPPoE discovery and session frames. the types are specified as hexadecimal numbers separated by a colon. standard PPPoE uses frame types 8863:8864. don't use this unless you are absolutely sure the peer you're dealing with uses non-standard frame types. and if your ISP uses non-standard frame types โ€” complain! as you should ๐Ÿ‘
  • -h โ€” prints usage information and exits. the classic.

๐ŸŒธ PPPOE BACKGROUND ๐ŸŒธ

okay, lore time. PPPoE (Point-to-Point Protocol over Ethernet) is described in RFC 2516, and it's a protocol that lets the session abstraction be maintained over bridged Ethernet networks. yes, that's a real sentence, and yes it slaps ๐Ÿฆ‹

PPPoE works by encapsulating PPP frames in Ethernet frames. the protocol has two distinct stages: the discovery stage and the session stage. two eras, honestly.

discovery stage โœจ โ€” the host broadcasts a special PADI (PPPoE Active Discovery Initiation) frame to discover any access concentrators. the access concentrators (typically only one) reply with PADO (PPPoE Active Discovery Offer) packets, announcing their presence and the services they offer. the host picks one of the access concentrators and transmits a PADR (PPPoE Active Discovery Request) packet, asking for a session. the access concentrator replies with a PADS (PPPoE Active Discovery Session-Confirmation) packet. then the protocol moves to the session stage. it's a whole courtship, honestly ๐Ÿ’–

session stage ๐Ÿ”ฅ โ€” the host and access concentrator exchange PPP frames embedded in Ethernet frames. the normal Ethernet MTU is 1500 bytes, but the PPPoE overhead plus two bytes of overhead for the encapsulated PPP frame mean the MTU of the PPP interface is at most 1492 bytes. this causes all kinds of problems if you're using a Linux machine as a firewall and interfaces behind the firewall have an MTU greater than 1492. in fact, to be safe, the author recommends setting the MTU of machines behind the firewall to 1412, to allow for worst-case TCP and IP options in their respective headers. numbers, bestie, we respect them ๐Ÿ“

normally PPP uses the Link Control Protocol (LCP) to shut down a PPP link. however, the PPPoE specification allows the link to be shut down with a special PADT (PPPoE Active Discovery Terminate) packet. this client recognizes that packet and will correctly terminate if a terminate request is received for the PPP session. polite AND functional ๐ŸŽ€


๐Ÿ‘‘ DESIGN GOALS ๐Ÿ‘‘

the author's design goals for this PPPoE client, in descending order of importance:

  1. It must work.
  2. It must be a user-space program and not a kernel patch.
  3. The code must be easy to read and maintain.
  4. It must be fully compliant with RFC 2516, the proposed PPPoE standard.
  5. It must never hang up forever โ€” if the connection is broken, it must detect this and exit, allowing a wrapper script to restart the connection.
  6. It must be fairly efficient.

number one being "it must work" is honestly the most real priority list ever ๐Ÿ’€

the author believes all of these goals were achieved, but (of course) is open to suggestions, patches and ideas. check the home page, https://dianne.skoll.ca/projects/rp-pppoe/, for contact information ๐Ÿซถ


โญ NOTES โญ

  • for best results, you must give pppd an mtu option of 1492. the author has observed problems with excessively-large frames unless this option is set.
  • also, if pppoe is running on a firewall machine, all machines behind the firewall should have MTUs of 1412.
  • if you have problems, check your system logs. pppoe logs interesting things to syslog. you may have to turn on logging of debug-level messages for complete diagnosis. the logs know all, the logs see all ๐Ÿ”

๐Ÿ’œ AUTHORS ๐Ÿ’œ

pppoe was written by Dianne Skoll <dianne@skoll.ca>, with much inspiration from an earlier version by Luke Stras.

the pppoe home page is https://dianne.skoll.ca/projects/rp-pppoe/ ๐ŸŒˆ


๐Ÿงš SEE ALSO ๐Ÿงš

pppd(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8)


okay that's the whole page, bestie, you're officially PPPoE-literate ๐Ÿ’…โœจ this lil number is from the 4th Berkeley Distribution, dated 5 October 2015 โ€” old but iconic, like a vintage handbag ๐ŸŽ€๐Ÿ’–