Skip to content
pchat-imm edited this page Aug 15, 2024 · 1 revision

Description: install and run RIC and xAPP
Tutorial:

Table of Contents

Installation

ORAN SC RIC

git clone https://github.com/srsran/oran-sc-ric
cd ./oran-sc-ric/

Configuration

1. gNB

  • E2
e2:
  enable_du_e2: true                # Enable DU E2 agent (one for each DU instance)
  e2sm_kpm_enabled: true            # Enable KPM service module
  # addr: 127.0.0.1                   # RIC IP address
  addr: 10.0.2.10
  port: 36421                       # RIC port
  • PCAP
pcap:
  e2ap_enable: true                 # Set to true to enable E2AP PCAPs.
  e2ap_filename: /tmp/gnb_e2ap.pcap # Path where the E2AP PCAP is stored.
  • metrics
metrics:
    enable_json_metrics: true       # Enable reporting metrics in JSON format
    addr: 172.19.1.4                # Metrics-server IP
    port: 55555                     # Metrics-server Port
    rlc_json_enable: 1                # Enable RLC metrics reporting
    rlc_report_period: 1000           # Set reporting period to 1s

2. xApp

2.1. kpm_mon_xapp.py

from this dissucssion to https://github.com/srsran/oran-sc-ric/issues/31 match gNB ID on RIC and xApp

  • gNB ID shown on RIC subscription
ric_rtmgr_sim       | 2024/08/15 08:55:38 POST /ric/v1/handles/associate-ran-to-e2t  body: [{"E2TAddress":"10.0.2.10:38000","ranNamelist":["gnbd_901_070_00019b_0"]}] elapsed: 13.22µs
  • gNB ID in xApp
parser.add_argument("--e2_node_id", type=str, default='gnbd_901_070_00019b_0', help="E2 Node ID")

Run the system

1. open5GS

cd workarea/bladeRF_SDR/open5gs/
sudo ./misc/netconf.sh 
ifconfig ogstun
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1

sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE

sudo ip6tables -t nat -A POSTROUTING -s 2001:db8:cafe::/48 ! -o ogstun -j MASQUERADE

sudo iptables
sudo iptables -L -t nat 
sudo ufw status 
sudo ufw disable 
sudo ufw status 
sudo ./build/tests/app/5gc

2. ORAN SC RIC

cd ./oran-sc-ric
sudo docker compose up

and wait for this message to show up before proceeding

ric_submgr          | RMR is ready now ...

3. gNB

  • enable performance script
cd ./srsRAN_Project
cd ./script/srsran_performance
  • run the system, addr for e2, and bind_addr is important when RIC run on different machine
cd build/app/gnb
sudo ./gnb -c gnb_ric.yml e2 --addr="10.0.2.10" --bind_addr="10.0.2.1"

4. xApp

  • kpm_mon_xapp.py
sudo docker compose exec python_xapp_runner ./kpm_mon_xapp.py --metrics=DRB.UEThpDl,DRB.UEThpUl --kpm_report_style=5

can add more metrics

sudo docker compose exec python_xapp_runner ./kpm_mon_xapp.py --metrics=DRB.UEThpDl,DRB.UEThpUl,DRB.RlcPacketDropRateDl,DRB.PacketSuccessRateUlgNBUu,DRB.RlcSduTransmittedVolumeDL,DRB.RlcSduTransmittedVolumeUL --kpm_report_style=5

those metrics are

  • DRB.UEThpDl - DL throughput
  • DRB.UEThpUl - UL throughput
  • DRB.RlcPacketDropRateDl - RLC DL packet drop rate
  • DRB.PacketSuccessRateUlgNBUu - UL packet success rate
  • DRB.RlcSduTransmittedVolumeDL - RLC DL transmitted SDU volume
  • DRB.RlcSduTransmittedVolumeUL - RLC UL transmitted SDU volume

example of result from xAPP kpm_mon_xapp

RIC Indication Received from gnbd_901_070_00019b_0 for Subscription ID: 3, KPM Report Style: 5
E2SM_KPM RIC Indication Content:
-ColletStartTime:  2024-08-15 09:12:05
-Measurements Data:
--UE_id: 0
---granulPeriod: 1000
---Metric: DRB.UEThpDl, Value: [61]
---Metric: DRB.UEThpUl, Value: [2526]
---Metric: DRB.RlcPacketDropRateDl, Value: [0]
---Metric: DRB.PacketSuccessRateUlgNBUu, Value: [100]
---Metric: DRB.RlcSduTransmittedVolumeDL, Value: [57]
---Metric: DRB.RlcSduTransmittedVolumeUL, Value: [2204]