Using PPPoE

PPPoE stands for Point-to-Point Protocol over Ethernet. It's a method of encapsulating your data for transmission over a bridged Ethernet topology.

PPPoE is a specification for connecting users on an Ethernet network to the Internet through a broadband connection, such as a single DSL line, wireless device, or cable modem. Using PPPoE and a broadband modem, LAN users can gain individual authenticated access to high-speed data networks.

By combining Ethernet and the Point-to-Point Protocol (PPP), PPPoE provides an efficient way to create a separate connection to a remote server for each user. Access, billing, and choice of service are managed on a per-user basis, rather than a per-site basis. It has the advantage that neither the telephone company nor the Internet service provider (ISP) needs to provide any special support.

Unlike dialup connections, DSL and cable modem connections are always on. Since a number of different users are sharing the same physical connection to the remote service provider, a way is needed to keep track of which user traffic should go to where, and which user should be billed. PPPoE lets each user-remote site session learn each other's network addresses (during an initial exchange called discovery). Once a session is established between an individual user and the remote site (for example, an Internet service provider), the session can be monitored for billing purposes. Many apartment houses, hotels, and corporations are now providing shared Internet access over DSL lines using Ethernet and PPPoE.

A PPPoE connection is composed of a client and a server. Both the client and server work over any Ethernet-like interface. It's used to hand out IP addresses to the clients, based on the user (and computer if desired), as opposed to computer-only authentication. The PPPoE server creates a point-to-point connection for each client.

Establishing a PPPoE session

The io-pkt-* stack provides PPP-to-Ethernet services. Start io-pkt* with the appropriate driver. For example (with the fictitious ABC100 driver):

io-pkt-v6-hc -d abc100

Starting a point-to-point connection over PPPoE session

Use pppoectl to configure and initiate the PPPoE session. Here's an example of the commands you use to bring up a PPPoE connection:

  1. Make sure the Ethernet interface is up (or else it won't send any packets):
    ifconfig ne0 up
  2. Let pppoe0 use ne0 as its Ethernet interface:
    pppoectl -e ne0 pppoe0
  3. Configure authentication:
    pppoectl pppoe0 \
       myauthproto=pap \
       myauthname=XXXXX \
       myauthsecret=YYYYY \
  4. Configure the pppoe0 interface itself. These addresses are magic, meaning we don't care about either address, so we let the remote PPP choose them:
    ifconfig pppoe0 netmask 0xffffffff up

You can use ifwatchd to spawn scripts when the IP address is configured.

Note: If PPPoE has problems connecting to certain sites on the Internet, see PPPOE and Path MTU Discovery in the QNX Neutrino technotes.