Skip to content

Independent core network laboratory

A mobile core you can attach to, roam in and call through.

Four networks with their own 4G and 5G cores, an IMS, borders between them and a software phone — real NAS, Diameter, GTPv2, PFCP, NGAP, SIP and HTTP/2 on every leg, written from the public specifications.

For engineers learning or working on the packet core, roaming and IMS: follow a scenario, open the console and run it, or read the specifications behind it.

An independent laboratory on test network codes (MCC 001) and the published test keys. Not a production network.

The lab in six stops · 5 minutes, narrated · captions available

4
Networks with their own nodes
24
Components, each a separate service
8
Protocols decoded byte by byte

Start here

Three ways in

What you can check

Four properties you can verify

  • Real protocols on every leg

    Network functions talk in encoded NAS, Diameter, GTPv2, PFCP, NGAP, SIP and HTTP/2, not in shortcuts. A wrong byte fails the procedure.

  • Every procedure names its specification

    Each message traces to a 3GPP technical specification or an RFC, clause by clause, listed on this page.

  • Every octet inspectable

    Each message of a run shows as a field tree beside its hex dump, and the whole run downloads as a capture file for a packet analyser.

  • Roaming between real networks

    Home, North, South and East each have their own nodes and borders. A roamer's traffic crosses Diameter edges, SEPPs and IMS border controllers.

TS 23.401 — 4G attach

A phone switches on, and the network decides to let it in

The phone's USIM proves itself, the MME sets up NAS security, checks the handset with the equipment register and builds a data session through the gateways. Each leg is a real message in its own protocol.

  1. 01 Attach

    NAS Attach Request with the IMSI, the UE's capabilities and a PDN connectivity request.

  2. 02 Vectors

    S6a Authentication-Information: the HSS computes MILENAGE vectors and KASME for the serving network.

  3. 03 Authenticate

    EPS AKA: the USIM checks AUTN and its sequence number, answers RES; the MME compares it with XRES.

  4. 04 Secure

    Security Mode Command under the new NAS keys. The phone answers, ciphered, with its IMEISV.

  5. 05 Check

    S13 ME Identity Check: the equipment register permits, tracks or prohibits the handset.

  6. 06 Session

    S6a Update-Location, then GTPv2 Create Session over S11 and S5: an address and a default bearer.

TS 23.501, TS 33.501 — 5G roaming

Registered in North, authenticated at home

A home subscriber registers in a partner network. Every request between the two networks goes through their SEPPs over N32, and the data session is home-routed through both user planes.

  1. 01 Conceal

    The phone sends a SUCI: its identity encrypted to the home network's key (ECIES profile A).

  2. 02 Cross

    North's AMF asks the home AUSF over N32: the SEPPs negotiate, then forward each HTTP/2 request.

  3. 03 Authenticate

    5G AKA at home: the UDM de-conceals the SUCI, the AUSF confirms RES* and hands back the anchor key.

  4. 04 Steer

    The home UDM may send a steering list, protected under the AUSF's key, that the phone checks before it trusts it.

  5. 05 Session

    A home-routed PDU session: V-SMF and H-SMF over N16, V-UPF and H-UPF over N9, each programmed in PFCP.

TS 23.228, TS 24.229 — IMS

A voice call, with a bearer of its own

The phone registers in IMS with its USIM, calls another lab phone, and the call is charged. Its audio gets a dedicated bearer, and a call to another network crosses both IMS borders.

  1. 01 Register

    SIP REGISTER with IMS AKA; the I-CSCF and S-CSCF ask the HSS over Cx.

  2. 02 Call

    INVITE through the S-CSCF; the callee's settings come from the HSS over Sh.

  3. 03 Charge

    Online charging over Ro: minutes reserved at the answer, reported at the hang-up.

  4. 04 Bearer

    Rx to the PCRF, Gx to the PGW-C, Create Bearer to the MME: a QCI 1 bearer the phone accepts in NAS.

  5. 05 5G

    On NR the PCF tells the SMF instead: a 5QI 1 QoS flow through the AMF and the gNB, or EPS fallback to LTE.

  6. 06 Border

    Between networks the IBCFs hide topology, screen through the signalling firewall and relay media through the TrGW.

  7. 07 Emergency

    112 goes to the E-CSCF and the lab's answering point, with no registration or credit needed.

TS 32.240, TS 32.298 — Charging

What a roamer used, and what each partner owes

The visited network records a roamer's sessions as it serves them, prices them and sends them home. The home network checks what it is charged, and the two settle.

  1. 01 Record

    The visited SGW-C and V-SMF report each roamer's session to their network's charging function, as ASN.1 charging records.

  2. 02 File

    Closed records are gathered into record files (TS 32.297).

  3. 03 Price

    A day's records are priced under the partners' tariff and sent to the home network in a transfer file.

  4. 04 Validate

    The home network checks each file, accepts it or returns it with a fault code, and watches near-real-time records for alarms.

  5. 05 Settle

    A monthly statement per pair of networks: accepted charges each way and the balance.

TS 23.682, TS 24.301 — Devices

Devices that sleep, and radios made for them

A device asks for power saving in its attach and the network grants what it allows. While it sleeps it hears nothing; the network knows when it will be reachable again.

  1. 01 Ask

    PSM timers T3324 and T3412 extended, and an eDRX cycle, in the Attach Request.

  2. 02 Grant

    The MME grants its own values in the Attach Accept and tracks the device's reachability.

  3. 03 Radio

    LTE-M and NB-IoT attach with their own RAT types in S6a and GTPv2; NB-IoT carries no IMS voice.

  4. 04 Restrict

    A subscription can bar a radio: the HSS refuses it and the MME rejects the attach.

Instruments

Every message, down to the byte

Each action in the console leaves a flow: every message every node exchanged, in order.

  • Flows

    One line per message, with source, destination and its decoded fields. Open a message and its bytes show as a field tree beside the hex dump; pick a field and its bytes light up. Diameter, GTPv2, PFCP, NAS for 4G and 5G, NGAP, SIP, DNS and HTTP/2 are decoded.

  • Capture download

    A whole flow downloads as a pcapng file with each message on its real transport and addresses, ready to open in Wireshark. Protected NAS comes with the plaintext the lab deciphered beside it.

  • Networks

    A map of the four networks: their nodes, realms and addresses, and the interfaces between them.

Try it

One console for the whole lab

Phones, lines, calls, messages, roaming, borders and every flow are in one console. Accounts are given on request, with access per section.

  • Phones

    A software phone with a software USIM: switch on over LTE, 5G or Wi-Fi, in any network, on LTE-M or NB-IoT, with power saving.

  • Lines

    Subscribers in the home HSS: identities, numbers, roaming settings and the radios a line may use.

  • Calls and messages

    Calls over LTE, 5G and Wi-Fi between lab phones, emergency calls, and SMS.

  • Roaming

    Partners, the SEPPs and N32, steering of roaming, and what each network accepts from the other.

  • Borders

    Diameter edge, IMS border with topology hiding, signalling firewall, and interconnect DNS.

  • Flows

    Every message of one action, in order, with a field tree and hex dump, and a capture file to download.

What is running

Named by their role in the standards

Grouped by where they sit in the network. Each one is a separate service; the phone and its USIM are software too.

Phone and radio

2

The device side, in software: a handset, its USIM and the base station it registers through.

  • Phone

    A software handset with a software USIM: attach, register, roam, call, text, sleep.

    • TS 24.301
    • TS 24.501
    • TS 31.102
    • IMS AKA
  • gNB

    The 5G base station, speaking NGAP to the AMF and carrying the phone's NAS inside it.

    • TS 38.413
    • N2
    • N3

4G core

4

Each network's EPC, with the home HSS and the equipment register behind it.

  • MME

    Attach, NAS security, the equipment check, power saving and dedicated bearers.

    • TS 24.301
    • S6a
    • S11
    • S13
  • SGW-C and PGW-C

    The 4G gateways: sessions, addresses, bearers, and S8 to a roamer's home network.

    • TS 29.274
    • S5/S8
    • Gx
  • HSS

    Subscriptions and keys: MILENAGE vectors for 4G, 5G and IMS, roaming settings, the radios a line may use.

    • S6a
    • Cx
    • Sh
    • SWx
    • TS 35.206
  • EIR

    Handset lists checked at every attach: permitted, tracked or prohibited.

    • S13
    • N5g-eir

5G core

7

The service-based core: network functions that find each other in the NRF and talk HTTP/2.

  • AMF

    Registration, SUCI, 5G AKA and NAS security; serves roamers in North.

    • TS 24.501
    • N1
    • N2
    • N8
    • N12
  • SMSF

    SMS over NAS for phones on 5G, on SGd to the SMS centre.

    • TS 29.540
    • N20
    • N21
    • SGd
  • SMF and UPF

    PDU sessions and their user-plane rules, home-routed for roamers over N16 and N9.

    • TS 29.244
    • N4
    • N9
    • N16
  • AUSF and UDM

    5G authentication, SUCI de-concealment and subscription data, behind the home SEPP.

    • TS 29.509
    • TS 29.503
    • TS 33.501
  • NRF

    Service registry and access tokens for every network function.

    • TS 29.510
    • OAuth 2.0
  • PCF

    Policy for sessions, and the PCRF that gives a call's audio its own bearer.

    • N7
    • Rx
    • Gx
    • S9
    • Sy
  • CHF

    Online charging of data and minutes.

    • Nchf
    • Gy
    • Ro

IMS and messaging

2

Voice and text on top of the packet core.

  • IMS core

    P-, I-, S- and E-CSCF and the application server: registration, calls, services, emergency calls.

    • TS 24.229
    • Cx
    • Sh
    • Ro
    • Rx
  • SMS centre

    Text messages between lab phones: over IMS, or over NAS through the MME or the SMSF.

    • TS 23.040
    • S6c
    • SGd

Between networks

7

What a roamer's traffic crosses, and what decides where it may go.

  • SEPP

    The 5G border: every request between two networks goes over N32.

    • TS 29.573
    • TS 33.501
  • Diameter edge

    Routes S6a and S9 between the 4G networks.

    • RFC 6733
    • S6a
    • S9
  • IMS border

    IBCF and TrGW: topology hiding, interconnection agreements and media relay between IMS networks.

    • TS 24.229
    • TS 23.228
  • Signalling firewall

    Screens Diameter and SIP arriving at the borders, and raises alarms.

    • Diameter
    • SIP
  • Interconnect DNS

    The root and each network's names: S-NAPTR gateway selection and ENUM.

    • TS 29.303
    • RFC 6116
  • Steering of roaming

    Which partner a roamer should prefer, sent to the phone protected.

    • TS 23.122
    • TS 33.501
  • Clearing

    Roamers' charging records, priced, exchanged and settled between partners.

    • TS 32.298
    • TS 32.297

Instruments

2

How you see inside all of it.

  • Flow store

    Every message of every action, in order, with its octets for a capture file.

    • pcapng

Provenance

Everything here comes from a document anyone can download

Each node was written from the published specification. Nothing derives from a proprietary or third-party implementation.

About

Why this exists

The core network is usually something you read about or operate, rarely something you can take apart. This laboratory is a core you can switch on, roam in and break, built on personal time from public documents.

A procedure is not understood until something you wrote makes the other side answer. Everything here exists because reading the specification was not enough.

Next step

Open the lab, or ask about any of it.

Questions on the packet core, roaming and IMS are welcome, as are requests for an account.