Trusted Wi-Fi in an Operator Core: What a TWAN Contains and How It Reaches the PGW over S2a
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.
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.
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.
## Trusted is the operator's decision
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, and when the subscriber roams, the home AAA server makes the final call. 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.
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.
## What is inside a TWAN
The specifications assume three functions and leave the split to the implementation. They can sit in one box or in several.
Function | Terminates | What it does
---|---|---
WLAN access network | SWw, towards the phone | The access points. The radio layers are IEEE 802.11 and out of 3GPP scope
TWAP (Trusted WLAN AAA Proxy) | STa, towards the 3GPP AAA server or proxy | Relays AAA messages, binds the subscriber's International Mobile Subscriber Identity (IMSI) to the phone's MAC address, reports layer-2 attach and detach events to the TWAG, hands the TWAG the subscription data
TWAG (Trusted WLAN Access Gateway) | S2a, towards the PGW | 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 separate TWAG MAC address per PDN connection)
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.
## Interfaces around the TWAN
Interface | Between | Protocol | What it carries
---|---|---|---
SWw | Phone and WLAN access network | IEEE 802.11 with Extensible Authentication Protocol (EAP) and EAP-AKA' | Access, SIM-based authentication; WLAN Control Protocol (WLCP) in Multi-Connection mode, explained below
STa | TWAP and 3GPP AAA server or proxy | Diameter | Access authentication, authorization, mobility parameters, charging-related information
S2a | TWAG and PGW | GPRS Tunnelling Protocol (GTP) based or Proxy Mobile IPv6 (PMIPv6) based, chosen by the TWAN | Tunnel for the user plane and its control
S6b | PGW and 3GPP AAA server or proxy | Diameter | The PGW reports its identity and the Access Point Name (APN) of the session
Gx | PGW and Policy and Charging Rules Function (PCRF) | Diameter | Policy and Charging Control (PCC) rules and event triggers for the session
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.
## How a phone gets in
This is the recommended attach for GTP-based S2a in Single-Connection mode. The standard describes it in TS 23.402.
1. 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.
2. 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.
3. The TWAN picks the S2a variant (GTP in this walk-through) and the PGW for the APN.
4. The TWAN sends a Create Session Request to the PGW.
5. The PGW opens an IP Connectivity Access Network (IP-CAN) session with the PCRF over Gx and receives PCC rules and event triggers.
6. The PGW tells the AAA server its identity and the APN over S6b. The AAA server registers it with the Home Subscriber Server (HSS), with one exception covered in the checklist below.
7. The PGW answers with a Create Session Response that carries the IP address allocated to the phone. The GTP tunnel is up.
8. The EAP success message goes to the phone after the S2a tunnel is set up, and the phone's traffic flows through that tunnel.
In Multi-Connection mode the attach works differently: PDN connections are set up over WLCP instead.
SIM authentication here uses EAP-AKA'. EAP-SIM is not allowed for non-3GPP access in EPS.
## Three modes of operation
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 none, the TWAN falls back to Transparent Single-Connection mode.
Mode | Handover between LTE and the TWAN with IP address kept | Non-default APN | Several PDN connections | WLCP
---|---|---|---|---
Transparent Single-Connection | Not supported | Not supported | Not supported: the phone cannot request an additional PDN | No
Single-Connection | Supported | Supported | No: one PDN connection or offload at a time | No
Multi-Connection | Supported | Supported | Yes | Yes
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, so that the phone and the TWAG can tell the point-to-point links apart.
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.
## Where the IP address comes from
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.
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.
## TWAN and ePDG: two entries to the same PGW
Both end at the PGW. They differ in what the operator decided about the access network in front of them.
| Trusted: TWAN | Untrusted: ePDG
---|---|---
Entry point to the core | TWAG | ePDG
Phone to core | 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 | IPsec tunnel from the phone to the ePDG
Link to the AAA server | STa, ended by the TWAP | SWm
Link to the PGW | S2a | S2b
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.
## What to check on your own network
* Who decides that a given network is trusted, and does the phone learn it through authentication or from a configured policy?
* Which connection modes does the TWAN offer? Handover between LTE and the TWAN with the address kept needs Single-Connection or Multi-Connection mode.
* Which S2a variant does the TWAN use, and does the PGW accept it on the address the TWAN selects?
* 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.
* If both sides do use one APN, 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.
* 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?
* 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.
We build Stingray PGW and Stingray ePDG at VAS Experts. Our PGW has an S2a interface for connecting trusted Wi-Fi networks (TWAN) and S6b for integration with the authentication systems for non-3GPP subscribers. Our ePDG brings in untrusted Wi-Fi. Product details: vasexperts.com/products/pgw.
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.