Metriczonemetriczone

THE SIMULATOR · SETUP AND OPERATING GUIDE

See inside a
5G mobile core.

Measure. Understand. Improve.

Real core functions. Simulated phones and a connected car factory.

Use the arrow keys or swipe to explore. Open the simulator alongside these slides for the hands-on demonstration.

01 · THE IDEA

Control establishes the path.
User data travels through it.

Control plane

Registration, authentication, security and session setup.

AMF · SMF · AUSF · UDM · other SBI functions

User plane

SMS-style text, chat, sensor readings and streaming packets.

UE tunnel → gNB → UPF → destination

Watch signalling activity fall while user packets continue. Separate control from forwarding.

02 · THE STACK

One laptop. A complete teaching lab.

Open5GS 2.7.7

11 core functions in separate containers. Capacity for 128 UE contexts.

UERANSIM 3.2.7

Phone demos, UE6 mobility and an optional factory with 70 UEs and two dedicated gNBs.

Python + browser

Tunnel-bound apps, NEF / AF, factory physics, logistics, capture and dashboard.

MongoDB stores subscribers. Open5GS WebUI edits them. Prometheus collects metrics. No physical radio equipment is required.

Images and presentation assets are prepared locally for offline use.

03 · THE SETUP

Follow the two paths.

SBI · HTTP/2 :7777NRF · SCP · AUSF · UDM · UDR · PCF · NSSF · BSF UEs 1–410.45.0.2–.5 gNB172.22.0.23 AMF172.22.0.20 SMF172.22.0.21 UPF172.22.0.22 App server172.23.0.10 radio sim N2 · NGAP / NAS N4 · PFCP N3 · GTP-U :2152 N6 · IP

UE-to-UE SMS: sender → gNB → UPF → gNB → recipient. The N6 app server is used for echo, IoT and streams.

04 · ADDRESSES AND IDENTITIES

A transport IP is not a phone's IP.

Network / identityConfigured valuePurpose
Docker core bridge172.22.0.0/24NF and simulated-radio transport
N6 application bridge172.23.0.0/24UPF .2 → app server .10
Subscriber data pool10.45.0.0/16UE1 .2 · UE2 .3 · UE3 .4 · UE4 .5
Subscriber identities001010000000001–005IMSI identifies each UE

PLMN 001/01 · TAC 1 · NCI 0x000000010 · SST 1 · DNN internet

05 · IDENTITY, SESSIONS AND FORWARDING

The central network functions.

AMF · .20

Registration, NAS security, access and mobility.

SMF · .21

Session setup and UPF control over PFCP.

UPF · .22

Tunnel and IP packet forwarding.

AUSF · .12

Subscriber authentication.

UDM · .13

Identity and subscription management.

UDR · .14

Persistent subscriber and policy data.

All addresses above are on 172.22.0.0/24. Hover any node for a role description and its pinned GitHub source / Docker image links.

06 · THE SERVICE-BASED CORE

Discovery, routing and policy.

NRF · .10

Network-function directory and discovery.

SCP · .11

Service-request proxy.

PCF · .15

Session policy decisions.

NSSF · .16

Network-slice selection.

BSF · .17

Policy binding information.

MongoDB · .2

Subscriber database on the core bridge.

SBI uses cleartext HTTP/2 on port 7777 in this lab. UPF association uses PFCP rather than NRF registration.

07 · START THE LAB

Start capture before core signalling.

Windows / Docker Desktop

.\start.ps1 -Factory -Mobility
# Prepared images, no builds or pulls:
.\start.ps1 -Factory -Mobility -Offline

Linux / Docker Engine

sudo modprobe sctp
bash start.sh --factory --mobility
# Prepared images, no builds or pulls:
bash start.sh --factory --mobility --offline

Omit Factory for the phone lab. Mobility enables the existing UE6 handover demo. Use Linux containers with SCTP and TUN support. Native Linux needs Compose 2.36+.

Factory startup creates a fresh, stopped run. Open the factory view, wait for 70/70 verified UE paths, then start.

08 · READ THE DASHBOARD

Measure what the network is doing.

1Hover a node: role, IP, identity and source.

2Click a phone: registration and session state.

3Follow dots and the coloured plane legend.

4Read the latest sequence and entity addresses.

5Compare UL/DL throughput and activity curves.

6Use narration to explain each exchange.

Dashboard localhost:8088 · Subscriber WebUI :9999 · Prometheus :9091

09 · CONTROL WHAT YOU SEE

Slow down signalling. Inspect one step.

ControlEffect
Real time · 1×Follow events at their recorded source timing.
Slow motion · 0.25×Display exchanges four times more slowly.
Pause / StepPause presentation of events, then reveal one event.
Plane checkboxesFilter the diagram by control, SBI, PFCP or user data.
Follow latestKeep the newest sequence row visible; untick to inspect history.

Playback delays the display while the live network and factory keep running. The factory's separate Simulation speed control selects 1× or 10× operation. Export latest saves the current sequence as Mermaid, PNG or SVG.

10 · JOIN THE NETWORK

Registration comes before data.

1Choose slow motion, then 1 · Power on UE1.

2Watch Registration Request → authentication → security setup.

3Registration Accept and Complete mark the phone registered.

Look at the sequence

UE identity, gNB and AMF addresses, RAN UE ID when captured, and SBI participants.

UE1 starts without a session

It joins the core first. The next scene establishes its user-data tunnel.

11 · CREATE THE DATA PATH

A PDU session connects the phone.

Open the new UE6 demo: Register new UE6 → Establish PDU session → Verify data path.

  1. UE asks for IPv4, SST 1 and DNN internet.
  2. AMF asks SMF to create the session and obtain subscriber policy.
  3. SMF programs the UPF using N4/PFCP on UDP 8805.
  4. Radio resources and the UE tunnel are set up; UE6 gets 10.45.0.7.
Choose Verify data path for a tunnel-bound echo, then watch N3 / N6 user traffic. Repeat Register new UE6 to start over.

12 · SEND A MESSAGE BETWEEN PHONES

SMS-style text, with a real receipt.

1Open the SMS panel and choose Connect phones.

2Select different UEs, write up to 160 characters and press Send SMS.

3Watch delivery and the reverse receipt in the sequence diagram.

4Filter the recipient's inbox; use ⇄ to send a reply.

UE1 tunnel→gNB / UPF→UE2 tunnel

UTF-8 text over UDP 9002, bound to each phone's tunnel. Delivery is shown after the receiving UE saves the message and returns its matching receipt. This is an application simulation of SMS, not native NAS/IMS SMS.

13 · DELIVERY READINESS

A tunnel IP alone is not enough.

Before each send

A short probe checks that the receiving phone can reply through the actual UE data path.

If radio context is stale

With a healthy UPF, active phones and the gNB reconnect once, then the path is checked again.

Reconnection can take tens of seconds and briefly interrupts other UE traffic. A deliberately unavailable UPF requires Recover UPF. Probe messages never enter SMS inboxes.

A delivery failure stays visible. Failed attempts are excluded from recipient inboxes. Retried IDs are deduplicated across receiver restarts.

14 · COMPARE TRAFFIC PROFILES

Different apps. The same user plane.

Phone / appBehaviorN6 service
UE1 · chatTyped text and an echo replyTCP 9000
UE2 · IoT sensorSmall JSON reading every 2 secondsUDP 9001
UE3 · streamAbout 2 Mbit/s downloadHTTP 8080
UE4 · streamAbout 4 Mbit/s downloadHTTP 8080
Bulk appiperf3 throughput testTCP 5201

Choose 4 · Traffic mix. UL is solid, DL dashed in the chart. User rates come from captured GTP-U bytes and packets, not the requested app rate.

15 · CHANGE UE4'S POLICY

Cap a 4 Mbit/s stream at 1 Mbit/s.

  1. Start the traffic mix and observe UE4's downlink.
  2. Choose 5 · Cap UE4 at 1 Mbit/s.
  3. The subscriber AMBR changes, its session is recreated, and the stream restarts.
  4. Compare measured throughput before and after; use Reset UE4 QoS to restore 10 Mbit/s AMBR.
This lab uses a supplemental Linux tc adapter on the UPF to enforce the configured limit. It is not a claim of stock Open5GS radio QoS enforcement.

16 · BREAK THE NETWORK AND RECOVER

Control health and data health differ.

6 · Wrong key

UE5 fails authentication and obtains no usable data session. Inspect the rejection in the sequence.

7 · Stop UPF

Chat and SMS delivery fail while AMF registration metrics can remain available.

1Choose 8 · Recover UPF.

2Wait for PFCP reassociation and rebuilt radio sessions.

3Send a fresh message and confirm its delivery receipt.

17 · NETWORK EXPOSURE

NEF at the application boundary

NEF lets an external Application Function subscribe to selected network information. The existing UE-to-UE SMS path works independently.

Metriczone AF172.24.0.10:8000External application network NEF teaching adapterCore 172.22.0.24Exposure 172.24.0.2:8000 Lab observer172.24.0.30:8000Real UE path checks SMS payload: sender UE → gNB → UPF → destination UE
Open5GS 2.7.7 supplies the core. This lab adds a teaching NEF with an observer endpoint; native Namf / Nudm event exposure is not implemented.

18 · A SMART-METER DEMO

Queue a command while the meter sleeps

Use UE1 as the sending phone and UE2 as the meter. Queue: “Report your latest meter reading.”

1Prepare offline meter checks both paths, then stops UE2.

2Subscribe & queue maps meter-ue2 to UE2. The SMS stays queued.

3Bring meter online restores its session and verifies readiness.

NEF calls the AF. The AF sends the queued SMS through UE1. UE2 saves it and returns a delivery receipt.

Open the NEF demo ↗ · Watch the three status cards, exposure events, SMS inbox and latest sequence.

19 · CALLBACKS AND DELIVERY

Three separate pieces of evidence

Availability

Running UE containers, tunnel addresses and a successful tunnel-bound round-trip readiness probe.

Notification

Authenticated callback with subscription and command IDs. Persistent retries; the AF accepts it once.

Delivery

Actual SMS receipt from the destination UE. A callback alone does not prove SMS delivery.

Subscriptions and the command queue persist in Docker volumes. An interrupted dispatch reuses the same message ID so the receiving app can suppress duplicates.

The sequence includes AF, NEF, observer and separate UEs, with addresses and IDs. Live demo status continues during pause; recorded events follow playback.

20 · FACTORY FLEET

A car factory with 70 connected devices.

Actual factory dashboard map showing parking, loading racks, ten assembly workcells, AGVs and two modeled coverage zones

20 AGVs

Pick up parts, deliver to stations and return to parking.

50 assembly robots

Five distinct operations per workcell. Ten sequential stages complete each car.

70 individual UEs

Each device has its own identity, container and PDU session.

Live map capture. Solid shapes show actual positions. Outlines show the latest positions received by logistics.

The main view stays on the 5G core. Its factory group opens the floor map and logistics terminal ↗.

21 · FACTORY DATA PATHS

Factory messages use each UE's tunnel.

AGV / robot UEAgent + uesimtun010.45.1.1 to .70 Factory gNBsCell A / Cell B Shared UPFReal forwarding Logistics on N6172.23.0.20:9010 Radio sim N3 N6 Central physical worldOwn sensors / actuators only Management input UDP: direct AGV position exchange, 10 HzTCP: acknowledged requests and delivery receiptsPeer traffic returns through the UPF to the receiving UE.
Agents learn peer positions and delivery instructions through the network. Tunnel loss prevents application traffic.

22 · PARTS AND PRODUCTION

Every delivery closes a parts request.

1. Robot requests

Its kit, quantity and arrival deadline depend on local inventory.

2. Logistics assigns

Reserve stock and a route. Select an available AGV.

3. Robot instructs

The robot sends the delivery request directly to that AGV.

4. AGV picks up

Confirm instructions with logistics, then load the reserved parts.

5. Robot receives

A stopped AGV delivers. The robot acknowledges receipt.

6. AGV returns

A fresh parked acknowledgement releases the trip reservation.

Stable IDs and SQLite keep retries from reserving stock or crediting a delivery twice.

23 · COLLISION AVOIDANCE

Stale information makes vehicles brake.

Received positions

AGVs exchange heading, velocity, route, timestamp and sequence number at 10 Hz.

Exclusive space

Logistics reserves conflicting route sections using received telemetry.

Safe stopping

Conflicting data older than 500 ms, expired permission or path loss triggers braking.

Default speed: 1.5 m/s in factory time. Physics steps: at most 50 ms. Safety includes braking space and uncertainty from message age.

The world records actual collisions. It does not move vehicles out of danger or reveal hidden peer positions.

24 · OPERATIONAL SPEED

One real minute, ten factory minutes.

What advancesNormal 1×Accelerated 10×
Factory time per real minute1 minute10 minutes
Movement, assembly and handlingNormal durationTen times faster
Minimum physics steps / real second20200
Position messages / real second1010
Stale-data cutoff in real time500 ms500 ms
Choose Simulation speed → Accelerated · 10× on the factory page. Switch rates without resetting the run.

Network timers, handovers and capture stay in real time. View pause and slow motion affect presentation. Real latency costs more factory time at 10×.

25 · FLEET MOBILITY

Two cells share the existing core.

Modeled coverage

Overlap, hysteresis and minimum dwell time trigger moves between two factory gNBs. Xn is the default. N2 is selectable.

Per-device continuity

One coordinator serializes transfers. Each result belongs to its own UE and records packet gaps, loss and TCP continuity.

Success requires captured signalling and a confirmed serving-cell change, with the UE process, IP, tunnel and logistics TCP connection preserved.

The map's cell zones are a simulation input. UERANSIM models radio transport over UDP.

26 · MEASURED RESULTS

Verified with all 70 factory UEs.

Live production runCarsDeliveriesCollisions
1×: 30 real minutes91010
10×: 3 real minutes9890

Complete fleet

Both runs used all 20 AGVs and 50 robots. The 10× run advanced 1,814 factory seconds.

Faults and replay

A 600 ms delay stopped a loaded AGV and retained its reservation. Replay preserved the recorded 10× rate.

Docker / WSL2, 14 October 2026. 84 Python and 6 JavaScript tests passed. These measurements describe the supplied 20/50 preset on this host.

27 · WHERE THE VISUALS COME FROM

Packets → events → explanations.

Packet capture

tshark decodes NAS/NGAP, SBI and PFCP; GTP-U flows are aggregated in 250 ms windows.

Backend

Normalizes and records events, adds NF metrics and publishes updates over WebSocket.

Dashboard

Topology, network sequences, charts, SMS history and factory snapshots.

Metrics are read from actual AMF / SMF / UPF endpoints. Missing native UPF counters are supplemented by measured capture counters. NF log fallbacks are labelled; inferred NAS radio hops are labelled too.

Sequence headers identify each UE separately. Control rows include RAN UE ID, PFCP SEID or HTTP/2 stream ID when available.

28 · THE OFFLINE SAFETY NET

Keep a recorded demonstration ready.

Every live event is saved to a timestamped JSONL recording. Replay runs without the core or a Docker control socket.

# PowerShell: run replay on a separate port
$env:DASHBOARD_PORT = '8089'
$env:REPLAY_FILE = 'recordings/sms-demo.jsonl'
docker compose -f docker-compose.replay.yml up -d --no-build --pull never

demo.jsonl: the complete demonstration.
sms-demo.jsonl: signalling, packets and SMS.
sms-messages.jsonl: just recorded SMS outcomes.
nef-demo.jsonl: NEF subscriptions, callback and SMS receipt.
Factory: choose a timestamped run containing factory snapshots.

Replay starts paused. Use Play / Step / Restart replay. Sending, factory speed and operational controls are disabled.

29 · A 12-MINUTE HANDS-ON RUN

Tell the story through actions.

TimeActionExplain
0–1 minCore, topology and node tooltipsFunctions, addresses and two planes
1–3 minSlow motion → Power on UE1Registration and authentication
3–4 minData session → real time → Hello 5GThe forwarding path is created
4–6 minConnect phones → SMS → replyUE-to-UE delivery and receipts
6–8 minTraffic mixProfiles and UL / DL measurements
8–9 minCap UE4Policy changes forwarding behavior
9–10 minWrong-key UE5Authentication failure
10–12 minStop UPF → fail → recover → sendRegistration does not guarantee delivery

30 · FACTORY WALKTHROUGH

Network behavior changes production.

TimeActionObserve
0–1 minCore factory group, then Start factory70 verified UE paths and distinct devices
1–2 minSelect 10× and inspect an AGVFaster factory clock, cargo and deliveries
2–3 minApply 600 ms delay, then clear itBraking, retained space and resumed work
3–4 minMove an AGV with Xn or N2Serving cell, signalling and TCP continuity
4–5 minPause the view, then play recorded snapshotsLive operation continues. Replay disables controls.
Open the factory demonstration ↗. Use Stop safely before Reset run.

31 · IF SOMETHING DOES NOT ARRIVE

Check the path, then the display.

Phone has no session

Choose Connect phones. UE5 is intentionally excluded.

UPF unavailable

Choose Recover UPF and wait for completion.

Interface exists, path fails

Sending reconnects stale radio sessions once and checks again.

Inbox looks delayed

Return to real time and press Play. Check the buffered-event count.

Old sequence row visible

Tick Follow latest. Scroll sideways to see all participants.

Capture is missing

Check the footer and probe logs. Start capture before core boot.

Failed SMS attempts remain visible in All phones; received inboxes show only delivered messages.

32 · INTERPRET THE MEASUREMENTS

Know what is observed and inferred.

  • Real Open5GS signalling and forwarding; simulated radio access.
  • NEA0 null ciphering keeps NAS readable for this teaching lab.
  • SMS is short-text over IP sessions, with recipient persistence and receipts.
  • NAS radio hops are inferred from core-side signalling.
  • QoS uses a supplemental shaping adapter; NEF uses a lab observer.
  • Playback affects the view. Factory Simulation speed changes operations at 1× or 10×.

33 · EXPLORE AND EXPERIMENT

Measure. Understand. Improve.

Open the Metriczone simulator ↗   Explore the factory ↗