VyOS: one join, held in a daemon's memory

Quantum's subscriber is one record. VyOS's is five objects with three owners.
Everything below is VyOS's IPoE path as it ships today in 1.5.1 LTS and
rolling.

VyOS does not use VPP for IPoE. VyOS 1.5 added an optional VPP/DPDK
dataplane, but VyOS will not run its IPoE server on a VPP interface (T8182). A
VyOS IPoE subscriber's packets are therefore handled by the Linux kernel, even
when VPP accelerates the box's other interfaces. The Appendix gives the detail.

VyOS does keep one object per subscriber that knows about the others. accel-ppp
is the IPoE server inside VyOS's service ipoe-server. It holds a session
record for every subscriber and lists them in show ipoe-server sessions. So
the question is what that record holds, where the rest of the subscriber
lives, and how long the whole lasts.

The accel-ppp session lives in the memory of the accel-pppd process,
keyed by session ID and interface name. VyOS's op-mode source shows that
show ipoe-server sessions asks it for ifname, username, calling-sid,
ip, ip6, ip6-dp, rate-limit, type, comp, state and uptime.
accel-ppp's own CLI can add rx-bytes, tx-bytes and packet counts, which it
reads back from the session's kernel interface. state is start, active
or finish. It records whether the session is up, not what service it is
getting. This record is the join, and accel-ppp's source shows that it is
never written to disk.

The session interface is a per-session ipoeN kernel device, created by
accel-ppp's IPoE kernel module and keyed by interface index. Its link
statistics are the subscriber's usage: bytes and packets, in and out. That is
four totals, 64-bit in the kernel, with no split by conformance.

The tc qdiscs and filters on that interface hold the rate: a policer
upstream, a TBF or HTB queue downstream. They are keyed by qdisc handle, and
they are the only place a policer drop is counted. When a RADIUS
Change-of-Authorization (CoA), a message that changes a live session's
settings, changes the rate, accel-ppp's shaper source shows that it removes
the limiter and installs a new one, so those statistics start again from zero.

The /32 route sits in the kernel's general routing table, keyed by prefix.
It is forwarding context, owned by the FIB alongside every other route on the
router.

Outside the session: who the subscriber is, and what they used. In local
mode a subscriber is identified by the access interface and the client's MAC —
a line in the router configuration. In radius mode identity and plan live on
the RADIUS server, along with the accounting rows. Those rows are Start,
Interim and Stop records keyed by Acct-Session-Id, carrying octets and
packets per direction (32-bit plus gigawords) and session time.

Five objects, three owners: accel-ppp, the kernel, and the config system or a
RADIUS server. The consequences are concrete:

  • The join lives in RAM, and so does the session. VyOS's documentation is
    explicit: "Every commit that changes the service ipoe-server configuration
    restarts the server, which terminates all active IPoE sessions."
    In local
    mode the subscriber base is that configuration, so adding a customer or
    changing a rate ends every session on the box.
  • The packet path never reads the session. Packets walk the netdev, the
    qdiscs and the FIB. The accel-ppp record is bookkeeping beside them, and what
    it reports is read back from kernel objects after the fact.
  • Usage is four totals, and the drops are somewhere else. Traffic the
    policer dropped is counted only in qdisc statistics. Those are not on the
    session and not in accounting, and every CoA re-rate resets them.
  • No live per-subscriber rate exists as data. accel-ppp reports cumulative
    bytes. Getting a rate means polling session interfaces and differencing them
    yourself, on interfaces that come and go with their sessions.
  • In local mode, no usage is kept. Without RADIUS there is no accounting.
    A subscriber's byte counts exist while the session does and vanish with it,
    unless the operator writes an on-down script to capture them.
  • The identity is a MAC on a port. Identifying a customer by Option 82
    circuit-ID instead takes a Lua lua-username function and a RADIUS server.

What VyOS gets right. Two things, and both are real. First, accel-ppp's
session is a genuine join. One command shows a subscriber's interface, name,
address, rate limit and state together. Second, giving each session its own
kernel interface makes per-subscriber byte counts visible to standard Linux
tooling, with 64-bit counters. With a RADIUS server behind it, VyOS also takes
a per-session Acct-Interim-Interval and live CoA. The limits are in what the
join holds, and in how long it lasts.