Skip to main content

ns-3 Overview

ns-3 is a discrete-event network simulator that operates in a top-down, system-wide model โ€” a single simulation script manages the entire network topology and traffic. Because of this, when using NSB with ns-3, you should configure NSB in System-Wide simulator mode (simulator_mode: 0).

What the Integration Looks Likeโ€‹

In this integration:

  • Your application(s) use NSBAppClient to send and receive payloads
  • A single ns-3 simulation script uses NSBSimClient to fetch and post payloads as they travel through the simulated network

Exactly one NSBSimClient exists for the entire simulation โ€” it fetches all payloads regardless of source node, routes them through the ns-3 topology, and posts them back when they arrive.

Important Notesโ€‹

  • In ns-3 (top-down simulator), use System-Wide simulator mode (simulator_mode: 0) in config.yaml
  • The single NSBSimClient in the ns-3 script fetches all payloads regardless of source
  • Make sure the NSB Daemon is running before starting ns-3
  • Detailed TCP integration documentation is coming soon

Go Deeperโ€‹