Quantum: one record, and it is the join
A Quantum session is a first-class object. It is keyed by framed_ip,
persisted across restarts of the BNG's control plane, and carries everything
about that subscriber at once:
| Field | What it is | Why it is on the session |
|---|---|---|
| Service state | OFFERING | CONNECTED | CAPTIVE |
Service state is data, not an inference from a lease timer |
subscriber_id |
The identity — operator-assigned, opaque | Sessions roll up to an account |
| MAC · Option 82 circuit-id · remote-id | Locators — device and line | How the record was found; never the identity |
plan_name and its policer settings |
What was sold, and the eight policer parameters programmed from it | Policy and intent sit together |
acct_session_id |
UUID, node-prefixed [next release] | The billing idempotency key |
| Subscription correlation id | Links each session to its subscription | A CPE swap is a new leg of the same account |
framed_ip · relay address (giaddr) · next hop · data-plane interface |
Address and attachment | Forwarding context |
| Data-plane handle | Handle into the data plane | The bridge to the entry every packet is looked up in |
| Start time · session, idle and lease deadlines | Deadlines as absolute timestamps | A restarted control plane rebuilds every timer from the record |
interim_interval |
Accounting cadence, per subscriber | Heavy accounts sampled finely; the base sampled cheaply |
The handle leads to the other half of the session: its entry in VPP's session
table, keyed by the same IP. That entry holds the forwarding state and route,
the captive flag, an RFC 2698 two-rate, three-colour policer in each direction,
and twelve 64-bit counters: green/yellow/red × in/out × octets/packets. The
counters are kept per worker and summed on read. This is the entry the packet
path looks up for every subscriber packet, so the thing being counted and the
thing being billed are the same object. Subscriber packets never enter the
kernel; only DHCP is passed up to the BNG's control plane. When VPP restarts,
the BNG replays every session and re-seeds the counters, so usage keeps rising
rather than resetting.
The record keeps a transient copy of those counters. It is deliberately kept
out of what the BNG saves to disk, so that refreshing the counters never
rewrites the saved record. Alongside it sit the session's running idle time
and, [next release], a live rate for each colour band, sampled every five
seconds, with a short history.
That pair, one persisted record and the one data-plane entry it points at, is
the whole subscriber. Identity, entitlement, address, policer state, usage and
live rate are all one lookup from each other. The record also survives a
restart of the control plane or of the data plane.