How openairinterface/openairinterface5g works
Purpose and entry points
Duranta OpenAirInterface is a C/C++ cellular RAN stack for LTE/4G and NR/5G, supporting simulation, SDR-based deployment, disaggregated RAN, and core-network integration. CMake builds role-specific softmodem processes; primary runtime mains are gNB, NR UE, eNB, LTE UE, RU/ORU, and NR CU-UP.
Paths: CMakeLists.txt, executables/nr-softmodem.c, executables/nr-gnb.c, executables/nr-ue.c, executables/lte-softmodem.c, executables/nr-cuup.c.
Process bootstrap, configuration, and tasking
Executables load command-line, libconfig, or YAML configuration, initialize radio/L1/L2/control-plane tasks, then run concurrent real-time processing. Common configuration is a key boundary between deployment-specific .conf/YAML and protocol modules. Inter-task messaging and queues decouple many protocol/control tasks.
Paths: common/config/config_load_configmodule.c, common/config/yaml/config_yaml.cpp, executables/create_tasks.c, common/utils/ocp_itti/intertask_interface.cpp.
PHY and real-time radio pipeline
openair1 implements LTE and NR Layer 1: frame setup, OFDM/modulation, reference signals, channel estimation, transport coding/decoding (including LDPC and Polar), and per-slot gNB/UE procedures. The PHY exchanges scheduling requests/results with Layer 2 and IQ samples with a selected radio backend.
Paths: openair1/SCHED_NR/phy_procedures_nr_gNB.c, openair1/SCHED_NR_UE/phy_procedures_nr_ue.c, openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c.
Layer 2, RRC, and user plane
NR and LTE MAC schedule radio resources and bridge to PHY; RLC/PDCP/SDAP manage bearer data, retransmission, security, and QoS; RRC owns UE/cell context and radio-bearer control. In a monolithic gNB these layers are in-process; split deployments redirect their interfaces through F1/E1 components.
Paths: openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c, openair2/LAYER2/nr_rlc/nr_rlc_entity.c, openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c, openair2/RRC/NR/rrc_gNB.c.
External 3GPP and RAN interfaces
Control-plane modules encode/decode ASN.1 protocol messages and use SCTP toward 5G/LTE cores. NGAP connects gNBs to a 5GC; S1AP serves LTE EPC connectivity. F1AP separates CU/DU, E1AP separates CU-CP/CU-UP, and NFAPI/FAPI separates MAC/VNF from PHY/PNF, including Aerial integration.
Paths: openair3/NGAP/ngap_gNB.c, openair2/F1AP/f1ap_cu_task.c, openair2/E1AP/e1ap.c, nfapi/oai_integration/nfapi.c.
Radio and fronthaul boundary
The radio abstraction supports hardware drivers (notably USRP), Ethernet, RF simulation, virtual simulation, ZeroMQ, and O-RAN 7.2 fronthaul. These modules are runtime-selected integration boundaries: they convert PHY sample streams or split-plane traffic to hardware/network transports. O-RAN ORU handling includes packetization, compression, timing, and optional management-plane support.
Paths: radio/COMMON/common_lib.h, radio/USRP/usrp_lib.cpp, radio/rfsimulator/simulator.cpp, fronthaul/oru/oru_fh.c, radio/fhi_72/oaioran.c.
Deployment, observability, and validation
Native Linux processes can be containerized for Ubuntu/RHEL, run under Docker Compose simulation scenarios, or deployed through OpenShift/Kubernetes-oriented manifests and Helm jobs. CI orchestration drives builds and radio/core integration scenarios. Runtime diagnostics include logging, tracing, and an optional web control server with Angular frontend.
Paths: docker/Dockerfile.gNB.ubuntu, ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml, ci-scripts/main.py, common/utils/LOG/log.c, common/utils/websrv/websrv.c.
Main entry points: nr-softmodem.c Softmodem processes · create_tasks.c Task creation and ITTI · rrc_gNB.c RRC control · phy_procedures_nr_gNB.c NR/LTE PHY procedures
Components 19
Softmodem runtime
Role-specific processes and concurrent task bootstrap.
- CMake role builds · Builds the role-specific softmodem binaries.
CMakeLists.txt - Softmodem processes · gNB, UE, eNB, LTE UE, RU/ORU, and CU-UP roles.
executables/nr-softmodem.c - Configuration loading · Loads CLI, libconfig, and YAML deployment settings.
common/config/config_load_configmodule.c - Task creation and ITTI · Initializes protocol tasks and inter-task queues.
executables/create_tasks.c
RAN protocol stack
Real-time PHY and in-process L2/L3 functions.
- NR/LTE PHY procedures · Per-slot gNB and UE radio processing.
openair1/SCHED_NR/phy_procedures_nr_gNB.c - Channel coding · LDPC and Polar transport decoding/encoding.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c - MAC scheduling · Schedules radio resources and exchanges PHY results.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c - RLC / PDCP / SDAP · Handles retransmission, security, and QoS bearers.
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c - RRC control · Owns cell, UE context, and radio-bearer control.
openair2/RRC/NR/rrc_gNB.c
Split and core interfaces
3GPP control and disaggregation boundaries.
- NGAP / S1AP core access · ASN.1 and SCTP connectivity to 5GC or EPC.
openair3/NGAP/ngap_gNB.c - F1AP CU/DU split · Redirects split RAN control and user interfaces.
openair2/F1AP/f1ap_cu_task.c - E1AP CU split · Separates CU control and user-plane functions.
openair2/E1AP/e1ap.c - NFAPI / FAPI · Connects MAC/VNF to PHY/PNF and Aerial integrations.
nfapi/oai_integration/nfapi.c
Radio and fronthaul
Runtime-selected sample and fronthaul transports.
- Radio abstraction · Selects SDR, Ethernet, simulation, or ZeroMQ transport.
radio/COMMON/common_lib.h - SDR and RF simulation · USRP and RF simulator implementations.
radio/USRP/usrp_lib.cpp - O-RAN 7.2 fronthaul · Handles ORU packetization, compression, and timing.
fronthaul/oru/oru_fh.c
Delivery and operations
Deployment, validation, and diagnostics.
- Containers and cluster deploy · Docker, Compose, OpenShift/Kubernetes, and Helm delivery.
docker/Dockerfile.gNB.ubuntu - CI integration scenarios · Builds and runs radio/core integration scenarios.
ci-scripts/main.py - Logging and web control · Runtime logging, tracing, and optional web control.
common/utils/LOG/log.c
Connections 22
- CMake role builds → Softmodem processes: builds
- Softmodem processes → Configuration loading: loads
- Softmodem processes → Task creation and ITTI: bootstraps
- Configuration loading → Task creation and ITTI: configures
- Task creation and ITTI → NR/LTE PHY procedures: runs task
- Task creation and ITTI → MAC scheduling: runs task
- Task creation and ITTI → RRC control: runs task
- MAC scheduling → NR/LTE PHY procedures: scheduling and results
- NR/LTE PHY procedures → Channel coding: transport processing
- RLC / PDCP / SDAP → MAC scheduling: radio PDUs
- RRC control → RLC / PDCP / SDAP: bearer control
- RRC control → NGAP / S1AP core access: core signaling
- RRC control → F1AP CU/DU split: CU/DU mode
- RLC / PDCP / SDAP → E1AP CU split: CU-UP mode
- MAC scheduling → NFAPI / FAPI: MAC-PHY split
- NR/LTE PHY procedures → Radio abstraction: IQ samples
- Radio abstraction → SDR and RF simulation: selects backend
- Radio abstraction → O-RAN 7.2 fronthaul: fronthaul mode
- Containers and cluster deploy → Softmodem processes: packages and deploys
- CI integration scenarios → Containers and cluster deploy: runs scenarios
- CI integration scenarios → Softmodem processes: validates integration
- Softmodem processes → Logging and web control: emits diagnostics