Session Lifecycle
Detailed walkthrough of PPPoE and DHCP session establishment and termination.
PPPoE Session Lifecycle
Phase 1: VLAN Interface Creation
Phase 2: PPPoE Discovery
Phase 3: PPP Negotiation
Phase 4: RADIUS Authentication
Phase 5: Session Registration
Phase 6: QoS Application
Phase 7: Session Termination
DHCP/IPoE Session Lifecycle
Phase 1: VLAN Interface Creation
Phase 2: DHCP Relay
Phase 3: RADIUS Authentication
Phase 4: DHCP Offer
Phase 5: DHCP Request/ACK
Phase 6: QoS Application
Phase 7: Session Termination
Change of Authorization (CoA)
Restart Recovery & Resilience
The daemons self-heal across restarts without manual intervention. Recovery is built on idempotent, periodic re-assertions rather than a single brittle hand-off at startup, so a restart of any single service rebuilds its state from its peers within one reconcile interval.
abngd re-asserts demux bindings (~30s)
abngd periodically re-asserts its known demux interfaces to abng-dhcpd and accel-ppp. The bind signals are idempotent, so when either of those services restarts it re-binds automatically — no need to re-create the demux interfaces.
abng-demux re-announces tracked interfaces (~30s)
abng-demux periodically re-announces every tracked interface to abngd. After an abngd restart, this rebuilds abngd's in-memory demux registry (and therefore the downstream abng-dhcpd / accel-ppp bindings) from the demux side.
abng-demux re-adopts QinQ interfaces after its own restart
If abng-demux restarts, the demux QinQ interfaces it created survive in the kernel. On startup abng-demux reconstructs each live VLAN stack via netlink, matches it against a profile, and re-announces it to abngd. Already-bound subscribers — even idle ones with no in-flight traffic — recover immediately instead of waiting for the next packet to re-trigger interface creation.
abngd re-applies QoS on reconcile
On its periodic session reconcile, abngd re-applies QoS for surviving sessions (idempotent in abng-qos). This restores CAKE/IFB shaping after an abng-qos restart.
abng-qos triggers an immediate QoS resync on restart
abng-qos loses all shaping state (CAKE qdiscs + IFB devices) when it restarts.
On startup it sends a qos.resync message to abngd, which immediately re-applies
QoS for every active session — so shaping is restored within seconds of an
abng-qos restart instead of waiting for the next periodic reconcile (~60s). The
applies are idempotent, so this complements (rather than conflicts with) the
reconcile loop above.
abng-dhcpd restart only on relevant config change
abng-dhcpd loads its DHCP/RADIUS config once at startup and has no live reload. On commit, abngd restarts abng-dhcpd only when the DHCP/RADIUS config it consumes actually changed. Unrelated commits leave abng-dhcpd — and its active leases — undisturbed.
Next Steps
- VLAN Demux Deep Dive — Demux internals
- QoS Orchestration — QoS details