
The increasing complexity and scale of modern network environments, particularly with the advent of the Internet of Things (IoT), demand flexible and adaptable routing protocols. Our study delves into the first known ns-3 implementation of Ad Hoc On-Demand Distance Vector version 2 (AODVv2), offering researchers a valuable platform to explore its capabilities. This implementation facilitates rigorous testing and comparative analysis under diverse network conditions, leading to new insights on the protocol’s performance and reliability. Key findings from our preliminary evaluations indicate that AODVv2’s overhead is higher than that of legacy AODV, but its route maintenance is more robust in dynamic topologies. These results accelerate innovation in mobile ad hoc networking and IoT domains, encouraging the development of more adaptive and resilient networks. Furthermore, our work offers empirical results to inform future standardization efforts for AODVv2.
The IEEE 802.15.6 standard for Wireless Body Area Networks (WBANs) enables wireless communication inside the human body. In a network scenario where a signal travels through various body parts, it is important to consider the propagation loss caused by the body. This paper presents a body propagation loss model for WBAN implemented in the network simulator ns-3. Our proposed propagation loss model calculates path-loss and interference caused by the presence of a human body in the network. The experiments in this study are close to real-life scenarios in which the transmitters are placed in or on the human body, and the receivers are placed in the vicinity of the body. We evaluated the effectiveness of our body propagation loss model signals using the physical layers of different standards. Our results show that for WBAN, the packet success rate is better than that of the Low-rate Wireless Personal Area Network (Lr-WPAN) standard. Our proposed propagation loss model is supported by all WBAN narrowband frequencies using DBPSK modulation. We analyzed different frequency bands within the WBAN standard for in-body and on-body communications and concluded that the 402 MHz band achieved the best performance among the WBAN narrowband frequencies. The code for our simulation model is publicly available.
Flying Ad-hoc Networks (FANETs) are considered to be ad-hoc network formed by Unmanned Arial Vehicles (UAVs). FANETs are widely used in both military and civilian domains, like surveillance or emergency response. Due to the highly dynamic movement of UAVs in FANETs, communication protocols must be thoroughly tested before deployment. To ensure consistent performance, thorough testing must be performed in both simulated and real-world contexts. In this study, the FANS (Flying Ad-hoc Network Simulator) co-simulation platform is expanded. This platform combines ns-3 network simulation, ROS robotics software development, and Gazebo drone simulation. It is further connected to hardware emulation using an embedded system platform, which includes the NVIDIA Jetson Nano and Pixhawk-4 flight controller. The simulation framework is designed to measure important network parameters such as end-to-end delay and Packet Delivery Ratio (PDR) in a decentralized Wi-Fi ad-hoc network setup. In addition to the simulation, a hardware testbed consisting of three drones is created. In this configuration, UAVs communicate while flying in a straight line formation. The findings of this real-world implementation are contrasted with those acquired through simulation. The simulation and hardware test results are presented to show that the hardware integration was successful. This work lays the groundwork for future research and testing of various networking protocols in FANETs.
3rd Generation Partnership Project (3GPP) 5G New Radio (NR) requires users to provide feedback for the base stations, named Next Generation Node Bs (gNBs), to select the number of spatial streams and the precoding matrix, optimizing metrics like channel capacity. 5G-LENA 3.1 offers an exhaustive search for the optimal Rank Indicator (RI) and Precoding Matrix Indicator (PMI) pair, constrained by the codebook. We also implement the unconstrained ideal precoding matrix and two codebook-based PMI/RI selection techniques from the literature. We propose a new heuristic method that reduces the search space with minimal system performance loss. Simulations show that it achieves 3.7x speedup with only a 3.3% throughput reduction compared to the exhaustive search.
Artificial Intelligence (AI) will play a crucial role in next generation networks, where adaptability and self-optimization are essential for achieving zero-touch, autonomous network operation. As AI techniques are integrated into the architecture of next generation networks, such as 6G, having tools that will allow the application of AI for testing and experimentation is of high importance. Moreover, AI techniques are increasingly being employed to enhance the performance of applications with challenging Quality of Service (QoS) and latency requirements. In this work we present an enhanced version of the ns-3 5G-LENA simulator, extended with AI capabilities through integration with the ns3-gym module. In addition, we introduce a novel Reinforcement Learning (RL)-based resource scheduler, namely Delay-Responsive Intelligent Learning for Latency-sensitive QoS (DRILL-Q), designed to optimize resource allocation with a special focus on latency-sensitive, multi-flow traffic. Through extensive simulations we demonstrate that the proposed scheduler significantly reduces in QoS violations, while improves fairness across flows, compared to the traditional schedulers provided in 5G-LENA, the 5G NR module for the ns-3 simulator.
This document describes a new simulation model of the Neighborhood Discovery Protocol (NHDP) for mobile ad hoc networks (MANETs), for the ns-3 discrete-event network simulator. NHDP is a component of MANET routing protocols such as Optimized Link State Routing (OLSR). Although these protocols were originally motivated by Wi-Fi-based mobile ad hoc networks, recently both protocols have been selected for use as a layer-3 routing solution for fifth-generation (5G) cellular multi-hop routing over sidelink. We provide an overview of the operation of NHDP and describe the scope and implementation of the ns-3 model. We present simulation results comparing the performance of ns-3’s existing OLSR routing model in a mobile networking scenario with a modified OLSR model making use of the NHDP model, and highlight the performance similarities and differences. We show how the link quality feature of NHDP can be used to filter out weakly performing links to improve routing path selection. We conclude by outlining next steps for additional NHDP model features and towards a more complete set of updated mobile ad hoc routing protocols for ns-3.
Accurate and scalable simulation of 5G networks is crucial for evaluating system performance under realistic conditions. However, the nr module in ns-3 (5G-LENA) previously supported only the computationally expensive 3GPP 38.901 spatial channel model, limiting its applicability in large-scale scenarios. This work enhances 5G-LENA by integrating additional channel models, including ns-3 legacy channels, Fluctuating Two-Ray (FTR), and NYUSIM models, which enable more flexible simulations. We benchmarked these models regarding execution time and Key Performance Indicators (KPIs), demonstrating the trade-offs between accuracy and computational cost. Our results show that while spatial models provide a more realistic representation of channel effects, their complexity significantly impacts execution time. In contrast, simplified models like Friis and Okumura-Hata offer computational efficiency and similar results for frequencies below 6 GHz, while for mmWave frequencies, they perform with unrealistic results.
Reinforcement Learning (RL) is increasingly used in networking research. Since real-world experiments are rarely feasible, new RL approaches are typically trained and evaluated in network simulations. When implementing a new RL approach in the popular network simulator ns-3, one faces two main challenges: (1) integrating an RL library into ns-3 to leverage existing RL algorithms, and (2) implementing the distributed deployment of the RL approach in the ns-3 simulation. Since there is currently no tool that sufficiently simplifies both tasks, this paper presents the DEFIANCE framework. It defines abstract RL applications in ns-3, into which users insert their specific implementation and which allow an easy simulation of the distributed deployment of different RL components. To integrate RL libraries into ns-3, DEFIANCE extends ns3-ai by supporting Multi-Agent Reinforcement Learning (MARL) and parallel execution of environments. The functionality of the framework is demonstrated by two examples. Overall, the framework paves the way for future RL research in ns-3 by simplifying the implementation of RL approaches and their evaluation under realistic conditions.
As the WiFi standard continues to evolve, the medium access control (MAC) layer of WiFi is becoming increasingly intricate, thus necessitating detailed network simulations for optimization of various algorithms. To gain in-depth understanding of the simulation results, macro-level metrics such as throughput and delay are often insufficient, evaluating micro-level metrics including modulation and coding scheme (MCS), enqueue time and so forth are further crucial. To address this issue, this paper introduces ns3-WiMacStat, a comprehensive and user-friendly tool for collecting, analyzing, and visualizing WiFi MAC statistics within ns-3 simulations. Employing customized trace sources and sinks, ns3-WiMacStat collects 12 key metrics across PPDU, MPDU, and MSDU levels, storing them in a hierarchical database. These statistics are encoded into Pcap files with a customized RadioTap header. Experiment results show that 1) the accurate functionality of ns3-WiMacStat’s statistic collection; and 2) neglected runtime overhead compared to standard ns-3 tracing, with a trade-off of increased memory usage.
Emulation environments are widely used to evaluate the performance or behavior of real protocols, applications, or hardware under different network characteristics. However, such environments often treat these characteristics as static – an assumption untenable in dynamic networks like satellite constellations. Leveraging the benefits of discrete event simulators, this paper proposes a system design for replaying dynamic characteristics of end-to-end network paths in emulation environments. In contrast to other emulation methodologies, our approach introduces a split between the simulation and emulation to combine the advantages of both. ns-3 simulates the network topology, background traffic, and different network functions. In the simulated topology, additional Trace Packets are used to record the end-to-end path through the network and its characteristics; apart from that, the simulation remains unchanged. The path characteristics are exported to Trace Files and subsequently replayed in real time in an emulation environment, where the evaluation of higher-layer protocols, applications, or hardware takes place. In this paper, we describe the workflow of our approach with a proof-of-concept using a simple network topology. The resulting emulation environment is compared against a full simulation and a real testbed, demonstrating its ability to reproduce the behavior of a single TCP flow. Despite some limitations, such as the absence of feedback from the emulation environment back to the simulator, the approach offers potential for evaluating real systems with characteristics from different types of simulated networks.
Time synchronization is an important component in understanding protocols dealing with race conditions, deadlocks, mutual exclusion, and other timing bugs that may occur in a real-world network. The asynchronous nature of today’s networks makes clock skew an important issue to model, and our simulation should reflect the same to avoid those timing bugs in production environments. In this work, we motivate the need for a clock skew model in ns-3, where each node exhibits drift based on a bound configured by the user. The ns-3 documentation outlines the need for a node-local clock to model this drift, and having this model would allow users to better understand timing bugs that may occur in production. We provide several models of skewing clocks implemented in ns-3, and an abstraction of NTP to illustrate a synchronization model built on top of these skewing clocks. We also provide an analysis of the overheads and deviations from a reference observed when these models are used. In addition, we provide different clock designs used in traditional distributed systems to aid users with alternatives to skewing physical clocks.
Programming Protocol-Independent Packet Processors (P4) has enabled network researchers to program packet processing pipelines to prototype and implement novel network functions in hardware and software testbeds. P4 support in simulators, like network simulator version 3 (ns-3) can benefit significantly from ns-3’s feature-rich ecosystem. However, existing P4 simulators have poor scalability, inaccurate timing, and limited architectural support. This paper introduces P4sim, a high-performance simulator developed on top of ns-3. P4sim enhances queue modeling and packet scheduling, ensuring efficient packet processing and precise simulation time representation. The evaluation results confirm that P4sim effectively manages packet processing, supporting data rates up to 10 Gbps. Furthermore, P4sim supports various architectures, like V1Model, Portable Switch Architecture (PSA), and Portable NIC Architecture (PNA). It enables seamless transition between Behavioral Model version 2 (bmv2) and P4sim, allowing researchers to shift from rapid prototyping to large-scale network simulations with the same P4 code.
Multiple-Input Multiple-Output (MIMO) is vital for 5G-New Radio (NR), and accurately modeling its behavior in simulation environments is essential for aligning research with real-world deployments. To support the realistic modeling of advanced 5G networks, we introduce critical enhancements to the 5G-LENA module in ns-3: multi-panel antenna support, Kronecker-based beamforming, and a 3GPP-compliant MaxRSRP-based initial attachment procedure. The proposed modifications aim to align simulations more closely with real-world network behavior. We integrate Kronecker and quasi-omnidirectional beamforming techniques to improve signal alignment and performance. Additionally, we implement a multi-panel antenna system at the UE, enabling directional diversity and enhanced beam steering. To improve user association accuracy, we integrate an RSRP-based initial attachment method, replacing the simplistic distance-aware model. Through extensive end-to-end simulations, we demonstrate that these improvements significantly enhance key performance metrics such as Signal to Interference-plus-Noise Ratio (SINR), Modulation and Coding Scheme (MCS), throughput, and delay. Our contributions enable more accurate, configurable, and realistic simulation scenarios in 5G and beyond network research.
Wi-Fi sensing is emerging as a cost-effective, infrastructure-ready solution for various applications due to its widespread deployment, unlicensed spectrum access, and low hardware costs. To standardize this capability, the IEEE 802.11 working group has established Task Group 802.11bf to define enhancements for Wi-Fi sensing in both the sub-7 GHz and mmWave bands. Although recent studies explore the technical aspects and protocol specifications of 802.11bf, there is a lack of a system simulation framework that allows for an in-depth analysis of the sensing performance. In this paper, we address this gap by presenting the first implementation of IEEE 802.11bf MAC-layer Wi-Fi sensing for the sub-7 GHz band in the ns-3 network simulator. Our implementation extends the ns-3.40 802.11ax Wi-Fi module with new MAC-layer features that support channel access and channel sounding mechanisms for Wi-Fi sensing. Furthermore, we evaluated the sensing performance of the 802.11bf protocol by analyzing sensing latency across different network scenarios. Our implementation, which is also publicly available, sets the groundwork for future Wi-Fi sensing research.
The User Equipment (UE) reports Channel State Information (CSI) feedback to its serving Next Generation Node Base (gNB), including indicators such as Rank Indicator (RI), Precoding Matrix Indicator (PMI), plus wideband and sub-band Channel Quality Indicator (CQI). These are used by the gNB to select the number of transmission layers, the precoding matrix, and the Modulation and Coding Scheme (MCS), according to its error model. While 5G-LENA v3.0 included RI and 3rd Generation Partnership Project (3GPP) Single-Panel Codebook Type-I PMI feedback, it lacked support for sub-band CQI and corresponding scheduler adaptations. In 5G-LENA v4.0, we added CSI reference signals, CSI interference measurements, sub-band CQI estimation, and extended the Orthogonal Frequency-Division Multiple Access (OFDMA) schedulers to use sub-band information. We also implemented a test to verify CSI reporting under different interference conditions and evaluated the trade-offs of various estimates. Simulation results show modest throughput gains under wideband interference, consistent with 3GPP reference data, confirming the validity of our implementation.
We propose a novel propagation model named First Order Buildings Aware Propagation Loss Model (FOBA) to address the lack of reactive interaction between signal propagation and urban building topology. The model incorporates signal loss based on three components: the direct path of the signal through buildings, diffraction, and reflection. The proposed model enhances signal path loss coherence in short-distance, object-obstructed environments. These contributions improve ns-3 representation of urban network connectivity.
Efficient coexistence management is essential for maximising spectrum utilisation in shared 5G New Radio–Unlicensed (NR-U) environments, where heterogeneous radio access technologies compete for the same channel resources. Conventional omnidirectional Listen-Before-Talk (LBT) mitigates persistent interference, yet fails to fully exploit the spatial reuse potential of active antenna arrays in dense deployments. This work introduces a practical null space projected LBT and digital precoder that jointly suppress interference from and toward coexisting nodes while remaining 3GPP- and regulatory-compliant. Implemented in ns-3 and 5G-LENA, system-level simulations demonstrate that the proposed approach enables concurrent transmissions, substantially enhances spatial reuse, and reduces latency compared to legacy LBT schemes.
Reliability and realism are critical factors when choosing network simulators. One of the most effective ways to achieve these objectives is to enable simulators to interact with real devices. Currently, the ns-3 simulator offers various methods for interacting with physical hardware; however, none of the publicly available options extend to IoT devices, which typically operate on micro controller units (MCUs). In this paper, we address this gap by proposing a co-processor solution that allows the ns-3 network simulator to interact with real IEEE 802.15.4 devices. This approach takes any protocol stacks and applications previously developed for this standard in ns-3 and enables them to communicate directly with real IoT hardware. The advantages of this approach are substantial, as it permits the development of more accurate IoT protocols within ns-3 that can effectively operate on both simulated and real hardware. Additionally, due to the small size and low cost of IoT devices, our proposal facilitates the creation of portable IoT devices testbeds on the fly using ns-3. Our experiments demonstrate the ease of use and effectiveness of this proposal.
The ever-increasing demand for broadband and IoT wireless connectivity has recently urged the regulators around the world to start opening the 6 GHz spectrum for unlicensed use. These bands will, for example, permit the use of additional 1.2 GHz in the US and 500 MHz in Europe for unlicensed radio access technologies (RATs) such as Wi-Fi and 5G New Radio Unlicensed (5G NR-U). To support QoS-sensitive applications with both technologies, fair and efficient coexistence approaches between the two RATs, as well as with incumbents already operating in the 6 GHz band, are crucial. In this paper, we study through extensive simulations the achievable mean downlink throughput of both Wi-Fi 6E APs and 5G NR-U gNBs when they are co-deployed in a dense residential scenario under high-interference conditions. We also explore how different parameter settings e.g., MAC frame aggregation, energy detection threshold and maximum channel occupancy time (MCOT) affect the coexistence. Our findings give important insights into how to tune the key parameters to design fair coexistence policies.
Wi-Fi networks have long relied on the Enhanced Distributed Channel Access (EDCA) mechanism, allowing stations to compete for transmission opportunities. However, as networks become denser and emerging applications demand lower latency and higher reliability, the limitations of EDCA such as overhead due to contention and collisions have become more pronounced. To address these challenges, Orthogonal Frequency Division Multiple Access (OFDMA) has been introduced in Wi-Fi, enabling more efficient channel utilization through scheduled resource allocation. Furthermore, Wi-Fi 6 defines Uplink Orthogonal Frequency Division Multiple Random Access (UORA), a hybrid mechanism that combines both scheduled and random access, balancing efficiency and responsiveness in resource allocation. Despite significant research on UORA, most studies rely on custom simulators that are not publicly available, limiting reproducibility and preventing validation of the presented results. The only known open-source UORA implementation in the ns-3 simulator exhibits key limitations, such as usage of the same trigger frame (TF) to schedule resources for buffer status reports and data transmissions, and lack of signaling for UORA configuration. In this paper, we present a fully standard-compliant and open source UORA implementation that is compatible with ns-3 version 3.38, addressing these limitations to improve resource allocation efficiency and adaptability. This implementation enables more accurate and flexible evaluation of UORA, fostering future research on Wi-Fi resource allocation strategies.