Subscribers
Each simulated UE needs a subscriber: a SUPI and its keys. A client flow that needs subscribers stops if none are given:
no subscribers configured: supply subscribers (-s), -gen-subscriber or -subscriber-seed
There are three ways to give them:
| Option | Subscribers | Use when |
|---|---|---|
-s subscribers.yaml | from a file, one per UE in file order | your core already has these subscribers provisioned |
-subscriber-seed <n> | derived from a seed, the same every time | both ends are rk, or you provision the core from rk subscriber generate -seed |
-gen-subscriber | random, in memory | the core under test accepts any subscriber |
When more than one is given, the seed wins, then -gen-subscriber, then the file. -s together with -subscriber-seed on a client flow is a usage error.
The subscribers file
- Keys:
keyandopcare 32 hex digits;sqnis 12. - SUPI: must look like
imsi-<mcc>-<mnc>-<msin>. snn: a subscriber's ownsnnoverridesconfig.snn.- More UEs than subscribers: the extra UEs are skipped.
- Unknown keys are refused with the file, line and key. A file can also carry the core's provisioning fields
imsi,amfandmethod, so one file can feed both the core andrk:rkchecks thatimsimatches the SUPI and ignores the other two.
Seeded subscribers
-subscriber-seed <n> (decimal or 0x hex) derives every subscriber:
- SUPI: UE number i gets MSIN
-subscriber-start-msin+ i. The start is 1 by default. The MSIN is zero-padded to fill the IMSI. - Keys: K and OPc are derived from the seed and the SUPI, so the same seed always gives the same keys. That lets an
rkAMF authenticate anrkgNB's UEs with no file at all. - Algorithms: SQN 0, NEA0, NIA2.
- Range:
-subscriber-countbounds it (0 = unbounded).
A suite step can set its own subscriber_seed: {seed, start_msin, count}. -subscriber-seed on the command line overrides it.
Generate subscribers
rk subscriber generate writes a subscriber set to provision into your core:
| Flag | Default | What it does |
|---|---|---|
-count | 10 | how many |
-mcc, -mnc | 901, 70 | the PLMN |
-c <env.yaml> | take the PLMN and the gNB's UE settings from an environment (not with -mcc/-mnc) | |
-start-msin | 1 | the first MSIN |
-seed | derive keys from a seed, as -subscriber-seed does; random keys otherwise | |
-format | runik | runik (the -s file), core (CSV), open5gs (a mongoimport JSON array), free5gc (a curl script) |
-ciphering, -integrity | NEA0, NIA2 | algorithms, runik format only |
-output-file | subscribers.yaml, .csv, .json or .sh | where to write |
-force | overwrite an existing file |
The file is written readable by its owner only (mode 0600). rk subscriber generate needs no licence.