Skip to content
Docs / dflux Runner
ContactGet started

Environment schema

Authoritative schema for the environment YAML (e.g. config/lab.yaml).

The environment YAML is the file you pass with -c (sometimes called the config). It declares the network functions under test, the wire stacks they speak, and how each connects to its peers. For the narrative walkthrough, see Configuring environments; for the message bodies that flows send over these transports, see the flow schema.

Synopsis

YAML

Top-level fields

NameTypeRequiredDescription
nfs[]NFyesInventory of NFs in this env
transportsmap[string]TransportyesWire-stack table; keys are transport IDs that NFs reference
diameter_dictionary_pathstringnoPath to an XML file extending the embedded Diameter AVP dictionary. Process-wide; applies to every Diameter transport.

NF entry

NameTypeRequiredDescription
namestringyesUnique within the env
roleenumyesgnb, amf, smf, ausf, udm, pcf, nrf, upf, mme, pgw, af, pcrf, external
plmnPLMNrole-specific{ mcc, mnc }. Required for Diameter roles (mme, pgw, af, pcrf): both mcc and mnc must be set or config load fails. Optional for other roles.
transportstringnoTransport ID this NF uses
gnbGNBPropertiesrole-specificSet when role: gnb
amfAMFPropertiesrole-specificSet when role: amf

GNBProperties

YAML
NameTypeRequiredDescription
global_idGlobalIDyesgNB identity advertised in NGSetupRequest
global_id.plmnPLMNyesgNB PLMN
global_id.gnb_idstringyesgNB ID (decimal or hex string)
global_id.bit_lengthintyesgNB ID bit length, typically 22, 24, 28, or 32
supported_tas[]SupportedTAyesTAC + PLMNs + slices
supported_tas[].tacintyesTracking Area Code
supported_tas[].plmns[].plmnPLMNyesPLMN within the TA
supported_tas[].plmns[].slices[]SliceConfigyes{ sst, sd }
paging_drxintnoDRX coefficient (32, 64, 128, 256)
uplaneUplaneConfignoUser-plane traffic generator config
auto_reply.handover_requestboolnoStub-reply to inbound HandoverRequest (used by handover_source flow)

AMFProperties

YAML
NameTypeRequiredDescription
served_guamiAMFServedGuaminoGUAMI advertised in NGSetupResponse. Defaults if nil.
relative_capacityuint8noNGSetupResponse field
allowed_gnbs[]AMFAllowedGNBnoEmpty = accept any gNB. Match is on RanNodeName.

Transport

NameTypeRequiredDescription
protocolenumyesngap, diameter, sbi, rest, pfcp
ngapNgapTransportConfigrole-specificSet when protocol: ngap
diameterDiameterConfigrole-specificSet when protocol: diameter
sbiSBITransportConfigrole-specificSet when protocol: sbi
restRESTTransportConfigrole-specificSet when protocol: rest
pfcpPFCPTransportConfigrole-specificSet when protocol: pfcp

NGAP transport

YAML
NameTypeRequiredDescription
modestringnoclient or server. Defaults: client if peers non-empty, server otherwise.
local_sctpstringyesBind/dial-source IP
local_gtpustringnoIP advertised as N3 endpoint in PduSessionResourceSetupResponse
peers[]AMFConfigclient-modeList of { address, port } AMFs to dial

Diameter transport

RFC 6733 shape: one local identity, peer table, optional realm-based routing table.

YAML

local (DiameterLocalConfig):

NameTypeRequiredDescription
origin_hoststringyesOur Origin-Host advertised in CER
origin_realmstringyesOur Origin-Realm
vendor_iduint32noVendor-Id AVP (3GPP=10415)
product_namestringnoProduct-Name AVP
application_ids[]uint32yesApp IDs advertised: S6a=16777251, Gx=16777238, Rx=16777236
watchdog_intervaldurationnoDWR/DWA cadence
listenDiameterListenConfignoSet to enable inbound peer connections (Responder role)
listen.transportstringyes (with listen)sctp or tcp
listen.addr / listen.portstring / intyesLocal bind
responder.timeoutdurationnoPure-Responder readiness wait at Start

peers (one per remote peer):

NameTypeRequiredDescription
namestringyesLocal nickname referenced in routes
transportstringyessctp or tcp
addrstringyesRemote address
portintyesRemote port
sctp_ppiduint32noRFC 6733 §2.1; default 46 if unset
destination_hoststringyesMust match remote's origin_host in CEA
destination_realmstringyesMust match remote's origin_realm
connection_modestringnoinitiator (default; we dial), responder (we wait), both (we dial and accept; RFC 6733 §5.6.4 election)
tlsboolnoTLS to this peer

routes (RFC 6733 §6.1):

NameTypeRequiredDescription
realmstringyesDestination-Realm to match
application_ids[]uint32yesApps this route handles
local_actionstringnolocal, relay (default), proxy, redirect
peers[].namestringyesReference into peers
peers[].ratingintnoHigher rating wins

SBI transport

YAML
NameTypeRequiredDescription
base_urlstringclient-modeSet for client mode. Mutually exclusive with listen.
nf_typestringnoAdvertised NFType (UDM, AUSF, AMF, ...)
nf_instance_idstringnoUUID identity
tls.*stringnoCA / cert / key paths
oauth2.enabledboolnoEnable OAuth2 client-credentials
oauth2.token_urlstringOAuth2Token endpoint
oauth2.client_idstringOAuth2Client ID
oauth2.client_secret_envstringOAuth2Env var name holding the secret (never put secrets in YAML)
listen.addr / listen.portstring / intserver-modeBind
server.answer_timeoutdurationnoDefault 10s — caps how long the listener blocks on the FSM before returning 504
server.read_header_timeoutdurationnoDefault 30s — http.Server.ReadHeaderTimeout

REST transport

Generic HTTP/2 for non-3GPP peers. Same shape as SBI without OpenAPI.

YAML
NameTypeRequiredDescription
base_urlstringclient-modeMutually exclusive with listen
listen.addr / listen.portstring / intserver-modeBind
auth.typestringnonone, basic, bearer, api_key
auth.username_env / auth.password_envstringbasicEnv var names
auth.token_envstringbearerEnv var name holding the token
auth.header / auth.value_envstringapi_keyCustom header name + env var holding the value
tls.*stringnoCA / cert / key paths
server.answer_timeout / server.read_header_timeoutdurationnoSame defaults as SBI

PFCP transport

YAML
NameTypeRequiredDescription
modestringyesclient or server
localstringserver: yes; client: optionalhost:port; 0.0.0.0:0 for ephemeral client
peer.addrstringclientRemote PFCP node IP
peer.portintclientRemote PFCP UDP port (8805 default)
node_id.typestringyesipv4, ipv6, or fqdn
node_id.valuestringyesAddress or FQDN advertised in AssociationSetupRequest/Response

Examples

Single-gNB lab (canonical)

See config/lab.yaml.

Diameter MME → HSS

See config/lab-diameter.yaml. Shipped peers point at d3x-edge in HSS-server mode.

PFCP loopback

See config/lab-pfcp.yaml. SMF + UPF on 127.0.0.1:18805.

SBI loopback

See config/lab-sbi.yaml. UDM + AUSF servers + matching client peers, all on 127.0.0.1.

Multi-NF

See config/lab-multinf.yaml. Two gNBs sharing one NGAP transport, plus an MME on Diameter, plus a remote UDM on SBI — the canonical multi-NF reference.

Notes

  • Multiple NFs may reference the same transport ID when they share a wire (e.g. two MMEs on one Diameter peer pool).
  • The validator runs at config load. Any invalid combination (mode: client with no peers, protocol: sbi with both base_url and listen set, ...) fails before the daemon binds.
  • Secrets must come from environment variables — every *_env field is a name, not a value.

Where to go next