Open5GS Traffic Accounting

Spencer Sevilla sevilla at
Wed Mar 11 16:39:37 UTC 2020

+1 to Harald. Doing traffic accounting at the PGW and then reporting these statistics over Diameter is probably the most architecturally correct way to do this. I'm definitely a fan of using IPTables for this kind of stuff, since it’s all just packets anyways.

For our networks, we wrote a completely separate tool called haulage ( that uses IPTables and does something very similar. Basically logs packets that are forwarded from the virtual interface, draws them down against a user’s prepaid quota, and cuts them off when they hit zero. We wrote this as a separate app (in go) mainly to keep things simpler and let us move faster.


> On Mar 11, 2020, at 09:26, <david at> <david at> wrote:
> Sorry yeah I meant the EPC.  I am not sure if the Open5GS software supports
> it but Freediameter would be the Accounting portion in AAA from what I can
> tell.  
> David Peterson
> Senior Engineer
> 855-947-7776 ext. 9214
> c 419-706-7355
> d 979-314-1305
> -----Original Message-----
> From: Harald Welte <laforge at> 
> Sent: Wednesday, March 11, 2020 11:53 AM
> To: david at
> Cc: 'Romeu Medeiros' <medeiros at>; nextepc at
> Subject: Re: Open5GS Traffic Accounting
> Hi David,
> On Tue, Mar 10, 2020 at 07:56:06PM -0400, david at wrote:
>> Freediameter should be able to provide accounting so long as the ENB
> supports it.
> in which way is the eNB involved in traffic accounting in LTE?  
> Normally, AFAICT, accounting is implemented within the P-GW, potentially
> interacting via Radios/Diameter or some other protocol with some external
> entity that decides whether or not there is credit/budget remaining or not.
> If not, the PGW would stop firwarding packets of the related
> session/subscriber.
> -- 
> - Harald Welte <laforge at>
> =E,1,yb6SFWcoxXKtp0qClHpv4V936cQS_cFUx9dFgqORnwJ6yRCOhax7GulxJjjPLVsGkCe2ioB
> ew6hlBJnFYR1mBgD0-WojRnKxjbM4dQK9xQ,,&typo=1
> ============================================================================
> "Privacy in residential applications is a desirable marketing option."
>                                                  (ETSI EN 300 175-7 Ch. A6)

More information about the nextepc mailing list