Skip to content
Docs / dflux TinyCore
ContactGet started

Connect a gNB or RAN simulator

Attach a gNB or RAN simulator to the DMF over N2/SCTP and get past the NG Setup handshake.

How a gNB attaches

A gNB connects to the AMF inside the DMF over the N2 interface, which runs NGAP over SCTP. The DMF binds N2 on :38412 by default (-n2-addr). The gNB opens the SCTP association as the client; the DMF listens.

SCTP is a Linux kernel feature
N2 needs kernel SCTP, which is present on Linux but not macOS. Run the DMF (and the simulator) on a Linux host, or use the Docker lab, which provides SCTP inside the containers.

The NG Setup handshake

Once the SCTP association is up, the gNB sends an NG Setup Request advertising its global RAN node ID, its PLMN, its supported Tracking Areas (TACs), and the slices (S-NSSAIs) it supports per TAC. The DMF records the association and replies with an NG Setup Response carrying its AMF name, GUAMI, and the PLMN plus slice it serves. After that exchange the gNB is associated and can carry UE signalling.

Parameters that must line up

Registration only succeeds when the RAN, the DMF, and the subscriber agree. Three groups of values matter:

  • gNB ↔ DMF: the PLMN (MCC/MNC), the TAC, and the S-NSSAI/SST the gNB advertises should match the DMF's -plmn, -tac, and -sst. The DMF advertises its own PLMN and slice in the NG Setup Response; a UE on a PLMN/slice the AMF does not serve will be turned away later in the registration flow.
  • UE ↔ DPF: the UE's identity and key material (SUPI, K, OPc) must match a subscriber provisioned in the DPF. If you are using the seeded fixture, configure the simulated UE with one of the seeded SUPIs and the shared K/OPc — see Provision subscribers.
  • Slice consistency: the SST the gNB supports, the SST the DMF serves, and the S-NSSAI in the subscriber's data must all agree (the lab uses SST 1).

Using the dflux Runner simulator

dflux TinyCore ships a ready-made gNB config for dflux Runner at deploy/lab/config/lab-gnb.yaml. It defines one simulated gNB that dials the DMF over NGAP and matches the lab's PLMN, TAC, and slice:

YAML

The peers address (dmf) resolves to the DMF container by Compose DNS in the Docker lab. If you run the DMF natively, change it to the DMF host's address (for example 127.0.0.1) and keep the port at 38412. The plmn, tac, and slices here intentionally match the DMF's -plmn 001-01 -tac 000001 -sst 1 and the seeded subscribers' PLMN.

Debug the handshake
Start the DMF with -debug to log the NG Setup exchange and each gNB association. If the gNB connects but UEs never register, re-check the PLMN/TAC/slice triplet and the SUPI/K/OPc against the DPF first — mismatches there are the usual culprit.

Where to go next