# Presentattion of OAI DU
:::success
**References**
- [OAI DU](https://www.affordable5g.eu/wp-content/uploads/sites/63/2022/03/D3.1.pdf)
- [The modules of OAI DU](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/doc/FEATURE_SET.md)
- [LAYER2](https://www.mathworks.com/help/5g/gs/5g-toolbox-and-the-5g-nr-physical-layer.html)
- [GNB Params](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/openair2/GNB_APP/gnb_paramdef.h)
- [5G Wikipedia](https://wiki.patras5g.eu/radio-equipment/g-node-bs)
:::
# OAI DU
OAI DU (Distributed Unit) software it runs the RLC (radio link control), MAC (media access control), and parts of the PHY (physical layer) layer.
- 
OAI gNB uses Fronthaul. FlexRIC integrate with OAI’s 5G cellular radio stack. Meanwhile, they both uses F1 interfaces , which includes F1-C - control plane and F1-U - user plane, for connection CU to DU for OAI.
# The units connected to OAI DU
It has CU (Centralized Unit), and the Radio Unit (RU) - (RRH)
- 
# The modules involved in OAI DU
F1AP – procedure is used to relay the XnAP messages between the CU and DU.
GNB_APP - connects 5G user equipment (UE) to 5G CN (Core Network).
The layer 2 is split into the following sub layers: Radio Link Control (RLC); Medium Access Control (MAC).
X2 Application protocol (X2AP) provides control plane signalling between two eNBs over X2 interface. X2 interface is used in UE relateal procedures between two eNBs.
- 
# LAYER2
|Directory|Description|
|---|---|
|NR_MAC_gNB| File’s gNB_scheduler top level function operates on per subframe basis; file’s mac - MAC functions prototypes for gNB; file main - top init of Layer 2; file mac.h - MAC data structures, constant, and function prototype|
|nr_rlc| file header file’s for nr_rlc_oai_api|
- 
# GNB Params
Openair file definition of configuration parameters for all Gigabit NodeB modules
- 
# gNB_app_task
gNB_app_task is responsible for interface registration and configuration file reading.
- 
# MAC and RLC OAI DU
- 
nr_pdcp provides services to the upper layers that are, RRC and takes service and input from the RLC layer, MAC layer, and P.
NR_MAC_gNB showing position of MAC layer.
PDCP_v10.1.0 has interface with RLC.
- 
nr_rlc indicates connection to RLC has three different transmission modes: transparent mode (), unacknowledged mode (UM) or acknowledged mode (AM), which are determined by the specific type of service.
# Running OAI DU
Launch the DU component:
sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O …/…/…/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
Launch the UE simulator:
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O …/…/…/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
- 
-
- 
# Initialization of OAI DU
- 