Lab 6: Advanced RAN Slicing
This experiment is to deploy a 5G Standalone (SA) network using OpenAirInterface (OAI) RF Simulator gNB and OAI minimal 5GC. We also deploy FlexRIC as the Near-RT RIC. Finally a CCC xApp for RAN Slicing will be deployed on bare-metal connecting to the RIC.
open-ran.yaml
apiVersion: athena.trirematics.io/v1
kind: Network
metadata:
name: bubbleran
namespace: trirematics
spec:
slices:
- plmn: "00101"
dnn: "internet"
network-mode: "IPv4"
service-type: 1
differentiator: 0x000000
ipv4-range: "12.1.1.0/24"
ipv6-range: "2001:db8:1::/64"
access:
- name: oai-gnb
stack: 5g-sa
model: oai-ran/monolithic-gnb
identity:
an-id: 50
radio:
device: rf-sim
cells:
- band: n78
arfcn: 641280
bandwidth: 40MHz
subcarrier-spacing: 30kHz
tdd-config:
period: 5000
dl-slots: 7
dl-symbols: 6
ul-slots: 2
ul-symbols: 4
controller: flexric.bubbleran
core-networks:
- minimal.bubbleran
core:
- name: minimal
stack: 5g-sa
model: oai-cn/minimal
identity:
region: 0
cn-group: 4
cn-id: 5
dns:
ipv4:
default: 8.8.8.8
secondary: 8.8.4.4
edge:
- name: flexric
stack: 5g-sa
model: mosaic5g/flexric
---
apiVersion: athena.trirematics.io/v1
kind: Terminal
metadata:
name: ue1
namespace: trirematics
spec:
vendor: oai
stack: 5g-sa
model: terminal/oai-ue
preferred-access: oai-gnb.bubbleran
target-cores:
- minimal.bubbleran
identity:
imsi: "001010000000001"
pin: "1234"
opc: "0xc42449363bbad02b66d16bc975d77cc1"
key: "0xfec86ba6eb707ed08905757b1bb44b8f"
sqn: "0xff9bb4000001"
slice:
dnn: "internet"
network-mode: "IPv4"
service-type: 1
differentiator: 0x000000
radio:
device: rf-sim
formation: "1x1"
bands:
- n78
readiness-check:
method: ping
target: google-ip
interface-name: oaitun_ue1
---
apiVersion: athena.trirematics.io/v1
kind: Terminal
metadata:
name: ue2
namespace: trirematics
spec:
vendor: oai
stack: 5g-sa
model: terminal/oai-ue
preferred-access: oai-gnb.bubbleran
target-cores:
- minimal.bubbleran
identity:
imsi: "001010000000002"
pin: "1234"
opc: "0xc42449363bbad02b66d16bc975d77cc1"
key: "0xfec86ba6eb707ed08905757b1bb44b8f"
sqn: "0xff9bb4000001"
slice:
dnn: "internet"
network-mode: "IPv4"
service-type: 1
differentiator: 0x000000
radio:
device: rf-sim
formation: "1x1"
bands:
- n78
readiness-check:
method: ping
target: google-ip
interface-name: oaitun_ue1
Deployment​
Use the command brc install network open-ran.yaml to deploy the network.
It should finish without errors and print out the three Kubernetes resource names that were created.
Check for the status of the deployment using the command brc observe.
Wait until all the Elements other than the UE are in the STATUS set to
1/1 Y state.
After deploying the network you should update the xApp configuration file with the IP of the deployed Near RT-RIC and the local source IP in the cluster subnet.
To do so you may deploy the update_conf.py script which automatically extract the IPs from the cluster and updated the specified configuration file:
cd /path/to/xapp_sdk/conf
python3 update_conf.py xapp.yaml
The script will prompt the user for selecting which Near RT-RIC the xApp should connect to (in case of multiple RICs and/or networks currently deployed). After selecting a RIC to connect an output as the follwing is obtained:
Select the RIC to configure:
1) flexric.flexric.handover (10.244.2.46)
Choice [1-1]: 1
No entries found for Database.
Skipping database IP update.
Config 'xapp.yaml' updated: ip_ric=10.244.2.46, ip_xapp=10.244.0.158
Once the configuration file has been updated accordingly, now the CCC RAN Slicing xApp can be run.
CCC RAN Slicing xApp​
This xApp uses the O-RAN E2SM-CCC (Cell Configuration and Control) Service Model to monitor and control the RRM Policy Ratio (O-RRMPolicyRatio) of two downlink slices, identified by their PLMN and S-NSSAI (SST/SD), on a single connected gNB or gNB-DU:
- It subscribes to periodic CCC indications (REPORT Service Style 1, period 1000 ms) that report the current
O-RRMPolicyRatioconfiguration of the node. - It then sends a CCC control request (CONTROL Service Style 2) to set slice 1 (SST 1) to a 50% max/min/dedicated PRB ratio and slice 2 (SST 2) to 30%.
The SDK defaults in src/dev/c/xapp_oran_ccc_slice_moni_ctrl.c are shown below. The example uses num_dl_slices = 2 and num_ul_slices = 0.
The supplied blueprints use SST 1 with SD 0x000000. Before building, change the first policy's .nssai.sD to 0x000000 so that the control request matches the deployed slice. The second policy configures SST 2 with SD 0x000001, which has no UE in the supplied blueprints.
static ccc_ctrl_rrm_policy_t const rrm_policy_dl[3] = {
{
.resource_type = PRB_DL_RESOURCE_TYPE,
.rrm_policy_max_ratio = 50,
.rrm_policy_min_ratio = 50,
.rrm_policy_dedicated_ratio = 50,
.plmn_id = (e2sm_plmn_t){.mcc = 1, .mnc =1, .mnc_digit_len = 2},
.nssai.sST = 1,
.nssai.sD = 0xffffff // if sD is NULL, put 0xffffff
},
{
.resource_type = PRB_DL_RESOURCE_TYPE,
.rrm_policy_max_ratio = 30,
.rrm_policy_min_ratio = 30,
.rrm_policy_dedicated_ratio = 30,
.plmn_id = (e2sm_plmn_t){.mcc = 1, .mnc =1, .mnc_digit_len = 2},
.nssai.sST = 2,
.nssai.sD = 0x000001
}
};
In order to compile this xApp you should run:
cd /path/to/xapp_sdk/build
cmake ..
make -j
sudo make install
sudo ldconfig
Then in order to run it:
cd /path/to/xapp_sdk
./build/src/dev/c/xapp_oran_ccc_slice_moni_ctrl conf/xapp.yaml
The following example output uses the SDK defaults. With the blueprint adjustment above, the first slice is reported as NSSAI 1.000000:
14:44:22.361860 [INFO]: msg_handler_xapp.c:590 RIC_SUBSCRIPTION_REQUEST tx RAN_FUNC_ID 4 RIC_REQ_ID 1
14:44:22.363334 [INFO]: msg_handler_xapp.c:155 RIC_SUBSCRIPTION_RESPONSE rx RAN_FUNC_ID 4 RIC_REQ_ID 1
CCC ind_msg latency -1276 from E2-Node type 2 ID 3584
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
No slices info from E2-Node
Send Ctrl Msg RAN Conf 0: Resource Type 2 (1:UL,2:DL), Max 50, Min 50, Dedicated 50, NSSAI 1.ffffff
Send Ctrl Msg RAN Conf 1: Resource Type 2 (1:UL,2:DL), Max 30, Min 30, Dedicated 30, NSSAI 2.000001
CCC ind_msg latency -1429 from E2-Node type 2 ID 3584
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
No slices info from E2-Node
14:44:24.363728 [INFO]: msg_handler_xapp.c:635 E42_RIC_CONTROL_REQUEST RAN_FUNC_ID 4 RIC_REQ_ID 2 tx
14:44:24.364842 [INFO]: msg_handler_xapp.c:311 CONTROL ACK rx RIC_REQ_ID 2
[xApp]: Control Loop Latency: 1363 us
CCC ind_msg latency -1206 from E2-Node type 2 ID 3584
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
RAN Conf 0: RRM Policy Ratio: Resource Type 2 (1:UL,2:DL), Max 50, Min 50, Dedicated 50, NSSAI 1.ffffff
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
RAN Conf 1: RRM Policy Ratio: Resource Type 2 (1:UL,2:DL), Max 100, Min 20, Dedicated 20, NSSAI 0.000000
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
RAN Conf 2: RRM Policy Ratio: Resource Type 2 (1:UL,2:DL), Max 30, Min 30, Dedicated 30, NSSAI 2.000001
CCC ind_msg latency -1255 from E2-Node type 2 ID 3584
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
RAN Conf 0: RRM Policy Ratio: Resource Type 2 (1:UL,2:DL), Max 50, Min 50, Dedicated 50, NSSAI 1.ffffff
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
RAN Conf 1: RRM Policy Ratio: Resource Type 2 (1:UL,2:DL), Max 100, Min 20, Dedicated 20, NSSAI 0.000000
Change Type 0, RAN Configuration Structure Name O-RRMPolicyRatio, PLMN 001.01
RAN Conf 2: RRM Policy Ratio: Resource Type 2 (1:UL,2:DL), Max 30, Min 30, Dedicated 30, NSSAI 2.000001
Uninstall​
To uninstall the network, use the following command:
brc remove network open-ran.yaml
Checking via the brc observe command, you should see that all the elements are removed.
Advanced (optional)
This lab can also be performed leveraging an over-the-air deployment. In this section, we provide a sample deployment with a LITEON RU. Similarly to the previous deployment, this includes a 5G Standalone (SA) network with OpenAirInterface (OAI) gNB using a LITEON RU device, and Open5GS core network.
open-ran-liteon.yaml
apiVersion: athena.trirematics.io/v1
kind: Network
metadata:
name: bubbleran
namespace: trirematics
spec:
slices:
- plmn: "00101"
dnn: internet
network-mode: IPv4
service-type: 1
differentiator: 0x000000
ipv4-range: 12.1.1.0/24
ipv6-range: 2001:db8:1::/64
access:
- name: oai-gnb
stack: 5g-sa
model: oai-ran/monolithic-gnb-ru #cu-du-ru
identity:
an-id: 30
tracking-area: 1
radio:
device: oran-7.2
antenna:
formation: 4x4
annotations:
extras.t9s.io/ru-vendor: 'liteon' # or 'benetel'
cells:
- band: n78
arfcn: 650016 # n78, 3.5GHz, 100MHz bandwidth
bandwidth: 100MHz
subcarrier-spacing: 30kHz
tdd-config:
period: 2500
dl-slots: 3
dl-symbols: 6
ul-slots: 1
ul-symbols: 4
core-networks:
- open5gs.bubbleran
controller: flexric.bubbleran
core:
- name: open5gs
stack: 5g-sa
model: open5gs/5gc
scheduling:
nodeName: jogo
profiles:
- debug
identity:
region: 128
cn-group: 4
cn-id: 5
edge:
- name: flexric
stack: 5g-sa
model: mosaic5g/flexric
dns:
ipv4:
default: 8.8.8.8
secondary: 8.8.4.4
Deployment​
Use the command brc install network open-ran-liteon.yaml to deploy the network.
It should finish without errors and print out the three Kubernetes resource names that were created.
Check for the status of the deployment using the command brc observe.
Wait until all the Elements other than the UE are in the STATUS set to
1/1 Y state.
After the network has been successfully deployed, the monitoring xApp can be deployed following the exact same steps previously detailed.
Before deploying this network first make sure:
- The CU-DU node name specified in the deployment file (in this case
bubble2on the sectionscheduling) is correct. - The CU-DU node is able to reach the RU IP specified in the deployment file. If not sure about the IP, please check the Google Sheet (provided to all customers) with all IPs of your MX-PDK.
To do so you may try to ssh into the RU from the node with the command
ssh user@RU-IPreplacingRU-IPwith the actual IP. - The CU-DU node is properly synchronized with the PTP grandmaster switch. To do so you may check the status with
sudo systemctl status ptp4l.service
sudo systemctl status phc2sys.service
- The CU-DU node's DPDK has been setup with
sudo dpdk-setup