6G NTN
ns3-ntn-toolkit module

ntn-sagin

ntn-sagin: space-air-ground integrated networks in ns-3

ns-3 module for ground, UAV, HAPS and LEO layers: TR 36.777 air-to-ground channel, multi-layer routing and store-and-forward custody with BPv7.

Fig. 1 of the accompanying study: the system model. Click to zoom.
Fig. 1 of the accompanying study: the system model. Click to zoom.

What ntn-sagin does

ntn-sagin is an ns-3 module for space-air-ground integrated networks that gives ground, UAV, HAPS and LEO layers their own mobility, a 3GPP TR 36.777 air-to-ground channel, and a router that chooses among candidates from all layers. Its custody queue holds traffic across contact gaps and can carry BPv7 bundles with RFC 5050 custody transfer.

Accompanying studyTimer Values and Custody Costs for Release 19 Store-and-Forward IoT Over Sparse LEO Constellations. Code and data are in this repository.

What it models

Each layer has its own mobility: HAPS figure-8 station keeping and loiter trajectories, UAV waypoint, patrol and lawnmower search patterns, aircraft cruise and OpenSky ADS-B replay, vessels replayed from AIS records, high-speed trains, and SGP4 satellites from ntn-constellation. The air-to-ground channel follows 3GPP TR 36.777 v15.0.0 for UMa-AV, RMa-AV and UMi-AV path loss, LOS probability and shadow fading; calls above the validated 300 m aerial height are recorded rather than silently extrapolated. As a PropagationLossModel chained onto a real NR spectrum channel it returns a signed excess over free space, to avoid double counting.

MultiLayerRouter computes greedy maximum-elevation paths over ground, UAV, HAPS and LEO candidates with a pluggable score and optional congestion awareness; SaginSliceRouter maps QFI to S-NSSAI (TS 23.501) and biases the layer choice by latency budget and a GEO allowance. The routers return hop vectors and install no forwarding table; sagin-multihop-traffic is the example where the route is actuated. SaginCustodyQueue stores packets while the next hop is out of contact, with FCFS, LCFS, keep-newest-per-source, lifetimes and byte capacity. With custody transfer enabled it carries BPv7 primary blocks (RFC 9171, CBOR per RFC 8949) and RFC 5050 custody signals. Block CRCs, extension blocks, fragmentation, BPSec and a convergence layer are not implemented. TR 38.811 and TR 38.821 cover the NTN layers, TS 28.552 the KPM names, and TS 38.300 Section 9.2.3 the Xn handover messages used with regenerative payloads.

Measured numbers

29 ± 3 %, 25 ± 6 %, 22 ± 6 %

Share of buoys served by bent pipe for the Orbcomm, Kinéis and Sateliot fleets; store and forward served all buoys

sagin-store-forward-iot study: real element sets through Vallado SGP4, 60 ocean buoys, 5 gateways, one 40-byte update per buoy every 15 min, 1 Mb/s gated point-to-point links, four simulated days (three with traffic), radio access not modeled; mean with 95 % half-width over 5 replications
6.79 ± 1.97 h to 1.76 ± 0.42 h

Mean age of information on the buoys bent pipe serves, bent pipe against store and forward, Orbcomm fleet

Same study, 5 gateways, 5 replications, paired by buoy
2.1 to 14.5

Factor by which keep-newest cut the 99th-percentile on-board backlog relative to FCFS across fleets

Same study, 5 gateways, per replication, 5 replications
about 119 ms

Measured one-way delay of the mMTC flow on the GEO leg (the 35 786 km propagation time)

sagin-slice-traffic example, URLLC, eMBB and mMTC flows steered onto HAPS, LEO and GEO legs
about 35 %

Share of shadow-fading draws removed by clamping the A2G excess loss at zero, the reason the module keeps it signed

TR 36.777 channel at 1 km

Each number states the run it comes from; the README of the module lists the command that reproduces it.

Standards it follows

3GPP TR 36.777UAV air-to-ground path loss, LOS probability and shadow fading for UMa-AV, RMa-AV and UMi-AV
3GPP TR 38.811NTN layers and geometry
3GPP TR 38.821NTN layers and geometry; Set-1 link budget in the store-and-forward and routed examples
3GPP TS 23.501QFI and S-NSSAI for slice routing
3GPP TS 28.552KPM names
3GPP TS 38.300Section 9.2.3 Xn handover
IETF RFC 9171BPv7 bundle encoding and primary block; deletion status report reason
IETF RFC 5050Custody transfer and custody signal record
IETF RFC 8949CBOR encoding

New on 6g-ntn.live

The toolkit now runs in the browser at 6g-ntn.live: pick an example of ntn-sagin or any other module, change its parameters, and the real ns-3 binary runs on the server.

Watch

Watch on YouTube: the NTN Control Center running and visualizing the toolkit examples, in five minutes.

Install

Every module ships in the ready-built container image of the toolkit (version 3.0.1):

docker pull uzairdocker69/ns3-ntn-toolkit:latest
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest bash

To build from source, clone ns3-ntn-toolkit, which vendors this module under contrib/, or follow the README of this repository (branch ntn-sagin-v4).

Cite

If you use ntn-sagin, please cite the toolkit article (doi:10.1109/OJCOMS.2026.3745010):

@article{uzair2026ns3ntntoolkit,
  author  = {Uzair, Muhammad and Aldahlan, Bassma G. and Albar, Ali A. and
             Althumali, Huda and Alghammas, Adnan},
  title   = {ns3-ntn-toolkit: An Integrated ns-3 Platform for 6G
             Non-Terrestrial Networks},
  journal = {IEEE Open Journal of the Communications Society},
  volume  = {7},
  pages   = {13440--13467},
  year    = {2026},
  doi     = {10.1109/OJCOMS.2026.3745010}
}

Links