<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: VAS Experts</title>
    <description>The latest articles on DEV Community by VAS Experts (@vas_experts).</description>
    <link>https://dev.to/vas_experts</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4173478%2Fb004e2f3-4a11-4b7a-917d-c12d445c08f4.png</url>
      <title>DEV Community: VAS Experts</title>
      <link>https://dev.to/vas_experts</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vas_experts"/>
    <language>en</language>
    <item>
      <title>Building a Mobile Core Test Lab: srsRAN, CUPS and the Diameter Parameters That Break PCEF Integration</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Mon, 12 Oct 2026 12:55:21 +0000</pubDate>
      <link>https://dev.to/vas_experts/building-a-mobile-core-test-lab-srsran-cups-and-the-diameter-parameters-that-break-pcef-5210</link>
      <guid>https://dev.to/vas_experts/building-a-mobile-core-test-lab-srsran-cups-and-the-diameter-parameters-that-break-pcef-5210</guid>
      <description>&lt;p&gt;Testing a mobile core in isolation does not work. A tariff change affects how the network treats subscriber traffic: which apps are counted, what is blocked. Many scenarios only show up when all components interact. Testing on an operator's live infrastructure is also hard: access is temporary, resources are shared and repeated debugging is rarely possible.&lt;/p&gt;

&lt;p&gt;So we built our own lab that emulates a mobile operator network. Here is how it is structured and what went wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture: classic EPC with CUPS
&lt;/h2&gt;

&lt;p&gt;The lab follows the classic EPC with Control and User Plane Separation (CUPS). The control plane decides which services a subscriber gets; the user plane moves the traffic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MME — subscriber registration and attach procedures&lt;/li&gt;
&lt;li&gt;HSS — subscriber data, SIM profiles, service parameters&lt;/li&gt;
&lt;li&gt;SGW — carries user traffic between the radio network and the PGW&lt;/li&gt;
&lt;li&gt;PGW/PCEF — internet access, IP assignment, charging rules enforcement&lt;/li&gt;
&lt;li&gt;DPI (as UPF) — user plane: classifies applications and protocols, tracks traffic by category, enforces policies in real time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PCRF and OCS come from our technological partner. The PCRF handles service policies (tariffs, restrictions, QoS); the OCS handles online charging and real-time balance deduction. Our PCEF talks to both over Diameter, on the Gx and Gy interfaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Radio side: one emulator, one real small cell
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;srsRAN&lt;/strong&gt; runs on a standard server with an SDR module. It is open source, lets you deploy a full eNodeB and change frequency band, bandwidth and power quickly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Baicells small cell&lt;/strong&gt; is industrial equipment with dedicated voice channels. It is less flexible but closer to production. We use it for VoLTE tests with dedicated bearers and QCI=1.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ePDG and VoWiFi in the lab
&lt;/h2&gt;

&lt;p&gt;When a phone connects over Wi-Fi, it establishes an IPsec tunnel to the ePDG, then traffic enters the core as it would over LTE. For the user it feels the same: same number, same voice services, same charging logic. For the network it is a distinct traffic type that must pass DPI and PCEF correctly and be processed by the same rules as LTE sessions. The ePDG also lets us test LTE-to-Wi-Fi handover without session interruption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it hurt
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Billing integration.&lt;/strong&gt; Making PCEF work with PCRF and OCS requires many parameters to match exactly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;subscriber identifier formats&lt;/li&gt;
&lt;li&gt;MCC/MNC encodings&lt;/li&gt;
&lt;li&gt;session parameters&lt;/li&gt;
&lt;li&gt;quota rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even small mismatches caused request rejections and errors. Diagnosing them took deep knowledge of 3GPP specifications and analysis of Diameter session logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. srsRAN has no dedicated bearers&lt;/strong&gt;, and full VoLTE needs them. We adapted the Kamailio IMS server so that, even if the radio network does not create a dedicated bearer, the call continues over the default bearer. For testing purposes this was enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we test
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quota exhaustion.&lt;/strong&gt; A subscriber gets a 100 MB package. We check how DPI counts traffic, how precisely PCEF requests a new quota from the OCS, and what happens at the limit. While blocked, a whitelist must keep DNS and operator services reachable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Charging exemptions.&lt;/strong&gt; Unlimited tariffs and prioritization: specific app categories (for example messengers or navigation) must not consume the main data package. DPI identifies the traffic, PCEF decides whether to charge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roaming.&lt;/strong&gt; A phone with a different MCC/MNC (we load another PLMN on the SIM) must be processed correctly along the whole chain from HSS to OCS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice and video via IMS.&lt;/strong&gt; The full VoLTE cycle: SIP registration, media session setup, voice between two subscribers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LTE-to-Wi-Fi switching.&lt;/strong&gt; One subscriber on LTE, one on Wi-Fi, both registered in the same IMS. The call must work, and after one switches from Wi-Fi to LTE the handover must complete without interruption.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaways for your own lab
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Keep a reference list of identifier formats and encodings (MCC/MNC, subscriber IDs) and check it first when Gx/Gy requests are rejected.&lt;/li&gt;
&lt;li&gt;Keep Diameter session logs from day one. They were essential for diagnosing the billing mismatches.&lt;/li&gt;
&lt;li&gt;Use an emulator for flexibility and one real base station for production-like behavior.&lt;/li&gt;
&lt;li&gt;Treat VoWiFi as its own traffic type in your policy tests.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;We use this lab to verify new features, reproduce complex network situations and demonstrate solutions to customers. More about our products: &lt;a href="https://vasexperts.com/products/pgw/" rel="noopener noreferrer"&gt;PGW&lt;/a&gt; and &lt;a href="https://vasexperts.com/products/pcef-policy-and-charging-enforcement-function/" rel="noopener noreferrer"&gt;PCEF&lt;/a&gt;. Original article: &lt;a href="https://vasexperts.com/blog/mobile-networks/mobile-operator-test-lab-for-core-network-testing/" rel="noopener noreferrer"&gt;How We Deployed Our Own Mobile Operator Test Lab&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>telecom</category>
      <category>networking</category>
      <category>opensource</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
