# Deep understanding of the OSC’s O-DU High. O-DU High instalation. O-DU High Test.
###### tags: `Internship 2nd level`
:::success
**Goal:**
- Understanding of the O-RAN SC's O-DU high.
- Figured it out what is the O-DU High instalation.
- Overvew of O-DU High Test.
**Resources:**
- [O-RAN SC's O-DU high deep dive](https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-l2/en/latest/overview.html)
- [O-DU High instalation](https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-l2/en/latest/installation-guide.html)
- [O-DU High Test](https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-l2/en/latest/user-guide.html)
- [O-RAN Software Community training course](https://www.youtube.com/watch?v=Bd003K0vqpg)
:::
## Deep understanding of the OSC’s O-DU High.
O-DU implements the functional blocks of L2 layer of a 5G NR protocol stack in SA(StandAlone) mode. These layers primarily include NR MAC, NR Scheduler and NR RLC layers.
O-DU modules are developed as shown in the below diagram..

Figure 1 - O-DU High Architecture Diagram¶
O-DU High Thread Architecture
As shown in Figure 1, there are multiple entities within O-DU High. Modules sharing a given color belong to one thread. O-DU architecture can be defined at a thread level as follows:
Thread 1: O-DU thread
Thread 2: DU APP inclusive of Config Handler, DU Manager, UE Manager, and
ASN.1 Codecs
Thread 3: 5G NR RLC DL and MAC (inclusive of 5G NR SCH and Lower MAC)
Thread 4: 5G NR RLC UL
Thread 5: SCTP Handler
Thread 6: Lower MAC Handler
Thread 7: EGTP Handler
Thread 8: O1
O-DU High Modules
DU APP
This module configures and manages all the operations of O-DU. It interfaces with external entities as follows:
OAM: DU APP interacts with OAM on the O1 interface for configuration, alarms and performance management.
O-CU: DU APP interacts with O-CU for RAN functionalities over the F1 interface which is built on SCTP. Control messages are exchanged on the F1-C interface and data messages on the F1-U interface.
RIC: DU APP interacts with RIC on E2 interface over SCTP.
DU App submodules are as follows:
Config Handler manages the configurations received on O1 interfaces and stores them within DU APP context.
DU Manager handles all cell operations at the DU APP.
UE Manager handles UE contexts at the DU APP.
SCTP handler is responsible for establishing SCTP connections with O-CU, RIC on the F1AP and E2AP interfaces respectively.
EGTP handler is responsible for establishing EGTP connection with O-CU for data message exchange on the F1-U interface.
ASN.1 Codecs contain ASN.1 encode/decode functions which are used for System information, F1AP and E2AP messages.
5G NR RLC
This module provides services for transferring the control and data messages between MAC layer and O-CU (via DU App).
5G NR RLC UL and 5G NR RLC DL are the sub modules of this module that implement uplink and downlink functionality respectively.
5G NR MAC
This module uses the services of the NR physical layer to send and receive data on the various logical channels. Functions of the 5G NR MAC module are as follows:
5G NR MAC is responsible for multiplexing and de-multiplexing of the data on various logical channels.
5G NR SCH schedules resources in UL and DL for cell and UE based procedures. 5G NR SCH is completely encapsulated within the 5G NR MAC i.e., all interactions of the 5G NR SCH is via the 5G NR MAC.
Lower MAC interfaces between the MAC and the O-DU Low. It implements all the messages of FAPI specification. It has a receiver thread to handle messages from L1.
O-DU Utility and Common Functions
These modules contain platform specific files and support O-DU High functionality and message exchanges..
## O-DU High instalation.
Software installation and deployment
This section describes the installation of the O-DU High on the reference hardware.
Libraries
Following libraries are required to compile and execute O-DU High:
GCC
Ubuntu : sudo apt-get install -y build-essential
CentOS : sudo yum groups mark install -y “Development Tools”
Ensure the version is 4.6.3 and above using
gcc –version
LKSCTP
Ubuntu : sudo apt-get install -y libsctp-dev
CentOS : sudo yum install -y lksctp-tools-devel
PCAP:
Ubuntu : sudo apt-get install -y libpcap-dev
CentOS : sudo yum install -y libpcap-devel
Cloning code
Create a folder to clone the O-DU High code into. The folder is hereafter referred to as <O-DU High Directory>.
Clone code into <O-DU High Directory>
git clone “https://gerrit.o-ran-sc.org/r/o-du/l2”
Setting up Netconf server (Only if O1 interface enabled)
Following steps are required to compile and run ODU with O1 interface enabled.
Create a new netconf user
Switch to root user or use sudo and run following commands
Ubuntu :
cd <O-DU High Directory>/l2/build/scripts
sudo ./add_netconf_user.sh
Install Netconf libraries:
libssh, libyang, libnetconf2, sysrepo, netopeer2
Script is provided in the following folder to install these libraries
Ubuntu :
cd <O-DU High Directory>/l2/build/scripts
sudo ./install_lib_O1.sh -c
Install the YANG modules and load initial configuration
Navigate to config folder and update the desired initial configuration
cd <O-DU High Directory>/l2/build/config
Open the startup_config.xml and edit the desired IP and Port for CU, DU and RIC.
Open the nacm_config.xml and edit the desired user name to provide the access to that user.
Open the netconf_server_ipv6.xml and edit the desired netconf server configuration.
Open the oamVesConfig.json and edit the details of OAM VES collector.
Open the smoVesConfig.json and edit the details of SMO VES collector.
Open the netconfConfig.json and edit the details of Netopeer server.
Install the yang modules and load initial configuration.
Ubuntu :
$cd <O-DU High Directory>/l2/build/scripts
$sudo ./load_yang.sh
To enable Standard Defined VES format:
cd l2/src/o1/ves
Enable the Macro “StdDef” in file VesUtils.h
#define StdDef
Start Netopeer2-server:
Ubuntu :
cd <O-DU High Directory>/l2/build/scripts
sudo ./netopeer-server.sh start
Compilation
Build O-DU High:
Navigate to Build folder
cd <O-DU High Directory>/l2/build/odu
Clean O-DU High binary
make clean_odu MACHINE=BIT64 MODE=FDD
Compile O-DU High binary
make odu MACHINE=BIT64 MODE=FDD
Build CU Stub :
Navigate to Build folder
cd <-DU High Directory>/l2/build/odu
Clean CU Stub binary
make clean_cu NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
Compile CU Stub binary
make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
Build RIC Stub :
Navigate to Build folder
cd <O-DU High Directory>/l2/build/odu
Clean RIC Stub binary
make clean_ric NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
Compile RIC Stub binary
make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
Compilation with O1 interface enabled
Build O-DU High:
Navigate to Build folder
cd <O-DU High Directory>/l2/build/odu
Clean O-DU High binary
make clean_odu MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
Compile O-DU High binary
make odu MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
Build CU Stub :
Navigate to Build folder
cd <O-DU High Directory>/l2/build/odu
Clean CU Stub binary
make clean_cu NODE=TEST_STUB MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
Compile CU Stub binary
make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
Build RIC Stub :
Navigate to Build folder
cd <O-DU High Directory>/l2/build/odu
Clean RIC Stub binary
make clean_ric NODE=TEST_STUB MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
Compile RIC Stub binary
make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
The above generated images can be found at:
O-DU high - <O-DU High Directory>/l2/bin/odu
CU Stub - <O-DU High Directory>/l2/bin/cu_stub
RIC Stub - <O-DU High Directory>/l2/bin/ric_stub.
## O-DU High Test.
Assign virtual IP addresses as follows:
ifconfig <interface name>:ODU “192.168.130.81”
ifconfig <interface name>:CU_STUB “192.168.130.82”
ifconfig <interface name>:RIC_STUB “192.168.130.80”
PS: If O1 interface is enabled, IPs should match those configured in “startup_config.xml”
( Refer Installation Guide - “Setting up Netconf server” )
Execute CU Stub:
Navigate to CU execution folder
cd <O-DU High Directory>/l2/bin/cu_stub
Run CU Stub binary
./cu_stub
Execute RIC Stub:
Navigate to RIC execution folder
cd <O-DU High Directory>/l2/bin/ric_stub
Run RIC Stub binary
./ric_stub
Execute O-DU High:
Navigate to ODU execution folder
cd <O-DU High Directory>/l2/bin/odu
Run ODU binary
./odu
PS: CU stub and RIC stub must be run (in no particular sequence) before ODU.
In case O1 is enabled and SMO is not available follow section E below.