Skip to content
Example · SAGIN

Store-and-forward IoT over sparse LEO

Ocean buoys report through a sparse LEO fleet to gateways: bent pipe against store-and-forward custody on delivery delay and loss over days. Links default to a 0/1 visibility gate with no radio; linkModel=satlink adds a declared Set-1 link budget, contacts=cgr uses the contact graph router and dtn=bpv7 sends BPv7 bundles with custody transfer (a partial RFC 9171 subset).

sagin-store-forward-iot about 5 s on the server

Parameters (32)

Defaults are the values the browser run form starts from. Pass any of them on the command line as --name=value.

ParameterDefaultUnitDescription
TLE file of the satellite fleet
--tle
contrib/ntn-sagin/data/orbcomm.tle-TLE file of the satellite fleet
Device CSV
--devices
contrib/ntn-sagin/data/buoys.csv-Device CSV (name, lat, lon)
Gateway CSV
--gateways
contrib/ntn-sagin/data/gateways_k5.csv-Gateway CSV (name, lat, lon)
Number of devices read from the CSV
--nDev
40-Number of devices read from the CSV
Simulated time
--days
2-Simulated time (days)
Status update period
--periodMin
15minStatus update period (min)
Device elevation mask
--devMask
20degDevice elevation mask (deg)
Gateway elevation mask
--gwMask
10degGateway elevation mask (deg)
Forwarding policy
--policy
sf1-Forwarding policy: bp (bent pipe), sf1 (store and forward to the highest satellite) or sfe (earliest predicted delivery)
Custody lifetime per hop
--lifetimeH
0hCustody lifetime per hop (h, 0 = none)
On-board custody capacity
--satBufferBytes
1073741824bytesOn-board custody capacity (bytes)
Keep only the newest update of each device in custody
--keepNewest
false-Keep only the newest update of each device in custody
Allowed: true, false
Visibility update period
--tick
10sVisibility update period (s)
Drain custody newest first
--lcfs
false-Drain custody newest first (last come, first served)
Allowed: true, false
Count the lifetime from generation, not from entry into each hop
--lifetimeE2E
false-Count the lifetime from generation, not from entry into each hop
Allowed: true, false
Updates a device may upload per contact with the fleet
--upBudget
0-Updates a device may upload per contact with the fleet (0 = unlimited)
Updates a satellite may deliver per gateway contact
--feedBudget
0-Updates a satellite may deliver per gateway contact (0 = unlimited)
Output CSV file
--out
sf_iot.csv-Output CSV file
Link Model
--linkModel
gate-gate (0/1 elevation gate with no radio, default) or satlink (per-hop link error model on a declared TR 38.821 Set-1 budget, DVB-S2 QPSK 1/2)
Contacts
--contacts
elevation-elevation (the example's own visibility test, default) or cgr (contact graph scheduler and router)
Dtn
--dtn
none-none (default) or bpv7 (RFC 9171 bundles with RFC 5050 custody transfer; no block CRCs, fragmentation or BPSec)
Custody retransmission timer
--custodyTimeoutS
30scustody retransmission timer (s), --dtn=bpv7
Bpv7 Expiry
--bpv7Expiry
bundle-bundle (RFC 9171 5.5 per-bundle expiry, default) | queue (pre-Wave-6B queue lifetime)
Bundles with creation time 0 and a Bundle Age block
--clockless
false-bundles with creation time 0 and a Bundle Age block (RFC 9171 4.2.7)
Allowed: true, false
RFC 9171 block CRC
--bpCrc
16-RFC 9171 block CRC: 16 (CRC-16 X.25, default) | 32c (CRC-32C) | none
Residual bit error rate delivered to the bundle layer on the...
--bundleBer
0-residual bit error rate delivered to the bundle layer on the radio hops (--dtn=bpv7)
Bundle class of service
--priority
normal-bundle class of service: normal (default) | bulk | expedited | mixed
Share of bundles flagged critical
--criticalShare
0-share of bundles flagged critical (SABR copies on every route)
Wire the per-neighbor queue backlog into SABR
--sabrBacklog
false-wire the per-neighbor queue backlog into SABR (CCSDS 734.3-B-1 3.2.6.2)
Allowed: true, false
Ntn-observability Cesium CZML scene output
--czml
(empty)-ntn-observability Cesium CZML scene output (empty = off)
Ntn-observability NetSimulyzer scene output
--netsim
(empty)-ntn-observability NetSimulyzer scene output (empty = off)
Scene sampling interval
--sceneDt
60sscene sampling interval (s)

Reproduce it locally

With the example's built-in defaults, in the public Docker image:

shell
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "sagin-store-forward-iot"

With the same parameters the browser run form starts from:

shell
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "sagin-store-forward-iot --tle=contrib/ntn-sagin/data/orbcomm.tle --devices=contrib/ntn-sagin/data/buoys.csv --gateways=contrib/ntn-sagin/data/gateways_k5.csv --nDev=40 --days=2 --periodMin=15 --devMask=20 --gwMask=10 --policy=sf1 --lifetimeH=0 --satBufferBytes=1073741824 --keepNewest=false --tick=10 --lcfs=false --lifetimeE2E=false --upBudget=0 --feedBudget=0 --out=sf_iot.csv --linkModel=gate --contacts=elevation --dtn=none --custodyTimeoutS=30 --bpv7Expiry=bundle --clockless=false --bpCrc=16 --bundleBer=0 --priority=normal --criticalShare=0 --sabrBacklog=false --sceneDt=60"

List every argument with ./ns3 run "sagin-store-forward-iot --PrintHelp".

More SAGIN examples

Cite this

If you use this module, please cite the article that describes the toolkit: doi:10.1109/OJCOMS.2026.3745010.

M. Uzair, B. G. Aldahlan, A. A. Albar, H. Althumali and A. Alghammas, "ns3-ntn-toolkit: An integrated ns-3 platform for 6G non-terrestrial networks," IEEE Open Journal of the Communications Society, vol. 7, pp. 13440-13467, 2026, doi: 10.1109/OJCOMS.2026.3745010.

BibTeX
@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}
}