  O-RAN is radically shifting how cellular networks are designed, deployed and
optimized through network programmability, disaggregation, and virtualization.
Specifically, RAN Intelligent Controllers (RICs) can orchestrate and optimize
the Radio Access Network (RAN) operations, allowing fine-grained control over
the network. RICs provide new approaches and solutions for classical use cases
such as on-demand traffic steering, anomaly detection, and Quality of Service
(QoS) management, with an optimization that can target single User Equipments
(UEs), slices, cells, or entire base stations. While this comes with the
potential to enable intelligent, programmable RANs, there are still significant
challenges to be faced, primarily related to data collection at scale,
development and testing of custom control logic for the RICs, and availability
of Open RAN simulation and experimental tools for the research and development
communities. To address this, we introduce ns-O-RAN, a software integration
between a real-world near-real-time RIC and an ns-3 simulated RAN which
provides a platform for researchers and telco operators to build, test and
integrate xApps. ns-O-RAN extends a popular Open RAN experimental framework
(OpenRAN Gym) with simulation capabilities that enable the generation of
realistic datasets without the need for experimental infrastructure. We
implement it as a new open-source ns-3 module that uses the E2 interface to
connect different simulated 5G base stations with the RIC, enabling the
exchange of E2 messages and RAN KPMs to be consumed by standard xApps.
Furthermore, we test ns-O-RAN with the OSC and OpenRAN Gym RICs, simplifying
the onboarding from a test environment to production with real telecom hardware
controlled without major reconfigurations required. ns-O-RAN is open source and
publicly available, together with quick-start tutorials and documentation.
