Lab 10: Slicing rApp for NTN
This is an experimental blueprint intended for Non-Terrestrial Network (NTN) evaluation in an emulated environment.
In this lab, you will deploy a 5G Standalone (SA) Non-Terrestrial Network (NTN). The network consists of an OAI NTN gNB, an OAI UE, the OAI minimal 5G Core (5GC), and FlexRIC as the Near-RT RIC. The satellite link between the UE and the gNB is emulated with the OAI RF Simulator in a Low Earth Orbit (LEO) scenario.
In the second part of the lab, you will use the BubbleRAN rApp SDK to run a sample rApp that sends a slicing policy to the Non-RT RIC over the R1 interface. The Non-RT RIC forwards the policy to the Near-RT RIC over the A1 interface. An xApp then enforces the policy at the gNB over the E2 interface. The result is a network slice whose downlink Physical Resource Block (PRB) usage is capped at the NTN gNB.
Network Description
The network is defined in the following file:
ntn-oai-net.yaml
apiVersion: athena.trirematics.io/v1
kind: Network
metadata:
name: oai-rfsim-ntn-leo
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: gnb
stack: 5g-sa
model: oai-ran/monolithic-gnb-ntn
identity:
an-id: 30
tracking-area: 1
radio:
device: rf-sim
annotations:
extras.t9s.io/ntn-scenario: "leo"
cells:
- band: n254
arfcn: 497680
bandwidth: 5MHz
subcarrier-spacing: 15kHz
core-networks:
- minimal.oai-rfsim-ntn-leo
controller: flexric.oai-rfsim-ntn-leo
edge:
- name: flexric
stack: 5g-sa
model: mosaic5g/flexric
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
---
apiVersion: athena.trirematics.io/v1
kind: Terminal
metadata:
name: oai-ue
namespace: trirematics
annotations:
extras.t9s.io/ntn-scenario: "leo"
spec:
vendor: oai
stack: 5g-sa
model: terminal/oai-ue-ntn
preferred-access: gnb.oai-rfsim-ntn-leo
target-cores:
- minimal.oai-rfsim-ntn-leo
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:
- n254
readiness-check:
method: ping
target: google-ip
interface-name: oaitun_ue1
Compared with a terrestrial deployment, note the following NTN-specific settings:
- The gNB uses the
oai-ran/monolithic-gnb-ntnmodel, and the UE uses theterminal/oai-ue-ntnmodel. - The cell operates in band
n254, an NTN band. - The
extras.t9s.io/ntn-scenario: "leo"annotation, set on both the gNB and the UE, selects the satellite orbit. It must be the same on both sides.
Network Deployment
Deploy the network:
brc install network ntn-oai-net.yaml
The ntn-oai-net.yaml file does not include an xApp. The SMO deploys the xApp automatically later in the lab, when the rApp sends its policy.
Run brc observe to check the deployment, and wait until all Elements are in the 1/1 Y state.
Before applying any slice policy, measure the UE's downlink throughput to get a baseline:
brc test throughput oai-ue dl gateway -- -t 60
Write down the result. You will compare it with the throughput after slice enforcement.
Slice Enforcement via rApp
The following rApp applies a policy named slice1 to the Near-RT RIC flexric.oai-rfsim-ntn-leo:
from br_rapp_sdk import A1Services
from br_rapp_sdk.a1_services.a1_policy_types import *
if __name__ == "__main__":
# Initialize the A1Services
a1_services = A1Services()
# Define the policy information
policy_info = PolicyObjectInformation(
near_rt_ric_id =NearRtRicId("flexric.oai-rfsim-ntn-leo"),
policy_type_id=PolicyTypeId("bubbleran/slicing"),
policy_object=PolicyObject(
scope_identifier=ScopeIdentifier(
slice_id=SliceId(
sst=1,
sd="000000"
),
cell_id=CellId(
plmn_id=PlmnId(
mcc="001",
mnc="01"
)
),
),
policy_statements=PolicyStatements(
policy_objectives=PolicyObjectives(
lb_objectives=LbObjectives(
target_prb_usg=10,
prb_usg_type=7
)
)
)
)
)
# Print the policy information in YAML format
print("Policy Object Information: \n", policy_info.yaml())
# Apply the policy
policy_name= "slice1"
result = a1_services.apply_policy(policy_name = policy_name, policy_object = policy_info)
# Check if the operation was successful
if result.status == 'success':
policy_id = result.data.get('policy_id')
print(f"Policy applied successfully: {policy_id}")
else:
print(f"Error applying policy: {result.error}")
The policy works as follows:
- Policy type:
bubbleran/slicing. - Scope: the slice with SST
1and SD000000in PLMN00101. This is the slice the UE is attached to. - Statement: a load-balancing objective with
target_prb_usg=10, which limits the slice to 10% of the downlink PRBs.
Before you run the rApp:
- Make sure the BubbleRAN rApp SDK is installed. If it is not, install it with
pip3 install br-rapp-sdk. - Run the rApp inside the cluster, and make sure your kubeconfig file is located at
~/.kube/config.
Run the rApp:
python3 ./slicing-rapp-ntn.py
The rApp prints the policy in YAML format, followed by Policy applied successfully and the policy ID.
Run brc observe again. A new xApp named slicing.dynxapp-flexric.oai-rfsim-ntn-leo should appear in the list of deployed xApps. Wait until it is in the 1/1 Y state, which means it is deployed and running.
Measure the UE's downlink throughput again, now with the slice policy enforced:
brc test throughput oai-ue dl gateway -- -t 60
The throughput should be noticeably lower than the baseline, because the slice can now use only 10% of the downlink PRBs.
Uninstall
Remove the network and the policy job:
brc remove network ntn-oai-net.yaml
brc remove policyjob slice1
Run brc observe to confirm that all Elements and rApp jobs have been removed.
💬 Questions
- What does the LEO scenario mean in this NTN deployment? How does it differ from a GEO scenario in terms of satellite altitude, propagation delay, and Doppler shift?
- Repeat the lab with the GEO scenario by setting
extras.t9s.io/ntn-scenarioto"geo"on both the gNB and the UE. Compare the throughput results with those of the LEO scenario, with and without slice enforcement. - Extend
slicing-rapp-ntn.pyto support multiple slices with different PRB limits. Compare the throughput results with the single-slice case. - Use the KPM monitoring rApp to monitor the UE's PRB usage and throughput. Compare these values with the throughput reported by
brc test throughput.