Skip to main content

PPPoE Termination

PPPoE session termination via accel-ppp integration.

Overview

AthenaBNG terminates PPPoE sessions using accel-ppp, a high-performance PPPoE server. Each subscriber establishes a PPP session over Ethernet, which is then used to negotiate IP configuration via IPCP.

PPPoE Protocol

Discovery Phase

  1. PADI (PPPoE Active Discovery Initiation) — Subscriber broadcasts to find access concentrators
  2. PADO (PPPoE Active Discovery Offer) — BNG responds with offer
  3. PADR (PPPoE Active Discovery Request) — Subscriber requests session
  4. PADS (PPPoE Active Discovery Session-confirmation) — BNG confirms session

Session Phase

Once session is established:

  1. LCP (Link Control Protocol) — Negotiate PPP link parameters
  2. IPCP (IP Control Protocol) — Negotiate IP configuration
  3. Data Transfer — Subscriber traffic flows
  4. PADT (PPPoE Active Discovery Terminate) — Session termination

Session Establishment

1. VLAN Interface Creation

When PADI is received:

  • abng-demux creates VLAN interface (e.g., eth1.111.500.100)
  • Notifies abngd of new interface
  • abngd tells accel-ppp to bind to interface

2. PPPoE Negotiation

accel-ppp:

  • Sends PADO with AC name and service name
  • Receives PADR from subscriber
  • Sends PADS to establish session
  • Creates PPP interface (e.g., ppp0)

3. LCP Negotiation

PPP Link Control Protocol:

  • Negotiate MTU/MRU (default 1492)
  • Enable LCP echo for keepalive (default 30s interval, 3 failures)
  • Agree on authentication method (PAP)

4. IPCP Negotiation

IP Control Protocol:

  • Subscriber requests IP address
  • accel-ppp requests from RADIUS
  • RADIUS returns Framed-IP-Address
  • IPCP assigns IP to subscriber

5. IP-Up Hook

When IP is assigned:

  • accel-ppp triggers ip-up script
  • Script calls abng-notify with session details
  • abngd creates session in database
  • abng-qos applies QoS rules

Configuration

pppoe:
enabled: true
ac_name: "AthenaBNG"
mtu: 1492
mru: 1492
lcp_echo_interval: 30
lcp_echo_failure: 3

RADIUS Integration

Authentication

RADIUS Access-Request:

  • User-Name — Subscriber username
  • User-Password — Subscriber password (PAP)
  • NAS-Identifier — "AthenaBNG"
  • NAS-Port-Id — VLAN interface name (Circuit ID)

Authorization

RADIUS Access-Accept:

  • Framed-IP-Address — Assigned IP address
  • Framed-IP-Netmask — Subnet mask (usually 255.255.255.255)
  • Session-Timeout — Session timeout in seconds
  • Athena-Rate-Down — Download rate
  • Athena-Rate-Up — Upload rate

QoS Integration

When session is established:

  1. abng-qos creates CAKE qdisc on PPP interface
  2. Sets download rate (egress shaping)
  3. Creates IFB device for ingress shaping
  4. Sets upload rate on IFB

Monitoring

View PPPoE Sessions

abng> show subscribers pppoe

View Session Details

abng> show subscribers detail 1

Check accel-ppp Status

sudo systemctl status accel-ppp

Monitor accel-ppp Logs

sudo journalctl -u accel-ppp -f

Troubleshooting

Sessions Not Appearing

  1. Check PPPoE is enabled: show configuration | match pppoe
  2. Check VLAN demux is enabled: show configuration | match demux
  3. Check VLAN interfaces are created: show vlans
  4. Check RADIUS is reachable: radtest testuser testpass <radius-ip> 1812 <secret>
  5. Check accel-ppp logs: journalctl -u accel-ppp -f

Sessions Disconnecting Frequently

  1. Check LCP echo settings: show configuration | match lcp_echo
  2. Check network stability: ping -c 100 <upstream-router>
  3. Check RADIUS timeout
  4. Check accel-ppp logs for errors

Sessions Not Getting IP

  1. Check RADIUS is configured: show configuration | match radius
  2. Test RADIUS: radtest testuser testpass <radius-ip> 1812 <secret>
  3. Check RADIUS returns Framed-IP-Address
  4. Check abngd logs: journalctl -u abngd -f

Best Practices

  1. AC Name — Use descriptive name (e.g., "AthenaBNG-Brisbane")
  2. MTU/MRU — Use 1492 for standard PPPoE
  3. LCP Echo — Use 30s interval with 3 failures for standard keepalive
  4. RADIUS — Always configure RADIUS before enabling PPPoE
  5. QoS — Enable QoS for per-subscriber rate limiting
  6. Monitoring — Monitor session count and churn rate

Next Steps