<?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>Blocking Restricted Sites in a Mobile Network: DNS Redirection or DPI, and What the Rules Document</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Fri, 20 Nov 2026 13:03:18 +0000</pubDate>
      <link>https://dev.to/vas_experts/blocking-restricted-sites-in-a-mobile-network-dns-redirection-or-dpi-and-what-the-rules-document-4gb4</link>
      <guid>https://dev.to/vas_experts/blocking-restricted-sites-in-a-mobile-network-dns-redirection-or-dpi-and-what-the-rules-document-4gb4</guid>
      <description>&lt;p&gt;A network operator that blocks restricted sites can act on the Domain Name System (DNS) or on the traffic itself with deep packet inspection (DPI). With DNS, the operator's resolver can give a changed answer for a blocked name. With DPI, a filter inspects the flow itself. For plain Hypertext Transfer Protocol (HTTP) traffic, it can read the request and compare the requested Uniform Resource Identifier (URI) with a list. For encrypted traffic, it works with the fields that stay unencrypted. This post compares the two methods and shows where each falls short. It then summarizes what the 3rd Generation Partnership Project (3GPP) specifications say about DNS and redirection in the mobile core, and what rules in Africa, the Middle East and Latin America document.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does DNS redirection block a site?
&lt;/h2&gt;

&lt;p&gt;DNS blocking changes what a resolver answers for a name. The ICANN Security and Stability Advisory Committee (SSAC) report SAC127 (2025) describes redirection as one option: the resolver returns the address of a remediation server. Others are an answer that the domain does not exist, or no answer. A party in the path can intercept queries and answer synthetically.&lt;/p&gt;

&lt;p&gt;With redirection, the remediation server displays a message saying the site is blocked. NXDOMAIN (non-existent domain) is the form SAC127 calls the most common among replies that give no actual resolution. REFUSED and SERVFAIL are two other replies of this kind. Silence has a drawback: the lack of a response might, under certain circumstances, make the resolver unusable from the querier's perspective.&lt;/p&gt;

&lt;p&gt;RFC 7754 from the Internet Architecture Board (IAB, 2016) notes that network operators and enterprises "may be capable of conducting blocking using their own DNS resolvers".&lt;/p&gt;

&lt;p&gt;SAC127 notes that users may not know a block is in place and can read it as a site outage. It recommends that operators of recursive servers use Extended DNS Errors (EDE) to indicate that blocking is taking place. Four of the codes defined in RFC 8914 relate to blocklists and forged answers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;EDE code&lt;/th&gt;
&lt;th&gt;Meaning in RFC 8914&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;15, Blocked&lt;/td&gt;
&lt;td&gt;The domain is on a blocklist because of an internal security policy imposed by the operator of the server that resolves or forwards the query&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16, Censored&lt;/td&gt;
&lt;td&gt;The domain is on a blocklist because of an external requirement imposed by an entity other than that operator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17, Filtered&lt;/td&gt;
&lt;td&gt;The domain is on a blocklist as requested by the client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4, Forged Answer&lt;/td&gt;
&lt;td&gt;For policy reasons, such as legal obligation or malware filtering, an answer was forged. It should be used when an answer is still provided, not when failure codes are returned&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;RFC 8914 says Extended DNS Errors are diagnostic information and must not alter DNS protocol processing. Whether, and how, a resolver passes the information on to its client is implementation dependent.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does DPI block a site?
&lt;/h2&gt;

&lt;p&gt;DPI blocks by inspecting the flow itself. For plain HTTP, a web filter reads the request, takes the requested URI and compares it with a list. Most web traffic now uses HTTPS, where the request is encrypted. There the filter works with fields that stay unencrypted, such as the server name in the TLS handshake (Server Name Indication, SNI), the server certificate and the server’s IP address. RFC 7754 says DPI-type blocking on application-layer attributes can be potentially more granular and less likely to cause collateral damage than blocking all traffic associated with an address.&lt;/p&gt;

&lt;p&gt;RFC 7754 describes stateless packet filters as blocking by content-neutral rules, for example by ports, protocols or network-layer addresses. Blocking all traffic associated with an address can impact unrelated occupants of that address. The RFC also notes that blocking based on IP addresses can be trivial to circumvent.&lt;/p&gt;

&lt;p&gt;The same RFC adds that more narrowly focused targeting "may be more complex, less efficient, or easier to circumvent" than filtering that sweeps more broadly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does each method fall short?
&lt;/h2&gt;

&lt;p&gt;Per SAC127, a user can bypass resolver-based blocking by configuring another recursive resolver, unless access to it is blocked or manipulated on the path. SAC127 says DNS blocking may never be 100% effective. RFC 7754 calls network-based blocking (packet filtering, DPI) effective only in a fairly constrained set of circumstances.&lt;/p&gt;

&lt;p&gt;RFC 7754 lists IP literals in URIs as one way to circumvent DNS filtering. SAC127 notes that the content typically remains available at the original IP address. SAC127 also notes that if a party blocks example.TLD, it blocks everything at and beneath that domain.&lt;/p&gt;

&lt;p&gt;SAC127 says DNS encryption such as DNS over HTTPS (DoH) and DNS over Transport Layer Security (DoT) can be used to bypass on-path interception and manipulation of the DNS. RFC 8484 says DoH encrypts DNS traffic and requires authentication of the server.&lt;/p&gt;

&lt;p&gt;For a domain signed with DNS Security Extensions (DNSSEC), a substituted response lacks a valid signature. A client can detect it if it validates DNSSEC itself, which SAC127 calls rare. When the validating resolver is also the one that blocks, clients have no means to detect the trust violation.&lt;/p&gt;

&lt;p&gt;DPI has its own limits. RFC 7754 says stateful packet filtering and DPI often run into technical issues that limit their viability in practice. In a network with many egress points, asymmetric routing can mean that an intermediary sees only one half of a communication. If content is encrypted with TLS or IPsec, RFC 7754 notes, the intermediary would need to decrypt the packets to examine application content. Both methods depend on the blocklist: SAC127 says parties may make errors in the list of domains, IP addresses or URLs they block, which may affect unrelated parties.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do the 3GPP specifications say about DNS and redirection?
&lt;/h2&gt;

&lt;p&gt;The 3GPP specifications describe two things in the mobile core. When a phone sets up a connection, Protocol Configuration Options (PCO) can carry DNS server addresses. Policy and Charging Control (PCC) rules can close a flow with a gate or redirect detected application traffic. The definition of redirection gives a top-up or service provisioning page as its example.&lt;/p&gt;

&lt;p&gt;In TS 24.008 the PCO element carries DNS server addresses in separate containers, and the phone asks with DNS Server IPv4 Address Request and IPv6 Address Request containers. In the Evolved Packet System (EPS), TS 23.401 says PCO go between the phone and the packet data network gateway (PGW) and pass transparently through the nodes in between.&lt;/p&gt;

&lt;p&gt;TS 23.203 defines gating control as the process of blocking or allowing packets that belong to a service data flow or a detected application's traffic. Application detection is done by the Traffic Detection Function (TDF) or by a Policy and Charging Enforcement Function (PCEF) enhanced with Application Detection and Control (ADC). Where the TDF cannot give the Policy and Charging Rules Function (PCRF) a service data flow description, TS 23.203 (clause 6.2.9.1) says the TDF itself performs gating, redirection, bandwidth limitation and charging for the detected applications.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Gate&lt;/th&gt;
&lt;th&gt;Redirect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What the rule says&lt;/td&gt;
&lt;td&gt;Whether the traffic may pass (gate open) or shall be discarded (gate closed): a service data flow at the PCEF under a PCC rule, or a detected application at the TDF under an ADC rule&lt;/td&gt;
&lt;td&gt;The detected service traffic goes to an application server. The definition's example is a top-up or service provisioning page&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On Gx (Diameter)&lt;/td&gt;
&lt;td&gt;If the gate is closed, all packets of the related IP flows are dropped&lt;/td&gt;
&lt;td&gt;A PCEF enhanced with ADC redirects the detected application's uplink traffic to the redirect address of the rule&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The redirect address can be given as IPv4, IPv6, URL or Session Initiation Protocol (SIP) URI.&lt;/p&gt;

&lt;p&gt;In the 5G core, TS 23.501 (clause 5.8.2.8.3) says the redirection of uplink application traffic may be enforced either in the Session Management Function (SMF) or directly in the User Plane Function (UPF).&lt;/p&gt;

&lt;h2&gt;
  
  
  What do rules in Africa, the Middle East and Latin America document?
&lt;/h2&gt;

&lt;p&gt;Four documents are summarized here, from the UAE, Nigeria, Brazil and Peru. The UAE and Nigerian documents come from telecom regulators; the Brazilian and Peruvian ones are a provisional measure and a law. None uses the term DNS or DPI. Each sets the result the provider must reach and leaves most of the technique to the operator or the authority. Brazil routes orders on name resolution under .br to the body that manages the domain, and names redirection. Peru is the only one that names IP blocking. The UAE identifies prohibited content by URL, pattern or digital footprint and requires a blocking message. None sets separate blocking rules for mobile networks.&lt;/p&gt;

&lt;p&gt;The UAE Telecommunications and Digital Government Regulatory Authority (TDRA) set out its Internet Access Management Regulatory Policy in version 1.1 of 19 April 2017. Licensees block prohibited content. The policy says the scope of such content is identified "by its URL, pattern, or digital footprint", or by any technique that does not impair unprohibited content. A user who tries to open prohibited content gets a blocking message, "according to their technical capabilities". The policy names no DNS or DPI method. The prohibited categories are listed in an annex.&lt;/p&gt;

&lt;p&gt;Nigeria's regulator, the Nigerian Communications Commission (NCC), issued its Internet Code of Practice 2026 on 13 February 2026. When the NCC finds reported content unlawful, it issues a takedown notice to internet access service providers "to deny or disable access to the content", and they must comply within 24 hours. A provider must also have measures for the immediate blocking of access to child sexual abuse content once the NCC notifies it. The Code does not say how to block. It forbids blocking lawful content, except for reasonable network management.&lt;/p&gt;

&lt;p&gt;As of November 2026, Brazil's provisional measure MP 1.394 of 25 September 2026 bans fixed-odds betting. It lets the Ministry of Finance and the Ministry of Justice and Public Security request blocking or redirection of the sites that offer it (from the Portuguese text). The telecom regulator Anatel receives the orders and distributes them to providers of internet access. The Brazilian Internet Steering Committee (CGI.br) receives the orders that concern name resolution under the .br domain. Anatel and CGI.br may define the most appropriate technique. A provisional measure has the force of law from publication but expires unless Congress converts it into a law; Congress has not yet done so, and the deadline runs to 4 March 2027.&lt;/p&gt;

&lt;p&gt;Peru's Law 31557 on remote gaming and sports betting lets the Ministry of Foreign Trade and Tourism (MINCETUR) require the blocking of URLs, IP addresses, web pages and apps, and of payment channels (from the Spanish text). A complementary provision obliges the Ministry of Transport and Communications to carry out such blocks at MINCETUR's request. The law does not name DNS or DPI.&lt;/p&gt;

&lt;h2&gt;
  
  
  URL Filtering on our platform
&lt;/h2&gt;

&lt;p&gt;Our URL Filtering option filters web resources by regulatory blacklists or by lists the operator sets up itself. It works together with Stingray Service Gateway, our platform built on DPI. The platform can download blocklists from our cloud service and update them automatically. A national register that our cloud does not carry, such as those described above, the operator connects as its own list, loaded from an address it specifies. Our traffic filtering page describes illegal content as including pornography and online casinos.&lt;/p&gt;

&lt;p&gt;Lists can hold URLs for HTTP, and server names (SNI), certificate names (Common Name) and IP addresses for HTTPS. The platform filters traffic from mobile devices, such as iOS and Android, and from proxy servers. Besides the operator’s own lists, it supports filtering by category, with a daily update of the category list. On a blocked URL, our platform can redirect the user to a page set by the operator, for HTTP traffic. A blocked HTTPS connection is closed without a redirect.&lt;/p&gt;

</description>
      <category>telecom</category>
      <category>networking</category>
      <category>dns</category>
      <category>security</category>
    </item>
    <item>
      <title>Wi-Fi Calling where there is no cellular signal: what the phone, ePDG and IMS do on the call path</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Fri, 20 Nov 2026 12:38:00 +0000</pubDate>
      <link>https://dev.to/vas_experts/wi-fi-calling-where-there-is-no-cellular-signal-what-the-phone-epdg-and-ims-do-on-the-call-path-37fn</link>
      <guid>https://dev.to/vas_experts/wi-fi-calling-where-there-is-no-cellular-signal-what-the-phone-epdg-and-ims-do-on-the-call-path-37fn</guid>
      <description>&lt;p&gt;Picture a farmhouse with working home broadband and no cellular signal. The phone shows no bars, yet a Wi-Fi call can still go through. What does the phone actually do on that path, and which parts of the operator's core have to be running?&lt;/p&gt;

&lt;p&gt;Apple's iPhone guide tells users to turn to Wi-Fi Calling when there is a Wi-Fi connection in an area with little or no cellular coverage. Researchers note that many operators use VoWiFi to complement cellular coverage where no radio signal is available, for example in rural territories or shielded buildings. For an engineer, the useful question is what that path consists of, node by node.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Wi-Fi Calling need a cellular signal?
&lt;/h2&gt;

&lt;p&gt;No cellular radio signal is needed, but the operator's core network is. Without a signal the phone loses radio access. The 3GPP AAA server still gets the authentication vectors from the HSS or HLR if it does not already have them. The PDN gateway still reaches the packet data network, which can be an operator's own network that provides IMS services. The phone reaches this core over Wi-Fi.&lt;/p&gt;

&lt;p&gt;The 3GPP architecture defines how non-3GPP accesses, Wi-Fi among them, get IP connectivity to the Evolved Packet Core. When the terminal supports 3GPP access, the credentials used with EAP-AKA reside on the UICC (the SIM). After the challenge succeeds, the operator's 3GPP AAA server checks in the user's subscription that the user is authorized for non-3GPP access.&lt;/p&gt;

&lt;p&gt;In a non-roaming case the home operator decides how a Wi-Fi network is used, as trusted or as untrusted. GSMA IR.51 is the profile for IMS voice, video and SMS over untrusted Wi-Fi. It covers WLAN access to the EPC via the untrusted S2b interface and does not cover trusted access over S2a.&lt;/p&gt;

&lt;p&gt;Each step of the call path has an owner. The whole path for untrusted Wi-Fi without roaming (S2b) fits in one table.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Who acts&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Phone, Wi-Fi network&lt;/td&gt;
&lt;td&gt;The phone gets a local IP address from the Wi-Fi network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Phone, ePDG&lt;/td&gt;
&lt;td&gt;The phone selects an ePDG and starts an IPsec tunnel to it; the tunnel runs over SWu&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Phone, ePDG, 3GPP AAA server&lt;/td&gt;
&lt;td&gt;The phone and the AAA server authenticate each other, and the ePDG relays their messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;ePDG, AAA server, PDN gateway&lt;/td&gt;
&lt;td&gt;The PDN gateway is selected using subscriber data the HSS gives to the AAA server, and the ePDG then reaches it over S2b&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Phone, IMS&lt;/td&gt;
&lt;td&gt;The phone can ask for P-CSCF addresses in IKEv2, then registers in IMS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Phone, IMS&lt;/td&gt;
&lt;td&gt;SIP signalling and media can travel inside the IPsec tunnel&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How does the phone find the ePDG?
&lt;/h2&gt;

&lt;p&gt;Before it can pick an ePDG, the phone has to know which country it is in. The architecture leaves the method to the implementation, and if the phone cannot determine the country, it stops ePDG selection. The access signalling specification notes that with a 3GPP radio network in coverage the phone can compare the PLMN's MCC with its IMSI, and that out of 3GPP coverage it can use other techniques, including user-provided location.&lt;/p&gt;

&lt;p&gt;A phone in its home country that has no home ePDG identifier configured builds the ePDG name from the home network’s PLMN ID (the MCC and MNC of its IMSI). The name follows the pattern from the 3GPP numbering specification:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;epdg.epc.mnc&amp;lt;MNC&amp;gt;.mcc&amp;lt;MCC&amp;gt;.pub.3gppnetwork.org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MNC and MCC are each coded with three digits, so a two-digit MNC gets a leading zero in the name.&lt;/p&gt;

&lt;p&gt;The phone resolves this name with standard DNS and picks an ePDG address of the same IP version as its local address. GSMA IR.51 notes that the DNS queries go to the DNS server provided on the Wi-Fi internet connection.&lt;/p&gt;

&lt;p&gt;Failures matter too. If the phone in its home country cannot select an ePDG in the home network, it stops ePDG selection. A phone can tell that a Wi-Fi network restricts access to the core if it gets no IKEv2 response to its IKE_SA_INIT request. Apple lists connecting to a different Wi-Fi network among the things to try when Wi-Fi Calling is not working.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the phone prove who it is over untrusted Wi-Fi?
&lt;/h2&gt;

&lt;p&gt;Our blog post on TWAG and ePDG says untrusted access suits any network, including a subscriber's home router or Wi-Fi in a coffee shop, and that the operator has no control over such a network. In the standard, whether a Wi-Fi network is trusted is the operator's decision. The post adds that on untrusted Wi-Fi the phone protects the traffic itself: it builds an IPsec tunnel to the ePDG, and the ePDG hands the session to the core over S2b.&lt;/p&gt;

&lt;p&gt;The tunnel starts with an IKE_SA_INIT request that sets up the IKEv2 security association. The following IKE_AUTH request carries the APN for a non-emergency session in the IDr payload. The phone is authenticated with EAP-AKA inside IKEv2. EAP-AKA' is required for trusted-access authentication, while tunnel setup with the ePDG allows only EAP-AKA.&lt;/p&gt;

&lt;p&gt;Step by step, the exchange runs like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The ePDG extracts the EAP messages the phone sends over IKEv2 and passes them to the 3GPP AAA server over SWm. SWm reuses the DER and DEA commands of the Diameter EAP application.&lt;/li&gt;
&lt;li&gt;The AAA server fetches the authentication vectors from the HSS or HLR if it does not already have them.&lt;/li&gt;
&lt;li&gt;The ePDG answers the phone's IKE_AUTH request with its identity and, if requested, a certificate. It also carries the AAA server's EAP-Request/AKA-Challenge. The certificate-based signature is how the ePDG authenticates itself to the phone.&lt;/li&gt;
&lt;li&gt;The phone checks the authentication parameters and answers in a new IKE_AUTH request with the EAP-Response/AKA-Challenge. The ePDG forwards it to the AAA server.&lt;/li&gt;
&lt;li&gt;After success the AAA server sends EAP-Success and the MSK to the ePDG, which relays EAP-Success to the phone. The phone derives its own copy of the MSK, and both sides use it to compute the AUTH parameters that authenticate the IKE_SA_INIT messages.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The phone can also change networks later. Its IKE_AUTH request may carry an indication that it supports MOBIKE. If such a phone changes its local IP address, it updates the IKE and IPsec security associations and sends an INFORMATIONAL request with UPDATE_SA_ADDRESSES to the ePDG. The architecture describes handover between two untrusted Wi-Fi accesses on the same ePDG the same way: the tunnel is modified, not torn down and re-created.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does the ePDG do between the tunnel and the core?
&lt;/h2&gt;

&lt;p&gt;The ePDG sits between the IPsec tunnel and the AAA and packet side. It terminates the IKEv2 signalling and relays it as AAA messages. Tunnel authentication and authorization data travel over SWm, the reference point to the 3GPP AAA server.&lt;/p&gt;

&lt;p&gt;The choice of the gateway comes next. The ePDG checks that the APN the phone asked for is allowed by subscription, or uses the default APN, and then selects the PDN gateway. The selection uses subscriber information the HSS provides through the AAA server; for a new connection the ePDG typically resolves the gateway via DNS, while a gateway already assigned (for example, before a handover) comes from the AAA server. The selected gateway informs the AAA server of its identity, and the AAA server tells the HSS the gateway identity and the APN. S6b is the reference point between the gateway and the AAA server.&lt;/p&gt;

&lt;p&gt;S2b then provides the user plane with related control and mobility support between the ePDG and the gateway. Uplink packets go from the phone into the IPsec tunnel to the ePDG, which tunnels them to the PDN gateway. Downlink works in the opposite direction.&lt;/p&gt;

&lt;p&gt;The phone ends up with two kinds of IP address: one from the Wi-Fi network to reach the ePDG, and one or more for external PDNs via the PDN gateway. The second kind can come from the PDN gateway or from an external PDN, and the ePDG delivers it to the phone. The phone gets it in the CFG_REPLY payload of the IKE_AUTH response. When you read a trace, keep the two addresses apart: the first reaches the ePDG, the second goes towards the packet data network.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the phone reach IMS and register?
&lt;/h2&gt;

&lt;p&gt;The PDN gateway reaches the packet data network over SGi, and that network can be an operator's own network that provides IMS services. GSMA IR.51 says SIP signalling uses the IMS well-known APN, and the phone sets up a separate IPsec tunnel for the PDN connection to that APN. For S2b over untrusted WLAN, the tunnel stays active for as long as the phone is connected to the IMS, from the initial registration at least until deregistration.&lt;/p&gt;

&lt;p&gt;The P-CSCF comes next. To find it, the phone can ask for its addresses in the IKEv2 configuration payload. If addresses are returned, they come in the CFG_REPLY of the IKE_AUTH response. The attributes are P_CSCF_IP4_ADDRESS and P_CSCF_IP6_ADDRESS. The IMS signalling specification lists this as one discovery method next to DHCP (with DNS resolution of the returned name) and the IMS management object. GSMA IR.51 requires these attributes for untrusted access.&lt;/p&gt;

&lt;p&gt;Registration follows. The phone may carry both SIP signalling and media inside the IPsec ESP security association. After a 401 response to its REGISTER request, the phone picks the topmost WWW-Authenticate header it supports, where the algorithm is AKAv2-SHA-256 or AKAv1-MD5 (IMS AKA). IMS AKA gives mutual authentication between the ISIM and the home network, and the HSS and the ISIM share a long-term key tied to the private user identity.&lt;/p&gt;

&lt;p&gt;Why does the IMS side look familiar to anyone who has launched VoLTE? GSMA IR.51, the Wi-Fi profile, is based on the IMS voice and SMS profile IR.92 and points to IR.92 for call establishment and termination. IR.92 identifies the minimum mandatory set of 3GPP features a phone and the network must implement for interoperable IMS-based telephony over LTE radio access. The IMS architecture adds the access-specific concepts for IMS over untrusted WLAN access to the EPC.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes for emergency calls, roaming and handover?
&lt;/h2&gt;

&lt;p&gt;Emergency calls come first. A phone may start an emergency session over WLAN access to the EPC only when 3GPP access for the emergency call is not possible or available, for example with no 3GPP coverage. Then it sets up an emergency PDN connection and performs an IMS emergency registration before the session request, and it includes any available location information. It also selects an ePDG that supports emergency services. Apple's guide says that enabling Wi-Fi Calling may ask the user to enter or confirm an address for emergency services.&lt;/p&gt;

&lt;p&gt;For handover, the PDN gateway is the user plane anchor for mobility between 3GPP and non-3GPP access. GSMA IR.51 requires a phone that supports untrusted access to support handover from LTE to Wi-Fi and from Wi-Fi to LTE as described in the 3GPP architecture. GSMA IR.51 says the phone keeps using the P-CSCF it selected when the IMS connection moves between the two.&lt;/p&gt;

&lt;p&gt;In a roaming case, the HSS and 3GPP AAA server in the home network make the final decision whether the Wi-Fi network is used as trusted or untrusted. A phone outside its home country that is not attached over 3GPP access performs a DNS query to learn whether the visited country mandates ePDG selection in that country.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does our Stingray ePDG cover on this path?
&lt;/h2&gt;

&lt;p&gt;Stingray ePDG lets an operator or MVNO launch Wi-Fi Calling (VoWiFi), voice and SMS over Wi-Fi. Our ePDG authenticates subscribers by SIM with EAP-AKA, consistent with 3GPP standards, and supports IPsec/IKEv2 with a dedicated tunnel per PDN session. Our ePDG works with the packet-switched core (EPC/5GC) and the IMS subsystem rather than with base stations. It is meant for areas with no 2G, 3G or LTE coverage at all, for example rural households, remote farms, new neighborhoods and large buildings with weak indoor signal. Our ePDG also supports handover between Wi-Fi and LTE, lets the operator choose whether subscribers connect to specific Wi-Fi hotspots or choose themselves, and supports emergency services.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check in a lab before launch
&lt;/h2&gt;

&lt;p&gt;The starting set of checks was derived from the steps of the call path; it is a starting point, not a requirement of the standard.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Name resolution. From a Wi-Fi network outside the operator, resolve the ePDG name built from the home MCC and MNC. Check that the answer has the same IP version as the phone's local address.&lt;/li&gt;
&lt;li&gt;Authentication, positive and negative. Run the IKEv2 tunnel setup with a test SIM and EAP-AKA. Then trigger a rejection and watch it. If the ePDG of the home network rejects the tunnel in IKE_AUTH with a cause such as USER_UNKNOWN or AUTHORIZATION_REJECTED, the phone closes the IKEv2 state. It does not retry an ePDG of the same PLMN until it is switched off or the USIM is removed.&lt;/li&gt;
&lt;li&gt;Core attach. Confirm that the gateway is selected as configured (DNS-based for initial attach, AAA-provided PGW identity on handover), and that the phone gets its address in the CFG_REPLY. Then check whether the P-CSCF addresses arrive in the same response.&lt;/li&gt;
&lt;li&gt;IMS registration. Watch the REGISTER, the 401 response and the IMS AKA step. Per GSMA IR.51, the IMS well-known APN gets its own tunnel; per TS 24.229, check that this tunnel stays up at least until deregistration.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;3GPP TS 23.402, TS 23.003, TS 23.228, TS 23.167, TS 24.302, TS 24.229, TS 29.273, TS 33.402, TS 33.203&lt;/li&gt;
&lt;li&gt;IETF RFC 7296, RFC 4072&lt;/li&gt;
&lt;li&gt;GSMA IR.51, IR.92&lt;/li&gt;
&lt;li&gt;Apple Support, Make a call with Wi-Fi Calling: &lt;a href="https://support.apple.com/108066" rel="noopener noreferrer"&gt;https://support.apple.com/108066&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;arXiv 2403.11759: &lt;a href="https://arxiv.org/abs/2403.11759" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2403.11759&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;VAS Experts, Stingray ePDG: &lt;a href="https://vasexperts.com/products/epdg/" rel="noopener noreferrer"&gt;https://vasexperts.com/products/epdg/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;VAS Experts blog, TWAG and ePDG in one solution: &lt;a href="https://vasexperts.com/blog/mobile-networks/twag-and-epdg-in-one-solution-trusted-and-untrusted-wi-fi-access-to-the-operator-core/" rel="noopener noreferrer"&gt;https://vasexperts.com/blog/mobile-networks/twag-and-epdg-in-one-solution-trusted-and-untrusted-wi-fi-access-to-the-operator-core/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>epdg</category>
      <category>ims</category>
      <category>telecom</category>
    </item>
    <item>
      <title>Local content zero-rating: keeping CDN traffic outside the data quota</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Thu, 19 Nov 2026 09:28:30 +0000</pubDate>
      <link>https://dev.to/vas_experts/local-content-zero-rating-keeping-cdn-traffic-outside-the-data-quota-3g7a</link>
      <guid>https://dev.to/vas_experts/local-content-zero-rating-keeping-cdn-traffic-outside-the-data-quota-3g7a</guid>
      <description>&lt;p&gt;Your tariff promises that video served from the operator's own cache does not touch the data package. Picture a subscriber who watches such video for an evening and then sees the main quota go down anyway. The network did not know the traffic was local, or it knew but counted it in the wrong place.&lt;/p&gt;

&lt;p&gt;This is a note for engineers and product owners at mobile operators (MNO) and virtual operators (MVNO) who build or check such a tariff. The standards give building blocks but no ready feature: they do not define zero-rating, and operators build it from charging keys and rules. This note gives a working scheme: how to recognize local traffic, where to count it and what to test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is excluding local and CDN traffic the same as zero-rating?
&lt;/h2&gt;

&lt;p&gt;BEREC (the body of European telecom regulators) defines zero-rating like this: an ISP applies a price of zero to the data traffic of a particular application or class of applications. That data does not count towards any data cap. By this definition the criterion is the application or a class of applications. In our reading, for local traffic the criterion is where the traffic comes from: a cache or a node inside the operator's network.&lt;/p&gt;

&lt;p&gt;Netflix and Google publish programs for placing caches inside ISP networks. By the description of Netflix Open Connect, appliances can be embedded inside an ISP network and are provided free to qualifying ISPs. The ISP configures BGP sessions with these appliances to steer traffic to them. Netflix names two parts of its program: embedded appliances and settlement-free interconnection (peering). Google's help page describes Google Global Cache as a way for ISPs to serve certain Google content from within their own networks.&lt;/p&gt;

&lt;p&gt;The Netflix page describes how traffic reaches the appliance, not how to count it. In this note, "local traffic" means traffic that the operator serves from caches and nodes inside its own network.&lt;/p&gt;

&lt;p&gt;For accounting, the task comes down to three results. The traffic is not deducted from the main bucket, or it is counted in a separate bucket, or its statistics go to billing under a special rule. A PCEF (Policy and Charging Enforcement Function, the element that applies charging rules to traffic) can apply such a separate policy to a selected service's traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the network know that a flow is local?
&lt;/h2&gt;

&lt;p&gt;There are three ways: by address and subnet, by service signature, and by domain. Each one matches something different, and each has a weak spot. In our view, the weak spots in the table are our own reasoning, not measurements.&lt;/p&gt;

&lt;p&gt;First, what the standard gives. By 3GPP, a PCC (Policy and Charging Control) rule contains either a list of flow filters or an application identifier, and a charging key when the rule charges. Detection of the application is another matter. In TS 23.203 that logic is not standardized. It is entirely internal to a TDF (Traffic Detection Function) or to a PCEF enhanced with ADC (Application Detection and Control). Put simply, the standard does not define the detection logic itself; it is left to the implementation. Since Release 14, TS 23.203 does standardize how detection inputs, packet flow descriptions such as a server 3-tuple, a URL or a domain name, are provided to the PCEF or TDF via the PFDF (Packet Flow Description Function).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;What is matched&lt;/th&gt;
&lt;th&gt;What the standard says&lt;/th&gt;
&lt;th&gt;Weak spot&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Address and subnet&lt;/td&gt;
&lt;td&gt;Prefixes of the caches and nodes, as flow filters&lt;/td&gt;
&lt;td&gt;A rule holds a list of flow filters; the one zero-rating example in TS 23.203, clause 4.2.3 (EXAMPLE 4), uses a port and address filter from the subnet of the operator's DNS nodes&lt;/td&gt;
&lt;td&gt;An address list needs constant updating; every change in cache prefixes must reach the rule. A cache node may serve more than the promised content: Google Global Cache serves “certain Google content”, not only video, so an address match zero-rates all of it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service by signature&lt;/td&gt;
&lt;td&gt;The type of traffic, recognized by the application detection logic&lt;/td&gt;
&lt;td&gt;The rule can carry an application identifier; the detection logic is internal to the implementation&lt;/td&gt;
&lt;td&gt;A signature tells which service the flow belongs to, not which server delivered it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Domain&lt;/td&gt;
&lt;td&gt;The domain name against the TLS SNI extension when available, then the certificate's Subject Alternative Name, then the Common Name&lt;/td&gt;
&lt;td&gt;Informative Annex X of TS 23.203, described for sponsored services; IP address ranges are checked first&lt;/td&gt;
&lt;td&gt;The annex assumes an agreement between the operator and the content provider, and HTTPS with Web PKI; where the name is not visible, for example with TLS Encrypted Client Hello, the method has nothing to match&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Annex X belongs to the standard and describes no particular product. Read its assumptions before you rely on it: if the IP ranges equal "Any", any traffic is said to be compliant. So Annex X does not say that SNI identifies the application in general: it holds only under these assumptions.&lt;/p&gt;

&lt;p&gt;Encryption narrows the choice further. A DPI platform cannot read the encrypted payload, so it relies on unencrypted metadata and behavioral and heuristic analysis. For a tariff, the lab has to show what your equipment sees on your own traffic.&lt;/p&gt;

&lt;p&gt;In practice the three methods work together. An address list is simple and precise while the list is fresh. A signature does not depend on addresses but names a service, not a server. A domain helps where the name is visible. The mix is the operator's design decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does the excluded traffic go in the accounting?
&lt;/h2&gt;

&lt;p&gt;Into a bucket with its own key. In 3GPP TS 23.203 a PCC rule can mark a service data flow as not subject to any end user charging, and then it carries no charging key. Rules that do charge share a charging key as the reference to the tariff. On the wire the charging key is carried as Rating-Group on Gx and Gy. RFC 8506 (Diameter Credit-Control) defines a rating group as the identifier that groups services subject to the same rating type.&lt;/p&gt;

&lt;p&gt;This gives two designs. In the first, the rule carries no charging key. In the second, a flow in its own rating group is reported on its own. In Diameter credit control, one Multiple-Services-Credit-Control block carries the granted units, the used units and the rating group. From this structure, usage can be reported per rating group on Gy.&lt;/p&gt;

&lt;p&gt;Here only the bucket matters. Prices and tariff structure stay with the operator.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should you check in the lab?
&lt;/h2&gt;

&lt;p&gt;If you build the scenario yourself, we suggest six checks. In our test lab we check charging-exemption scenarios: specific application categories, for example messengers or navigation, must not consume the main data package. The PCEF brochure lists quota exhaustion and charging exceptions among the scenarios to test on the operator's own cases.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The cache subnet reaches the rule. Send traffic from a cache address and check that the flow matches the exclusion rule and that the main bucket counters stay still.&lt;/li&gt;
&lt;li&gt;The service is recognized and lands in its own bucket. Generate traffic of the service and check that the usage appears under the exclusion's rating group in the Gy report, not under the main one.&lt;/li&gt;
&lt;li&gt;The main bucket is exhausted and the excluded category still works. Run the main bucket down to zero, then repeat checks 1 and 2. Ordinary traffic must follow the tariff's rule for exhausted quota, the excluded category must not.&lt;/li&gt;
&lt;li&gt;A list or signature update does not break the rule. Change the address list or load a new signature set while a session is open, and check that the rule keeps matching and the counters do not move to the main bucket.&lt;/li&gt;
&lt;li&gt;Tethering does not move the flow to another bucket. Repeat check 2 from a device that shares its connection and check that the usage stays under the exclusion’s rating group.&lt;/li&gt;
&lt;li&gt;The exclusion survives an OCS (online charging system) outage. Make the OCS unreachable while the session uses a local quota and check that the excluded traffic still does not consume it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In our experience, a rule that passes checks 1 to 3 can still fail after an update of the address list or signatures.&lt;/p&gt;

&lt;h2&gt;
  
  
  How our PCEF handles zero-rating
&lt;/h2&gt;

&lt;p&gt;In our experience, a common mistake in tariffs that zero-rate third-party services, such as messengers or video platforms, is to recognize them by an IP address list instead of signatures. The provider’s addresses change, the list ages, and traffic starts to be charged against the package despite the promise to the customer. For the operator’s own caches it is the other way round: their addresses are stable and under the operator’s control, so an address or AS list is a valid criterion.&lt;/p&gt;

&lt;p&gt;Our PCEF recognizes a third-party service such as a messenger or a video platform primarily by traffic signatures in Stingray Service Gateway rather than by an IP address list. Where the criterion is the source, such as the operator’s own caches, the traffic can be defined as a custom protocol by IP, subnet or AS and mapped to its own rating group. It counts that traffic in its own bucket (rating group), and the OCS applies the zero rate to that rating group. Usage in this rating group is reported separately, so when the OCS rates it at zero, it does not reduce the main quota. Cloud protocols in Stingray Service Gateway are updated from VAS Cloud, by default once a day, so they do not wait for a manual list change. Built-in protocols are updated with the software version.&lt;/p&gt;

&lt;p&gt;Each traffic category goes into its own bucket with its own limit and unit of measurement. Quota exhaustion is handled per bucket, so an exhausted video package does not affect messengers. Buckets under online charging are synchronized with the OCS via Gy.&lt;/p&gt;

&lt;p&gt;Our PCEF brochure lists excluding local CDN traffic from the quota among its zero-rating scenarios.&lt;/p&gt;

&lt;p&gt;If you assemble this scenario on your own equipment, start with the six checks and run them on your real prefixes and your real services.&lt;/p&gt;

&lt;p&gt;Specifications: 3GPP TS 23.203 and TS 29.212, RFC 8506. Programs and definitions: &lt;a href="https://openconnect.netflix.com/en/" rel="noopener noreferrer"&gt;Netflix Open Connect&lt;/a&gt;, &lt;a href="https://support.google.com/interconnect/answer/9058809?hl=en" rel="noopener noreferrer"&gt;Google Global Cache&lt;/a&gt;, &lt;a href="https://www.berec.europa.eu/en/what-is-zero-rating" rel="noopener noreferrer"&gt;BEREC: what is zero-rating&lt;/a&gt;. More about our PCEF: &lt;a href="https://vasexperts.com/products/pcef-policy-and-charging-enforcement-function/" rel="noopener noreferrer"&gt;vasexperts.com/products/pcef-policy-and-charging-enforcement-function&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>telecom</category>
      <category>networking</category>
      <category>billing</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Telecom Core Network Software: The Key Components Every Mobile Operator Needs and Where to Start</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:48:35 +0000</pubDate>
      <link>https://dev.to/vas_experts/telecom-core-network-software-the-key-components-every-mobile-operator-needs-and-where-to-start-1gj6</link>
      <guid>https://dev.to/vas_experts/telecom-core-network-software-the-key-components-every-mobile-operator-needs-and-where-to-start-1gj6</guid>
      <description>&lt;p&gt;You open a vendor list for core network software and meet a wall of acronyms: HSS, MME, PGW, PCRF, ePDG and more. Which ones do you actually have to deal with? We walk through what each part of a mobile core does, how the standard relates it to the fifth-generation core, and what to settle before you talk to a vendor. Which of these functions you run yourself depends on your operator model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does telecom core network software do?
&lt;/h2&gt;

&lt;p&gt;In 4G, the Packet Data Network (PDN) Gateway is the point where the mobile core meets the outside network. It allocates user equipment (UE) IP addresses and takes part in policy and charging control. In the Evolved Packet Core (EPC), the Mobility Management Entity (MME) handles non-access stratum (NAS) signalling. The S6a reference point links the MME and the Home Subscriber Server (HSS) and carries subscription and authentication data.&lt;/p&gt;

&lt;p&gt;3GPP defines SGi as the reference point between the PDN Gateway and the packet data network. That network may be an operator external public or private network or an intra-operator network.&lt;/p&gt;

&lt;p&gt;3GPP specifies the split of the gateway functions into control plane and user plane in TS 23.214. The specification covers the control and user plane separation of the Serving Gateway and the PDN Gateway, and it lets you place the control plane and the user plane separately.&lt;/p&gt;

&lt;p&gt;As we describe in our &lt;a href="https://vasexperts.com/blog/mobile-networks/mobile-operator-test-lab-for-core-network-testing/" rel="noopener noreferrer"&gt;test lab write-up&lt;/a&gt;, the mobile core is an infrastructure where all components are tightly interconnected. A change to a tariff plan can affect how the network processes subscriber traffic. When you look at one function, look at its neighbours too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which components does a 4G mobile core need?
&lt;/h2&gt;

&lt;p&gt;In the 3GPP architecture, a 4G core has these functions. The Home Subscriber Server (HSS) holds subscriber data and the Mobility Management Entity (MME) handles NAS signalling. The Serving Gateway (SGW) and PDN Gateway (PGW) are the gateways for user traffic. The Policy and Charging Rules Function (PCRF) and Policy and Charging Enforcement Function (PCEF) handle policy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions of a 4G core in the 3GPP architecture&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;What it does under the 3GPP specifications&lt;/th&gt;
&lt;th&gt;Main reference points&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HSS&lt;/td&gt;
&lt;td&gt;Master database for a user: it holds the subscription-related information for the network entities that handle calls and sessions&lt;/td&gt;
&lt;td&gt;S6a to the MME&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MME&lt;/td&gt;
&lt;td&gt;NAS signalling, NAS signalling security and tracking area list management&lt;/td&gt;
&lt;td&gt;S6a, S11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Serving GW (SGW)&lt;/td&gt;
&lt;td&gt;Terminates the user plane interface towards the radio network; local mobility anchor for inter-eNodeB handover; routes and forwards packets&lt;/td&gt;
&lt;td&gt;S1-U, S11, S5 and S8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDN GW (PGW)&lt;/td&gt;
&lt;td&gt;Terminates SGi towards the packet data network; allocates the UE IP address; policy and charging control features involving the PCRF and the OCS&lt;/td&gt;
&lt;td&gt;SGi, S5 and S8, Gx&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PCRF&lt;/td&gt;
&lt;td&gt;Policy and charging control element; sends QoS policy and charging rules to the PCEF&lt;/td&gt;
&lt;td&gt;Gx&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PCEF&lt;/td&gt;
&lt;td&gt;Service data flow detection, policy enforcement and flow based charging&lt;/td&gt;
&lt;td&gt;Gx, Gy, Gz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Online Charging System (OCS) and Offline Charging System (OFCS)&lt;/td&gt;
&lt;td&gt;The OCS performs quota management and grants authorization before a resource is used; the OFCS collects charging events and generates records for downstream billing&lt;/td&gt;
&lt;td&gt;Gy to the OCS, Gz to the OFCS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In home-routed roaming, S8 connects the SGW in the visited network with the PGW in the home network. When the SGW and the PGW are in the same network, S5 connects them: without roaming, or in roaming with local breakout, where the PGW is in the visited network.&lt;/p&gt;

&lt;p&gt;Follow one phone as it joins the network. The MME handles NAS signalling and talks to the HSS over S6a, which carries subscription and authentication data. The data session runs through the SGW and the PGW, and the PGW allocates the IP address of the UE. For policy, the PCRF sends quality of service (QoS) rules and charging rules over Gx to the PCEF in the PGW, and the PCEF applies them.&lt;/p&gt;

&lt;p&gt;The PGW and the SGW may be implemented in one physical node or in separate nodes. Our test lab uses classic EPC with plane separation by the Control and User Plane Separation (CUPS) model, built from the MME, the HSS, the SGW and the PGW with the PCEF. Use the table as a map of the functions in a 4G core.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an operator add for voice and Wi-Fi?
&lt;/h2&gt;

&lt;p&gt;Voice and Wi-Fi rely on functions around the core. Voice over LTE runs on the IP Multimedia Subsystem (IMS). GSMA IR.92, the IMS Profile for Voice and SMS, defines a minimum mandatory set of 3GPP features for IMS-based telephony and for IMS-based and SGs-based SMS over LTE. Wi-Fi access relies on an evolved Packet Data Gateway (ePDG) for untrusted access or a Trusted WLAN Access Gateway (TWAG) for a trusted WLAN.&lt;/p&gt;

&lt;p&gt;Wi-Fi has two paths. With untrusted access, the phone builds an IPsec tunnel to the ePDG, and the ePDG hands the session to the core over S2b. The SWu reference point between the phone and the ePDG supports handling of IPsec tunnels. With trusted access, the TWAG terminates S2a. It is a function of the trusted WLAN access network (TWAN). In our article, both gateways hand the subscriber over to the same core. We describe the two paths in our article on &lt;a href="https://vasexperts.com/blog/mobile-networks/twag-and-epdg-in-one-solution-trusted-and-untrusted-wi-fi-access-to-the-operator-core/" rel="noopener noreferrer"&gt;Wi-Fi access&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Who decides which path a network takes? In a non-roaming scenario, 3GPP leaves the choice to the home operator. Whether a non-3GPP IP access network is used as trusted or untrusted is not a characteristic of the access network. An operator typically makes that choice for Wi-Fi it controls. For your list, note which of the two Wi-Fi access types you plan to offer.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do the 4G functions map to the 5G core?
&lt;/h2&gt;

&lt;p&gt;For its policy references to the EPC policy standard TS 23.203, TS 23.503 states that the PCRF maps to the Policy Control Function (PCF) in the 5G core. It states that the PCEF maps to the combination of the Session Management Function (SMF) and the User Plane Function (UPF).&lt;/p&gt;

&lt;p&gt;For the PGW and the MME the specifications describe interworking. These are the combined PGW-C + SMF and UPF + PGW-U functions, and the optional N26 interface between the MME and the Access and Mobility Management Function (AMF).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Policy mappings that TS 23.503 states for its references to TS 23.203&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;4G function&lt;/th&gt;
&lt;th&gt;5G function or node&lt;/th&gt;
&lt;th&gt;What the specifications state&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PCRF&lt;/td&gt;
&lt;td&gt;PCF&lt;/td&gt;
&lt;td&gt;TS 23.503 states: the PCRF of TS 23.203 maps to the PCF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PCEF&lt;/td&gt;
&lt;td&gt;SMF and UPF&lt;/td&gt;
&lt;td&gt;TS 23.503 states: the PCEF of TS 23.203 maps to the combination of the SMF and the UPF&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In the 5G core, the PCF provides policy rules to control plane functions to enforce them. The SMF handles session management and UE IP address allocation, and the UPF is the external PDU session point of interconnect to the data network.&lt;/p&gt;

&lt;p&gt;One more term for 5G radio. EN-DC (E-UTRA-NR Dual Connectivity) connects the phone to one eNB as master node and one en-gNB as secondary node, and the eNB is connected to the EPC via S1. The 3GPP overview page adds that the Non-Stand Alone architecture, which uses the existing LTE and EPC, is also known as EN-DC.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do you start when you choose core network software?
&lt;/h2&gt;

&lt;p&gt;Start from what you already run and what you need: decide which functions you operate and list the interfaces they require. Then choose the generation and access types, agree how the core connects to billing and policy, and test on your own side.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Decide which functions you run yourself. A Light mobile virtual network operator (MVNO) works with a host operator that retains control of the network core; a Full MVNO deploys its own core.&lt;/li&gt;
&lt;li&gt;Write a list of the functions and interfaces you need, using the 4G core functions as a template, and mark the ones you already run and the ones you plan to buy.&lt;/li&gt;
&lt;li&gt;Choose the generation and the access types: the EPC for 4G, untrusted Wi-Fi through an ePDG or trusted Wi-Fi through a TWAG, voice as defined in the GSMA profile (IMS-based), and EN-DC if you add 5G radio on top of your EPC.&lt;/li&gt;
&lt;li&gt;Agree how the core connects to billing and policy. In our test lab, the PCEF needed detailed configuration of subscriber identifier formats, quota rules and other parameters to work with the PCRF and the OCS.&lt;/li&gt;
&lt;li&gt;Test on your own side. We offer to test our software on the operator's equipment, on a virtual machine or over VPN.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This order is a suggestion from our team, and step 4 is where our lab experience comes in. In our test lab, the PCEF communicates with the PCRF and the OCS over Diameter on the Gx and Gy interfaces. If your billing and policy systems come from other vendors, put their names and interfaces on your list before the first call.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should you check when you compare core network software vendors?
&lt;/h2&gt;

&lt;p&gt;Compare vendors against your own interface list. Ask which 3GPP interfaces the software terminates and how control and user plane are separated. Ask how it connects to billing and policy systems and whether it works next to the functions you keep.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions to ask a core network software vendor&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;th&gt;Question to ask&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Interfaces&lt;/td&gt;
&lt;td&gt;The functions talk over named reference points: S6a, S11, S5 and S8, SGi, Gx, Gy, Gz&lt;/td&gt;
&lt;td&gt;Which of these interfaces does your software terminate?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control and user plane&lt;/td&gt;
&lt;td&gt;The 3GPP split into control plane and user plane lets the two be placed separately&lt;/td&gt;
&lt;td&gt;Which functions are split, and how is a user plane node replaced?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing and policy&lt;/td&gt;
&lt;td&gt;The PCEF talks to the PCRF over Gx and to the OCS over Gy&lt;/td&gt;
&lt;td&gt;Which interfaces to the PCRF, OCS and OFCS does the software support, and in which test setups has it been run?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Functions you keep&lt;/td&gt;
&lt;td&gt;You may keep some functions where they are and replace others&lt;/td&gt;
&lt;td&gt;Can you buy one function, for example a gateway, and run it next to the others?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Testing&lt;/td&gt;
&lt;td&gt;A test on your side is the last step of the order we suggest&lt;/td&gt;
&lt;td&gt;Can we test on our own hardware, in a virtual machine or over VPN?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wi-Fi and voice&lt;/td&gt;
&lt;td&gt;Wi-Fi access relies on the ePDG for untrusted access and the TWAG for a trusted WLAN, and the GSMA profile for voice over LTE is IMS-based&lt;/td&gt;
&lt;td&gt;Which access gateways and which IMS interfaces does your software cover?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;We suggest checking these six points when you compare vendors. Add your own rows for the functions you keep, and use the list when you talk to us, too.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do we work with operators on the mobile core?
&lt;/h2&gt;

&lt;p&gt;An operator sends a request through the form on a product page. We contact the operator to specify the task, provide access to the documentation and answer questions.&lt;/p&gt;

&lt;p&gt;We build seven products for mobile networks: &lt;a href="https://vasexperts.com/products/pgw/" rel="noopener noreferrer"&gt;Stingray PGW&lt;/a&gt;, &lt;a href="https://vasexperts.com/products/epdg/" rel="noopener noreferrer"&gt;Stingray ePDG&lt;/a&gt;, &lt;a href="https://vasexperts.com/products/twag/" rel="noopener noreferrer"&gt;Stingray TWAG&lt;/a&gt;, &lt;a href="https://vasexperts.com/products/pcrf-proxy/" rel="noopener noreferrer"&gt;Stingray PCRF Proxy&lt;/a&gt;, &lt;a href="https://vasexperts.com/products/gtp-c-proxy/" rel="noopener noreferrer"&gt;Stingray GTP-C Proxy&lt;/a&gt;, &lt;a href="https://vasexperts.com/products/lbs/" rel="noopener noreferrer"&gt;LBS&lt;/a&gt; and &lt;a href="https://vasexperts.com/products/pcef-policy-and-charging-enforcement-function/" rel="noopener noreferrer"&gt;Stingray PCEF&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In our solution, the PCEF function runs as a separate module of Stingray Service Gateway. This is why we can also supply our PGW on its own: it then works with a PCEF made by other vendors. Stingray TWAG is a software gateway for mobile network operators and mobile virtual network operators. It lets them build a TWAN, a trusted Wi-Fi access network based on the 3GPP standard. Stingray GTP-C Proxy lets you combine PGWs from different vendors into shared pools.&lt;/p&gt;

&lt;p&gt;These products are separate pieces of mobile network software; this article describes the 3GPP functions, not our product set.&lt;/p&gt;

&lt;p&gt;Specifications used (3GPP Release 19): TS 23.002, TS 23.214 and TS 23.401.&lt;/p&gt;

&lt;p&gt;Also used: TS 23.203, TS 23.402, TS 23.501, TS 23.503, TS 32.240 and TS 37.340.&lt;/p&gt;

&lt;p&gt;Also used: GSMA IR.92.&lt;/p&gt;

</description>
      <category>telecom</category>
      <category>networking</category>
      <category>mobile</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Zero-Rating in Encrypted Traffic: How DPI on the PCEF Identifies an App and Applies a Tariff Policy</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Thu, 12 Nov 2026 05:35:53 +0000</pubDate>
      <link>https://dev.to/vas_experts/zero-rating-in-encrypted-traffic-how-dpi-on-the-pcef-identifies-an-app-and-applies-a-tariff-policy-4d0g</link>
      <guid>https://dev.to/vas_experts/zero-rating-in-encrypted-traffic-how-dpi-on-the-pcef-identifies-an-app-and-applies-a-tariff-policy-4d0g</guid>
      <description>&lt;p&gt;A messenger that does not eat into the data package sounds like a billing feature. In the network it is a chain of decisions on every flow: which application is this, which rule applies, which rating group takes the traffic, and what goes to billing. The payload of that flow is encrypted.&lt;/p&gt;

&lt;p&gt;BEREC defines zero-rating as an ISP applying "a price of zero to the data traffic associated with a particular application". The 3GPP specifications for policy and charging (TS 23.203, TS 29.212, TS 32.251, TS 32.299) do not define zero-rating as a feature. Operators build it from charging keys and rules, with application detection behind them. This post walks through those pieces and shows where DPI sits among them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four decisions on every flow
&lt;/h2&gt;

&lt;p&gt;Three functions take part. The PCEF (Policy and Charging Enforcement Function) applies rules to traffic. The PCRF (Policy and Charging Rules Function) decides which rules apply. The OCS (Online Charging System) keeps balances and controls the rating decisions.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;Where it happens&lt;/th&gt;
&lt;th&gt;What the standard says&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. Which application is this&lt;/td&gt;
&lt;td&gt;A PCEF enhanced with ADC (Application Detection and Control), or a TDF (Traffic Detection Function)&lt;/td&gt;
&lt;td&gt;The standard does not define how applications are detected; this is left to the implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. Which rule applies&lt;/td&gt;
&lt;td&gt;The PCRF sends a PCC rule to the PCEF over Gx&lt;/td&gt;
&lt;td&gt;The rule points to the detection filter with the TDF-Application-Identifier AVP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. Which rating group&lt;/td&gt;
&lt;td&gt;The charging key in the PCC rule&lt;/td&gt;
&lt;td&gt;TS 23.203: the charging key is the reference to the tariff. TS 29.212 writes it as "charging key (i.e. rating group)"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4. How it is rated and reported&lt;/td&gt;
&lt;td&gt;The PCEF and the OCS exchange credit control over Gy, per rating group&lt;/td&gt;
&lt;td&gt;The OCS controls the rating decisions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A PCC rule can be predefined on the PCEF or provisioned over Gx, so the four decisions do not always mean four messages. The standard leaves the first one to the implementation, and that is where DPI works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recognizing an app when the payload is encrypted
&lt;/h2&gt;

&lt;p&gt;DPI cannot read the encrypted payload, so it relies on unencrypted metadata and behavioral and heuristic analysis. No single method classifies all traffic, so the methods are combined.&lt;/p&gt;

&lt;p&gt;TS 23.203 (Release 20) gives one concrete example of matching a domain in encrypted traffic, in an informative annex written for sponsored services. A PCEF or TDF matches domain names against the TLS Server Name Indication (SNI) extension, when available, in the initial HTTPS handshake. If SNI is not available, it falls back to the Subject Alternative Name of the server certificate, and then to the Subject Common Name. IP address ranges are checked first. SNI itself is a field the client sends in the ClientHello at the start of the TLS handshake (RFC 6066). The annex is informative and does not describe zero-rating, and the verification logic stays implementation-specific. Where such a name is not available, DPI also has behavioral and heuristic analysis to work with.&lt;/p&gt;

&lt;p&gt;That example is separate from how our engine works. Stingray Service Gateway parses packets up to the 7th level of the OSI model instead of using only standard port numbers, and our DPI platform recognizes traffic by application and by domain. It combines traffic signatures with the domain name, IP addresses and the autonomous system (AS) of the server. The DPI takes the domain name from the SNI in TLS and in QUIC, from the name in the server certificate (CN) and from the Host field in HTTP. For example, when QUIC traffic carries no SNI, the DPI checks the AS. An IP address list alone is not enough: large services sit behind CDNs, their addresses change and are often shared with other sites. Such a list needs constant updating; otherwise the service’s traffic may start eating into the package despite the promise. Built-in signatures are updated together with the software version, which needs a restart of the DPI. Cloud signatures are loaded from VAS Cloud once a day, or more often if the contract says so; this needs active technical support and configured access to VAS Cloud. The operator adds its own signatures through the interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  From the detected app to a rating group
&lt;/h2&gt;

&lt;p&gt;On Gx the PCRF installs a PCC rule with a Charging-Rule-Definition AVP, carried in a Charging-Rule-Install AVP. A rule can also be predefined on the PCEF and only activated by name from the PCRF. The definition carries either Flow-Information or a TDF-Application-Identifier, and it can carry a Rating-Group. The Online and Offline AVPs switch the online or offline charging interface on or off for that rule.&lt;/p&gt;

&lt;p&gt;A simplified example. Field names come from TS 29.212; the values are invented for illustration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Charging-Rule-Definition ::= {
  Charging-Rule-Name          "chat-app-free"
  TDF-Application-Identifier  "chat-app"
  Rating-Group                2001
  Online                      ENABLE_ONLINE
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rating-Group is a Diameter AVP that contains the identifier of a rating group. It comes from RFC 8506 and TS 29.212 re-uses it. TS 32.299 (Release 19) says the Rating-Group AVP on the charging interface carries the charging key, so the same value that the rule carries on Gx goes into the credit-control requests on Gy. In this pattern the packet carries no "free" flag. The charging key refers to a tariff, and the rating decision stays with the charging system.&lt;/p&gt;

&lt;p&gt;The standard also has wording for traffic that is not charged at all. A PCC rule can say that the flow "is not subject to any end user charging", and then the rule carries no charging key. Our solution, described below, works differently: the traffic keeps its own rating group and is counted separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  How our PCEF does it
&lt;/h2&gt;

&lt;p&gt;Our PCEF is built on our own DPI engine. It supports tariffing at the level of application, traffic category and subscriber profile. For zero-rating, it recognizes a service such as a messenger or a video platform by traffic signatures combined with domain, IP and AS data, not only by an IP address list. The PCEF counts zero-rated traffic under its own rating group and reports it to the OCS over Gy; the zero price for that rating group is set in the OCS. In general, a PCEF can handle such traffic in one of three ways. It does not deduct the traffic from the main bucket, it counts it in a separate bucket, or it passes statistics to billing under a special rule. In our PCEF the main way is the second one.&lt;/p&gt;

&lt;p&gt;Each traffic category goes into its own bucket with its own limit and unit of measurement. When one bucket is exhausted, the others are not affected, so an exhausted video package does not touch messengers. All buckets are synchronized with the OCS over Gy. The rule logic for rating groups is defined through the PCRF or configured locally on the PCEF; the PCEF enforces it on traffic. Beyond zero-rating, the same PCEF supports plans split by service, time- and roaming-dependent rules, and daily and hourly promotions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing it in a lab
&lt;/h2&gt;

&lt;p&gt;In our test lab we run charging-exemption scenarios: specific application categories, for example messengers or navigation, must not consume the main data package. DPI identifies the traffic type, and the PCEF applies the charging rule to it.&lt;/p&gt;

&lt;p&gt;If you build the same scenario in your own lab, these three checks follow the chain:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make sure the application reference in the rule matches an application the DPI knows. In TS 29.212 this reference is the TDF-Application-Identifier; in our PCEF it is the DPI rule name.&lt;/li&gt;
&lt;li&gt;Compare the charging key in the Gx rule with the rating group in the Gy credit-control requests, and check that the rule's Online AVP enables the online charging interface.&lt;/li&gt;
&lt;li&gt;Exhaust the main bucket and send traffic of an exempt category that has its own rating group. Quota exhaustion is handled per bucket, so the exempt category should be unaffected.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where the tariff meets regulation
&lt;/h2&gt;

&lt;p&gt;Whether an operator may zero-rate a service depends on the rules of its market. BEREC notes that there are different types of zero-rating practices, and in the EU national regulators assess some of them against criteria in BEREC's guidelines. Check the local rules before you design the tariff.&lt;/p&gt;

&lt;p&gt;Specifications: 3GPP TS 23.203 and TS 29.212 (Release 20), TS 32.251 and TS 32.299 (Release 19), RFC 6066, RFC 8506. More about our PCEF: &lt;a href="https://vasexperts.com/products/pcef-policy-and-charging-enforcement-function/" rel="noopener noreferrer"&gt;vasexperts.com/products/pcef-policy-and-charging-enforcement-function&lt;/a&gt;. Other tariff scenarios on PCEF: &lt;a href="https://vasexperts.com/blog/mobile-networks/how-have-mobile-tariffs-changed-and-where-does-pcef-fit-in/" rel="noopener noreferrer"&gt;How have mobile tariffs changed, and where does PCEF fit in?&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dpi</category>
      <category>pcef</category>
      <category>app</category>
    </item>
    <item>
      <title>Fair Usage Policy on Mobile Data: What Happens to the Session When the Quota Runs Out and When It Resets</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Wed, 11 Nov 2026 12:49:06 +0000</pubDate>
      <link>https://dev.to/vas_experts/fair-usage-policy-on-mobile-data-what-happens-to-the-session-when-the-quota-runs-out-and-when-it-394c</link>
      <guid>https://dev.to/vas_experts/fair-usage-policy-on-mobile-data-what-happens-to-the-session-when-the-quota-runs-out-and-when-it-394c</guid>
      <description>&lt;p&gt;A subscriber uses up the data included in a plan. The connection does not drop. Pages still load, only slowly, or only the operator's top-up page opens. Behind that behavior is a fair usage policy (FUP) and three network functions that share the job of deciding what "out of quota" means.&lt;/p&gt;

&lt;p&gt;The term is used in different ways, so here is the meaning used below: a rule in the service terms that lowers speed or priority once a volume threshold is used up, while the session stays up. One operator's published terms (an edition from 2017) say that for plans with capped speed, after the monthly limit the speed is reduced to not less than 128 kbps until the first day of the next bill cycle. Another operator's page for one family package does not use the term FUP but follows the same pattern: after the package is used the speed drops to 64 kbps (the operator's own services and messengers stay unlimited), and the package renews every 30 days. The first resets on the calendar of the bill cycle, the second on the package's own 30-day clock.&lt;/p&gt;

&lt;p&gt;Two things matter to an engineer here: what happens to the session at the limit, and what brings the speed back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who counts, who decides, who enforces
&lt;/h2&gt;

&lt;p&gt;The Policy and Charging Enforcement Function (PCEF) handles the user traffic, applies rules to it and measures usage. The Policy and Charging Rules Function (PCRF) makes the policy decision. The Online Charging System (OCS) keeps subscriber balances and service volumes. Four interfaces tie them together, and one of them leads to the Offline Charging System (OFCS):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Interface&lt;/th&gt;
&lt;th&gt;Between&lt;/th&gt;
&lt;th&gt;What it carries&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gx&lt;/td&gt;
&lt;td&gt;PCEF and PCRF&lt;/td&gt;
&lt;td&gt;Policy and charging control (PCC) rules and quality of service (QoS) settings from the PCRF; events and usage reports from the PCEF. Diameter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gy&lt;/td&gt;
&lt;td&gt;PCEF and OCS&lt;/td&gt;
&lt;td&gt;Online credit control: quota grants and usage reports. Diameter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sy&lt;/td&gt;
&lt;td&gt;PCRF and OCS&lt;/td&gt;
&lt;td&gt;Policy counter statuses, from the OCS to the PCRF. Diameter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gz&lt;/td&gt;
&lt;td&gt;PCEF and OFCS&lt;/td&gt;
&lt;td&gt;Offline charging over Gz&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Gz belongs to offline charging and stays out of the rest of this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the quota is handed out
&lt;/h2&gt;

&lt;p&gt;Online charging works on credit, in portions. The OCS grants the PCEF a quota, and the PCEF counts traffic against it. When the granted units are spent or the Validity-Time (the time the grant stays valid) expires, the PCEF must send a new Credit-Control-Request to the OCS. That request reports how much was used, and the server deducts it and may reserve the next portion. RFC 4006 expects the client to ask well in advance of the end of the grant, to avoid an interruption of the service. 3GPP adds an optional threshold: the OCS sends it with the grant, and the client asks for a new quota when what is left falls below it, while traffic keeps flowing until the original quota is consumed.&lt;/p&gt;

&lt;p&gt;"Credit" does not have to mean money: TS 23.203 calls it an abstract measure of resources available to the user. Credit is managed per charging key, so a service that gets a key of its own gets a quota of its own.&lt;/p&gt;

&lt;p&gt;Gx and Gy follow the Diameter protocol. Gy uses the Diameter Credit-Control application: RFC 4006, since updated by RFC 8506.&lt;/p&gt;

&lt;h2&gt;
  
  
  The quota is used up
&lt;/h2&gt;

&lt;p&gt;The OCS can see this moment coming. With the last portion it can send a Final-Unit-Indication (FUI): this is the final grant, and here is what to do when it is gone. RFC 4006 defines three actions. TERMINATE ends the service session. REDIRECT sends the subscriber to a given address, for example a top-up portal. RESTRICT_ACCESS lets through only traffic that matches given filters and drops the rest. The 3GPP online charging specifications list TERMINATE and REDIRECT. TS 23.203 also lists pass-through, drop, a default action that the operator preconfigures on the PCEF, and redirect. So reaching the limit does not have to mean a block.&lt;/p&gt;

&lt;p&gt;In our PCEF deployments, what follows depends on whether the operator has the Sy interface between the OCS and the PCRF.&lt;/p&gt;

&lt;p&gt;With Sy. The PCRF subscribes to policy counter reports from the OCS while it has an active session of the subscriber. When the status of a counter changes, the OCS reports it in a Spending-Status-Notification-Request. The status is a label whose values the standard does not define; the OCS and the PCRF agree on them. The PCRF takes the status as input to its policy decision, for example to downgrade the QoS or to modify PCC rules. The standard fixes the channel and the input, and leaves the action to the operator. To change the speed at the PCEF, the PCRF has the Gx tools. A Re-Auth-Request can carry rules and QoS information. The QoS information holds a maximum bit rate for a rule or a bearer, or an APN aggregate maximum bit rate (APN-AMBR) for the non-GBR traffic of the access point. The standard does not say that a Sy notification is always followed by such a request.&lt;/p&gt;

&lt;p&gt;Without Sy. In our PCEF, part of Stingray Service Gateway, the PCRF gets no counter statuses from the OCS, and the PCEF acts on what the OCS sends over Gy. A grant that carries a FUI, or a Result-Code 4012 (DIAMETER_CREDIT_LIMIT_REACHED), is final: once it is used up, the PCEF requests no more quota for that rating group. If the FUI action is TERMINATE, or there is no FUI, the PCEF has the DPI stop serving the traffic. For the other actions it rebuilds the subscriber’s service profiles on the DPI without asking for new credit, for example to redirect the subscriber to a top-up portal or to let through only the allowed destinations.&lt;/p&gt;

&lt;p&gt;In the standard, without Sy the PCRF can still find out. If it set the Out of credit event trigger over Gx, the PCEF reports which rules ran out of credit and which termination action it applied.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the quota comes back
&lt;/h2&gt;

&lt;p&gt;Two common triggers restore it: a top-up and a reset at the end of the period. The way back depends on how the limit was set.&lt;/p&gt;

&lt;p&gt;A limit set through Gy (FUI). RFC 4006 describes this for REDIRECT and RESTRICT_ACCESS. After a successful top-up the server can send a Re-Auth-Request on Gy. The PCEF answers with an update request that has no used units in it. When new units arrive, all the restrictions set for the final-unit action must be removed. Support for this request is optional for the server. Without it the PCEF learns about the new quota at its next check: when the final units are consumed, the client does an intermediate interrogation, gets no units back, and repeats it when the Validity-Time of the restricted state expires. If a quota is available by then, for example after a top-up, the service continues as usual. If not, the outcome is the operator's policy: disconnect the subscriber or leave access to services that the credit-control server does not control. Our PCEF supports both paths. On a Re-Auth-Request over Gy it answers at once: it takes the usage report from the DPI and sends a CCR-U with the reason FORCED_REAUTHORISATION. When the Validity-Time expires it does the same on its own, with the reason VALIDITY_TIME. New grants apply to the session that is already open: the DPI updates the thresholds or the set of services. After a final grant the PCEF does not request new quota itself, so with a FUI the main path is the Re-Auth-Request.&lt;/p&gt;

&lt;p&gt;A limit set through Sy and Gx. The way back uses the same channel. By the Sy rules any change of a counter status is reported to the PCRF. A top-up or a reset that changes the status falls under the same rule. The PCRF then applies the action the operator has configured for the new status, for example lifting the speed limit.&lt;/p&gt;

&lt;p&gt;The reset itself. The standards say least about this part. The counter lives inside the OCS: TS 29.219 points to TS 32.296 for the internal OCS functions and leaves the provisioning of counters out of scope. TS 32.296 describes OCS operations such as setting a counter to a given value, which can be used to reset counters. TS 29.219 describes no procedure for the reset itself. What it does describe is the notification, and a way to announce a change in advance: the OCS can send pending statuses with an activation time. The specification's own example is a billing period that will expire at midnight, and a pending status becomes the current status at the PCRF when that time is reached.&lt;/p&gt;

&lt;p&gt;Put together, the standards define the pieces: the status notification, the pending status with an activation time, the new grant over Gy that lifts the final-unit restrictions, and the rules and QoS over Gx. The reset itself and the action of the PCRF are left to the OCS and the operator. The sequence described above is a reading of these pieces, not one procedure from the specifications. Our PCEF keeps no period counter of its own: it learns about a reset the same way as about a top-up, from a new grant over Gy, and applies it to the session that is already open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different tariffs for different traffic
&lt;/h2&gt;

&lt;p&gt;The credit-control side works per charging key, and that is how different traffic gets different tariff treatment. A PCC rule has a service data flow template, which is either a list of filters or an application identifier, and a charging key. The charging key is the reference to the tariff for the flow, and several rules can share one key. On Gx and Gy the key travels as the Rating-Group AVP.&lt;/p&gt;

&lt;p&gt;The standard puts application detection in a Traffic Detection Function (TDF) or in a PCEF enhanced with application detection and control. It does not define how applications are detected; this is left to the vendor's implementation. Our PCEF is built on our own deep packet inspection (DPI) engine, which identifies applications by more than port numbers.&lt;/p&gt;

&lt;p&gt;In real time the chain looks like this: the PCEF detects the application, matches the flow to a PCC rule, and the charging key of the rule tells the OCS which quota to debit and which tariff to rate the traffic by. The PCRF provisions the rules over Gx and can change them in a running session with a Re-Auth-Request.&lt;/p&gt;

&lt;p&gt;Zero-rating shows how this fits with a quota. Our PCEF recognizes a service such as a messenger or a video platform by the type of traffic. It counts that traffic in its own bucket (a rating group) and reports the bucket to billing separately, so zero-rated traffic does not reduce the main quota. The quota that runs out is the one tied to its own charging key; traffic under another key has credit of its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check on your own network
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Which counter drives the FUP, and which services or charging keys does it cover?&lt;/li&gt;
&lt;li&gt;Is Sy part of the design? If not, which node enforces the limit when the OCS sends a FUI?&lt;/li&gt;
&lt;li&gt;Which termination action is set per charging key, and what is the default action on the PCEF?&lt;/li&gt;
&lt;li&gt;If you redirect or restrict, do the top-up portal and the operator's own services stay reachable? The filters of REDIRECT and RESTRICT_ACCESS exist for this.&lt;/li&gt;
&lt;li&gt;Does the OCS send the re-authorization request after a top-up, or does the PCEF wait for Validity-Time?&lt;/li&gt;
&lt;li&gt;Does a session that was already open at the moment of the reset get its speed back, or only new sessions?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We build the PCEF function in Stingray Service Gateway at VAS Experts. Product details: &lt;a href="https://vasexperts.com/products/pcef-policy-and-charging-enforcement-function/" rel="noopener noreferrer"&gt;vasexperts.com/products/pcef&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Specifications used: 3GPP TS 23.203 (V20.1.0), TS 29.212 (V20.0.0), TS 29.219 (V19.0.0), TS 32.251 (V19.0.0), TS 32.296 (V19.0.0), TS 32.299 (V19.0.0); IETF RFC 4006 and RFC 8506.&lt;/p&gt;

</description>
      <category>mobiledata</category>
      <category>telecom</category>
      <category>fairusagepolicy</category>
    </item>
    <item>
      <title>Trusted Wi-Fi in an Operator Core: What a TWAN Contains and How It Reaches the PGW over S2a</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Wed, 11 Nov 2026 12:35:43 +0000</pubDate>
      <link>https://dev.to/vas_experts/trusted-wi-fi-in-an-operator-core-what-a-twan-contains-and-how-it-reaches-the-pgw-over-s2a-96j</link>
      <guid>https://dev.to/vas_experts/trusted-wi-fi-in-an-operator-core-what-a-twan-contains-and-how-it-reaches-the-pgw-over-s2a-96j</guid>
      <description>&lt;p&gt;A phone joins an operator's Wi-Fi and, in the modes that allow it, keeps its IP address when it moves between LTE and Wi-Fi. The 3GPP specifications describe two main ways to build that. One sends the phone through an IPsec tunnel to an ePDG (evolved Packet Data Gateway). The other treats the Wi-Fi network as a trusted access and connects it to the core directly. The second way is the trusted WLAN access network, or TWAN.&lt;/p&gt;

&lt;p&gt;A TWAN (Trusted WLAN Access Network) is a Wi-Fi access network that the operator uses as a trusted non-3GPP access to the EPC (Evolved Packet Core). The 3GPP functional model gives it three parts. The access points come first. A Trusted WLAN AAA Proxy (TWAP) talks to the authentication, authorization and accounting (AAA) server over STa. A Trusted WLAN Access Gateway (TWAG) talks to the packet data network (PDN) gateway (PGW) over S2a.&lt;/p&gt;

&lt;p&gt;The rest of this post goes through those parts, the interfaces around them, the order of events when a phone attaches, and how the roles split with the ePDG.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trusted is the operator's decision
&lt;/h2&gt;

&lt;p&gt;TS 23.402 says that whether a non-3GPP IP access network is used as trusted or untrusted is not a characteristic of the access network. In the non-roaming case the home operator decides. When the subscriber roams, the HSS/3GPP AAA server in the home network makes the final call and may take the visited network’s policy into account. The phone learns the result in one of two ways: during SIM-based access authentication, or from a policy configured on the phone itself. One network cannot be trusted for one PDN and untrusted for another. The same trust relationship applies to every PDN the phone reaches through it.&lt;/p&gt;

&lt;p&gt;So "trusted Wi-Fi" below means Wi-Fi that the operator uses as a trusted non-3GPP access. It then connects to the EPC over STa and S2a.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is inside a TWAN
&lt;/h2&gt;

&lt;p&gt;The specifications assume three functions and leave the split to the implementation. They can sit in one box or in several.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Terminates&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;WLAN access network&lt;/td&gt;
&lt;td&gt;SWw, towards the phone&lt;/td&gt;
&lt;td&gt;The access points. The radio layers are IEEE 802.11 and out of 3GPP scope&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TWAP (Trusted WLAN AAA Proxy)&lt;/td&gt;
&lt;td&gt;STa, towards the 3GPP AAA server or proxy&lt;/td&gt;
&lt;td&gt;Relays AAA messages, binds the subscriber's International Mobile Subscriber Identity (IMSI) to the phone's MAC address, reports layer-2 detach events to the TWAG, and attach events too when layer-2 attach triggers are used, hands the TWAG the subscription data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TWAG (Trusted WLAN Access Gateway)&lt;/td&gt;
&lt;td&gt;S2a, towards the PGW&lt;/td&gt;
&lt;td&gt;Forwards packets between the point-to-point link to the phone and the S2a tunnel of that phone, matched by the phone's MAC address (in Multi-Connection mode, by a TWAG MAC address assigned to each PDN connection, or to each S2a bearer when a connection has several)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The AAA side and the tunnel side are two separate jobs with two separate functions. The TWAP faces the AAA server, the TWAG faces the PGW. The authentication itself runs between the phone and the AAA server, which is the EAP server, and the authenticator sits in the TWAN.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interfaces around the TWAN
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Interface&lt;/th&gt;
&lt;th&gt;Between&lt;/th&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;What it carries&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SWw&lt;/td&gt;
&lt;td&gt;Phone and WLAN access network&lt;/td&gt;
&lt;td&gt;IEEE 802.11 with Extensible Authentication Protocol (EAP) and EAP-AKA'&lt;/td&gt;
&lt;td&gt;Access, SIM-based authentication; WLAN Control Protocol (WLCP) in Multi-Connection mode, explained below&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STa&lt;/td&gt;
&lt;td&gt;TWAP and 3GPP AAA server or proxy&lt;/td&gt;
&lt;td&gt;Diameter&lt;/td&gt;
&lt;td&gt;Access authentication, authorization, mobility parameters, charging-related information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S2a&lt;/td&gt;
&lt;td&gt;TWAG and PGW&lt;/td&gt;
&lt;td&gt;GPRS Tunnelling Protocol (GTP) based or Proxy Mobile IPv6 (PMIPv6) based, chosen by the TWAN&lt;/td&gt;
&lt;td&gt;Tunnel for the user plane and its control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S6b&lt;/td&gt;
&lt;td&gt;PGW and 3GPP AAA server or proxy&lt;/td&gt;
&lt;td&gt;Diameter&lt;/td&gt;
&lt;td&gt;The PGW reports its identity, the Access Point Name (APN) of the session and the S2a variant in use (GTP or PMIPv6)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gx&lt;/td&gt;
&lt;td&gt;PGW and Policy and Charging Rules Function (PCRF)&lt;/td&gt;
&lt;td&gt;Diameter&lt;/td&gt;
&lt;td&gt;Policy and Charging Control (PCC) rules and event triggers for the session&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;With the GTP variant, S2a control signalling is GTP-C (TS 29.274) and user data goes in GTP-U (TS 29.281), both over UDP.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a phone gets in
&lt;/h2&gt;

&lt;p&gt;This is the recommended attach for GTP-based S2a in Single-Connection mode. It is a scheme from the 3GPP standard: TS 23.402, clause 16.2.1, scenario A.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The phone associates with an access point and starts EAP authentication with EAP-AKA'. The TWAN passes the EAP messages to the AAA server and tells it which connection modes it supports.&lt;/li&gt;
&lt;li&gt;The AAA server runs the SIM-based authentication as EAP server and returns the subscription data, including the allowed APNs. The TWAP then sends the TWAG a layer-2 attach trigger with the phone's MAC address and IMSI. The EAP success message to the phone is held back.&lt;/li&gt;
&lt;li&gt;The TWAN picks the S2a variant (GTP in this walk-through) and the PGW for the APN.&lt;/li&gt;
&lt;li&gt;The TWAN sends a Create Session Request to the PGW.&lt;/li&gt;
&lt;li&gt;The PGW opens an IP Connectivity Access Network (IP-CAN) session with the PCRF over Gx and receives PCC rules and event triggers.&lt;/li&gt;
&lt;li&gt;The PGW tells the AAA server its identity, the APN and the S2a variant it uses over S6b. The AAA server registers the PGW identity with the Home Subscriber Server (HSS).&lt;/li&gt;
&lt;li&gt;The PGW answers with a Create Session Response that carries the IP address allocated to the phone. The GTP tunnel is up.&lt;/li&gt;
&lt;li&gt;The TWAN reports the result of the tunnel setup to the AAA server: the APN, the TWAG MAC address for user traffic, the accepted PDN type and the PDN address. The AAA server passes these to the phone inside the EAP-AKA’ exchange, so in Single-Connection mode the phone receives its IPv4 address this way rather than over DHCP. The TWAN then sends the EAP success message, and the phone’s traffic flows through the S2a tunnel.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In Multi-Connection mode the attach works differently: PDN connections are set up over WLCP instead.&lt;/p&gt;

&lt;p&gt;SIM authentication here uses EAP-AKA'. EAP-SIM is not allowed for non-3GPP access in EPS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three modes of operation
&lt;/h2&gt;

&lt;p&gt;A TWAN can work in three modes, and the phone and the network agree on one inside the EAP-AKA' exchange. If the AAA server gives no mode information, or the phone asks for no mode, Transparent Single-Connection mode is used. The same happens when the phone and the network share neither of the other two modes, provided the network supports Transparent Single-Connection mode.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Handover between LTE and the TWAN with IP address kept&lt;/th&gt;
&lt;th&gt;Non-default APN&lt;/th&gt;
&lt;th&gt;Several PDN connections&lt;/th&gt;
&lt;th&gt;WLCP&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Transparent Single-Connection&lt;/td&gt;
&lt;td&gt;Not supported&lt;/td&gt;
&lt;td&gt;Not supported&lt;/td&gt;
&lt;td&gt;Not supported: the phone cannot request an additional PDN&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single-Connection&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;No: one PDN connection or offload at a time&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-Connection&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In Multi-Connection mode the phone and the TWAG exchange WLCP to create and release PDN connections, add bearers, hand connections over from 3GPP access and deliver the IPv4 address. WLCP is protected with Datagram Transport Layer Security (DTLS). The TWAG also hands out a separate MAC address for each PDN connection, and for each additional S2a bearer where needed, so that the phone and the TWAG can tell the point-to-point links apart.&lt;/p&gt;

&lt;p&gt;A TWAN can also serve a phone without going through the core at all. With NSWO, the offload path the standard defines for flows that skip the EPC, the phone sends chosen IP flows straight out of the WLAN using a local IP address. Nothing is anchored in the PGW and no address is kept when the phone moves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the IP address comes from
&lt;/h2&gt;

&lt;p&gt;The IP address of a phone's PDN connection comes from the PGW. In Single-Connection and Multi-Connection modes it is allocated while the PDN connection is set up. In Transparent Single-Connection mode the TWAN acts as the Dynamic Host Configuration Protocol (DHCP) server and hands out the address it received from the PGW. For IPv6 in Single-Connection and Multi-Connection modes, router advertisements come from the PGW with GTP-based S2a and from the TWAG with PMIPv6-based S2a. In Transparent Single-Connection mode the TWAN advertises the prefix it received from the PGW.&lt;/p&gt;

&lt;p&gt;The PGW is also the user plane anchor for mobility between 3GPP and non-3GPP access. In the modes that allow it, and when the phone asks for it, a session can keep its address when the phone moves between LTE and a TWAN.&lt;/p&gt;

&lt;h2&gt;
  
  
  TWAN and ePDG: two entries to the same PGW
&lt;/h2&gt;

&lt;p&gt;Both end at the PGW. They differ in what the operator decided about the access network in front of them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Trusted: TWAN&lt;/th&gt;
&lt;th&gt;Untrusted: ePDG&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Entry point to the core&lt;/td&gt;
&lt;td&gt;TWAG&lt;/td&gt;
&lt;td&gt;ePDG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phone to core&lt;/td&gt;
&lt;td&gt;No IPsec tunnel from the phone in the TWAN attach procedures; traffic on the air link may be protected as defined by IEEE 802.11, and the interfaces inside the TWAN must be integrity- and confidentiality-protected&lt;/td&gt;
&lt;td&gt;IPsec tunnel from the phone to the ePDG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Link to the AAA server&lt;/td&gt;
&lt;td&gt;STa, ended by the TWAP&lt;/td&gt;
&lt;td&gt;SWm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Link to the PGW&lt;/td&gt;
&lt;td&gt;S2a&lt;/td&gt;
&lt;td&gt;S2b&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The trust decision and the choice of entry point go together. NSWO is a different thing: it is not an entry to the core. The phone sends chosen flows straight out of the WLAN, and a TWAN can allow it next to EPC access, for example in Multi-Connection mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check on your own network
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Who decides that a given network is trusted, and does the phone learn it through authentication or from a configured policy?&lt;/li&gt;
&lt;li&gt;Which connection modes does the TWAN offer? Handover between LTE and the TWAN with the address kept needs Single-Connection or Multi-Connection mode.&lt;/li&gt;
&lt;li&gt;Which S2a variant does the TWAN use, and does the PGW accept it on the address the TWAN selects?&lt;/li&gt;
&lt;li&gt;In Transparent Single-Connection mode, does the TWAN default APN differ from every APN the phone uses on LTE? The standard recommends that it does.&lt;/li&gt;
&lt;li&gt;If the TWAN default APN in Transparent Single-Connection mode is also used on LTE, what does the AAA server write to the HSS after a TWAN attach? The HSS should not be updated with the PGW identity selected for trusted WLAN, so it does not overwrite the one registered from LTE. The AAA server can be configured not to pass it on.&lt;/li&gt;
&lt;li&gt;In the same case, suppose both connections to that APN are active at the same time and the two sides pick different PGWs. The APN aggregate maximum bit rate (APN-AMBR) is then enforced in each, and the phone gets double the bandwidth for that APN. Is that intended?&lt;/li&gt;
&lt;li&gt;When subscribers roam, does the TWAN have STa to the phone's registered or home network? Roaming without it is not supported in Release 19.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We build Stingray TWAG, Stingray PGW and Stingray ePDG at VAS Experts. Stingray TWAG connects Wi-Fi networks to the operator core as a trusted access per 3GPP TS 23.402. One node combines the TWAP, which authenticates the subscriber by SIM through the operator's AAA server over STa, and the TWAG, which sets up the session on the PGW over S2a and takes policy rules from the PCRF over Gx. It works with an existing PGW, HSS and AAA server, so the core does not have to be replaced. Our Stingray PGW has an S2a interface for connecting trusted Wi-Fi networks (TWAN) and S6b: integration with authentication systems for non-3GPP network subscribers (S2a, S2b). Our Stingray ePDG brings in untrusted Wi-Fi. Product details: &lt;a href="https://vasexperts.com/products/pgw/" rel="noopener noreferrer"&gt;vasexperts.com/products/pgw&lt;/a&gt;, &lt;a href="https://vasexperts.com/products/epdg/" rel="noopener noreferrer"&gt;vasexperts.com/products/epdg&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Specifications used: 3GPP TS 23.402 (V19.0.0), TS 29.273 (V19.2.0), TS 33.402 (V19.0.0); TS 29.274, TS 29.281 and TS 24.244 as referenced from TS 23.402; TS 29.212 for Gx.&lt;/p&gt;

</description>
      <category>twan</category>
      <category>pgw</category>
      <category>wifi</category>
    </item>
    <item>
      <title>How to Launch Wi-Fi Calling (VoWiFi) on Your Network: an ePDG Deployment Guide for Mobile Operators</title>
      <dc:creator>VAS Experts</dc:creator>
      <pubDate>Mon, 19 Oct 2026 10:38:10 +0000</pubDate>
      <link>https://dev.to/vas_experts/how-to-launch-wi-fi-calling-vowifi-on-your-network-an-epdg-deployment-guide-for-mobile-operators-men</link>
      <guid>https://dev.to/vas_experts/how-to-launch-wi-fi-calling-vowifi-on-your-network-an-epdg-deployment-guide-for-mobile-operators-men</guid>
      <description>&lt;p&gt;Wi-Fi Calling (VoWiFi) gives subscribers voice and SMS on their own number over any Wi-Fi network, with no separate app. For an operator it fills coverage gaps (remote households, high-rise buildings, large offices and malls), and for an MVNO it can lower traffic costs. The node that makes it possible is the ePDG.&lt;/p&gt;

&lt;p&gt;This guide covers where to start, the order of work, and the integration points where an operator most often loses time. As a reference we use the MVNO Miatel, which in early 2025 became the first operator to launch Wi-Fi Calling commercially on VAS Experts' Stingray ePDG.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need before you deploy an ePDG
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;An IMS core.&lt;/strong&gt; VoWiFi, like VoLTE, is an IMS service. The ePDG gives secure access; the IMS core handles registration, call control and the voice service itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An EPC with a PGW that supports the S2b interface&lt;/strong&gt; towards the ePDG.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 3GPP AAA server and an HSS&lt;/strong&gt; to authenticate subscribers by SIM (EAP-AKA).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIM profiles you can update&lt;/strong&gt; with the IMS and ePDG settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A target device list:&lt;/strong&gt; the phone models you will support at launch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You do not need to finish VoLTE first, but many operators do. Both services have similar requirements for information systems and deployment processes, so experience from VoLTE makes the VoWiFi rollout easier. That was the order at Miatel.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the connection works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The phone connects to an available Wi-Fi network.&lt;/li&gt;
&lt;li&gt;It builds an IPsec tunnel to the ePDG using IKEv2. The tunnel is transparent to the local access point.&lt;/li&gt;
&lt;li&gt;The subscriber is authenticated by SIM against the operator's AAA server using EAP-AKA.&lt;/li&gt;
&lt;li&gt;Traffic enters the core through the PGW, much like an LTE session, and voice reaches the IMS core the same way a VoLTE call does.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In 3GPP terms the main reference points are SWu (phone to ePDG), SWm (ePDG to AAA) and S2b (ePDG to PGW). IMS signalling does not end on the ePDG: it travels through the tunnel and the PGW. That is why VoWiFi integration is a question about the whole chain, not about the gateway alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  A launch plan in seven steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set the scope.&lt;/strong&gt; MNO or MVNO, which devices, which Wi-Fi access policy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check core readiness.&lt;/strong&gt; IMS, PGW with S2b, AAA and HSS, and the policy and charging chain (PGW, PCRF).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deploy the ePDG in a lab and integrate it.&lt;/strong&gt; IKEv2/IPsec towards phones, EAP-AKA through AAA, S2b to the PGW. Test throughput and latency under encryption load early, because the node encrypts and decrypts every tunnel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agree on the ePDG domain and certificate.&lt;/strong&gt; Phones need to find the gateway and trust it. If the domain has to be issued by an outside party, file the request first and run it in parallel with everything else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure SIM profiles and phone carrier settings.&lt;/strong&gt; The SIM has to carry the correct IMS settings, including the ePDG domain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test on real phones.&lt;/strong&gt; Registration, a voice call, handover between Wi-Fi and LTE, and an emergency call, on every target model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pilot, then widen.&lt;/strong&gt; Launch to a limited group, then extend the device list and the subscriber base.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where integration most often goes wrong
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The IMS leg.&lt;/strong&gt; Registration and call setup cross the ePDG, the PGW and the IMS core. Test the full path, not only the gateway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIM and phone settings.&lt;/strong&gt; Carrier settings depend on the device. Some models take the new domain from the SIM without trouble, others need a different approach, so plan device-by-device testing and do not assume one profile fits all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain and certificate.&lt;/strong&gt; Both sit on the critical path of the first successful connection. Start them early.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handover.&lt;/strong&gt; A call must survive the move from Wi-Fi to LTE and back. Test it with real phones, in both directions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emergency calls.&lt;/strong&gt; The call does not use the cellular network, but the subscriber must still reach local emergency services. Agree on the behaviour with your regulator and test it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wi-Fi access policy.&lt;/strong&gt; Decide whether you restrict connections to specific hotspots or leave the choice to the subscriber.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy and charging.&lt;/strong&gt; VoWiFi is a separate traffic type. Check that it passes your policy and charging rules in the same way as LTE sessions do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encryption load.&lt;/strong&gt; Size the ePDG for the number of simultaneous tunnels you expect, using test results on your own traffic profile.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reference: a first commercial launch on an MVNO
&lt;/h2&gt;

&lt;p&gt;At Miatel, VoLTE came first, in response to customer requests, and Wi-Fi Calling followed. The ePDG was integrated into the operator's infrastructure, a knowledge base was built for scaling the service, and the specifics of VoWiFi on virtual operator networks were studied. The domain request, the SIM configuration and the device list set the pace of the project, more than the gateway did. Miatel keeps extending the list of supported devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  A checklist for your own launch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The IMS core, PGW (S2b), AAA and HSS are ready, and each integration has a named owner.&lt;/li&gt;
&lt;li&gt;The ePDG domain is agreed, and any outside request is filed and tracked weekly.&lt;/li&gt;
&lt;li&gt;The ePDG certificate is validated on real devices, not only in the lab.&lt;/li&gt;
&lt;li&gt;The SIM profile carries the ePDG domain and is tested on every target phone model.&lt;/li&gt;
&lt;li&gt;The device list is fixed, and each model has been through the full test: registration, call, handover, emergency call.&lt;/li&gt;
&lt;li&gt;The Wi-Fi access policy (restricted hotspots or free choice) is decided.&lt;/li&gt;
&lt;li&gt;VoWiFi traffic is covered by your policy and charging rules.&lt;/li&gt;
&lt;li&gt;The ePDG is sized for the expected number of simultaneous tunnels.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Plan a VoWiFi launch around the whole chain (IMS, PGW, AAA, SIM) and the device list, not around the gateway alone. The gateway is the part you can verify in a lab. The phones, the SIM settings and the integrations are where a real launch is decided.&lt;/p&gt;

&lt;p&gt;VAS Experts builds the Stingray ePDG for operators and MVNOs. Product details and datasheet: &lt;a href="https://vasexperts.com/products/epdg/" rel="noopener noreferrer"&gt;vasexperts.com/products/epdg&lt;/a&gt;. Reference launch: &lt;a href="https://vasexperts.com/blog/mobile-networks/implementation-of-epdg-from-vas-experts-in-mvno-miatel/" rel="noopener noreferrer"&gt;ePDG implementation at Miatel&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>telecom</category>
      <category>mobile</category>
      <category>voip</category>
      <category>networking</category>
    </item>
    <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>
