edgecomllc / eupf

5G User Plane Function (UPF) based on eBPF
Apache License 2.0
100 stars 20 forks source link

srsRAN research #403

Closed pirog-spb closed 11 months ago

pirog-spb commented 1 year ago

srsRAN project provides 4G/5G RAN software based solutions which could be used as complete RAN solution or together with virtual radio(ZeroMQ). I'm as a eUPF bundle vendor integrates with yet another virtual RAN solution in order to overcome current virtual RAN(UERANSIM) constrains and to verify eUPF interoperability with RAN.

Acceptance criteria:

PapaySail commented 1 year ago

Explore srsRAN project description

Usable scenario is ZeroMQ-based Setup

srsRAN Project is a 5G CU/DU solution and does not include a UE application. However, srsRAN 4G does include a prototype 5G UE (srsUE) which can be used for testing.

some approach: @gradiant helm charts described in Open5GS EPC and SRS LTE in kubernetes

There is an image openverso/srsran-5g:23_5

For UE there is an image openverso/srsran-4g:23_04_1

πŸ“Note from openaicellular

Natively, ZeroMQ with srsRAN supports only one eNB/gNB and one UE configuration but it can be extended to support multiple UEs using GNU Radio. Have a look at the tutorial to do this here.

PapaySail commented 1 year ago

Create simple deployment with eUPF, Open5GS and srsRAN(ZeroMQ)

gNB config from scenario ZeroMQ-based Setup is not fully compatible in syntax with the latest release 23.5.

Working gNb config is:

```yaml # This configuration file example shows how to configure the srsRAN Project gNB to allow srsUE to connect to it. # This specific example uses ZMQ in place of a USRP for the RF-frontend, and creates an FDD cell with 10 MHz bandwidth. # To run the srsRAN Project gNB with this config, use the following command: # sudo ./gnb -c gnb_zmq.yaml amf: addr: 10.233.22.229 bind_addr: 10.233.64.35 rf_driver: device_driver: zmq # The RF driver name. device_args: tx_port=tcp://127.0.0.1:2000,rx_port=tcp://127.0.0.1:2001,base_srate=11.52e6 # Optionally pass arguments to the selected RF driver. srate: 11.52 # RF sample rate might need to be adjusted according to selected bandwidth. tx_gain: 75 # Transmit gain of the RF might need to adjusted to the given situation. rx_gain: 75 # Receive gain of the RF might need to adjusted to the given situation. cell_cfg: dl_arfcn: 368500 # ARFCN of the downlink carrier (center frequency). band: 3 # The NR band. channel_bandwidth_MHz: 10 # Bandwith in MHz. Number of PRBs will be automatically derived. common_scs: 15 # Subcarrier spacing in kHz used for data. plmn: "00101" # PLMN broadcasted by the gNB. tac: 7 # Tracking area code (needs to match the core configuration). log: filename: /tmp/gnb.log # Path of the log file. all_level: info # Logging level applied to all layers. hex_max_size: 0 pcap: mac_enable: false # Set to true to enable MAC-layer PCAPs. mac_filename: /tmp/gnb_mac.pcap # Path where the MAC PCAP is stored. ngap_enable: false # Set to true to enable NGAP PCAPs. ngap_filename: /tmp/gnb_ngap.pcap # Path where the NGAP PCAP is stored. ```

βœ” Commit srsran gnb helmcharts : gNB based on the latest release of srsRAN Project 23.5 connecting to Open5GS AMF

PapaySail commented 1 year ago

Configuring UE

if you wanted to use the srsue tool with 5G NR instead of LTE, you might use the following command: srsue --ue.radio multi --ue.phy nr

srsue --help

```ruby root@srsran-srs-lte-0:/# /bin/srsue --help Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_zmq.so Inactive RF plugins: Usage: /bin/srsue [OPTIONS] config_file Configuration options: --ue.radio arg (=multi) Type of the radio [multi] --ue.phy arg (=lte) Type of the PHY [lte] --rf.srate arg (=0) Force Tx and Rx sampling rate in Hz --rf.freq_offset arg (=0) (optional) Frequency offset --rf.rx_gain arg (=-1) Front-end receiver gain --rf.tx_gain arg (=-1) Front-end transmitter gain (all channels) --rf.tx_gain[0] arg (=-1) Front-end transmitter gain CH0 --rf.tx_gain[1] arg (=-1) Front-end transmitter gain CH1 --rf.tx_gain[2] arg (=-1) Front-end transmitter gain CH2 --rf.tx_gain[3] arg (=-1) Front-end transmitter gain CH3 --rf.tx_gain[4] arg (=-1) Front-end transmitter gain CH4 --rf.rx_gain[0] arg (=-1) Front-end receiver gain CH0 --rf.rx_gain[1] arg (=-1) Front-end receiver gain CH1 --rf.rx_gain[2] arg (=-1) Front-end receiver gain CH2 --rf.rx_gain[3] arg (=-1) Front-end receiver gain CH3 --rf.rx_gain[4] arg (=-1) Front-end receiver gain CH4 --rf.nof_antennas arg (=1) Number of antennas per carrier --rf.device_name arg (=auto) Front-end device name --rf.device_args arg (=auto) Front-end device arguments --rf.time_adv_nsamples arg (=auto) Transmission time advance --rf.continuous_tx arg (=auto) Transmit samples continuously to the radio or on bursts (auto/yes/no). Default is auto (yes for UHD, no for rest) --rf.bands.rx[0].min arg (=0) Lower frequency boundary for CH0-RX --rf.bands.rx[0].max arg (=0) Higher frequency boundary for CH0-RX --rf.bands.rx[1].min arg (=0) Lower frequency boundary for CH1-RX --rf.bands.rx[1].max arg (=0) Higher frequency boundary for CH1-RX --rf.bands.rx[2].min arg (=0) Lower frequency boundary for CH2-RX --rf.bands.rx[2].max arg (=0) Higher frequency boundary for CH2-RX --rf.bands.rx[3].min arg (=0) Lower frequency boundary for CH3-RX --rf.bands.rx[3].max arg (=0) Higher frequency boundary for CH3-RX --rf.bands.rx[4].min arg (=0) Lower frequency boundary for CH4-RX --rf.bands.rx[4].max arg (=0) Higher frequency boundary for CH4-RX --rf.bands.tx[0].min arg (=0) Lower frequency boundary for CH1-TX --rf.bands.tx[0].max arg (=0) Higher frequency boundary for CH1-TX --rf.bands.tx[1].min arg (=0) Lower frequency boundary for CH1-TX --rf.bands.tx[1].max arg (=0) Higher frequency boundary for CH1-TX --rf.bands.tx[2].min arg (=0) Lower frequency boundary for CH2-TX --rf.bands.tx[2].max arg (=0) Higher frequency boundary for CH2-TX --rf.bands.tx[3].min arg (=0) Lower frequency boundary for CH3-TX --rf.bands.tx[3].max arg (=0) Higher frequency boundary for CH3-TX --rf.bands.tx[4].min arg (=0) Lower frequency boundary for CH4-TX --rf.bands.tx[4].max arg (=0) Higher frequency boundary for CH4-TX --rat.eutra.dl_earfcn arg (=3400) Downlink EARFCN list --rat.eutra.ul_earfcn arg Uplink EARFCN list. Optional. --rat.eutra.dl_freq arg (=-1) Downlink Frequency (if positive overrides EARFCN) --rat.eutra.ul_freq arg (=-1) Uplink Frequency (if positive overrides EARFCN) --rat.eutra.nof_carriers arg (=1) Number of carriers --rat.nr.bands arg (=3) Supported NR bands --rat.nr.nof_carriers arg (=0) Number of NR carriers --rat.nr.max_nof_prb arg (=52) Maximum NR carrier bandwidth in PRB --rat.nr.dl_nr_arfcn arg (=368500) DL ARFCN of NR cell --rat.nr.ssb_nr_arfcn arg (=368410) SSB ARFCN of NR cell --rat.nr.nof_prb arg (=52) Actual NR carrier bandwidth in PRB --rat.nr.scs arg (=15) PDSCH subcarrier spacing in kHz --rat.nr.ssb_scs arg (=15) SSB subcarrier spacing in kHz --rrc.feature_group arg (=3859025920) Hex value of the featureGroupIndicators field in theUECapabilityInformation message. Default 0xe6041000 --rrc.ue_category arg (=4) UE Category (1 to 10) --rrc.ue_category_dl arg (=-1) UE Category DL v12 (valid values: 0, 4, 6, 7, 9 to 16) --rrc.ue_category_ul arg (=-1) UE Category UL v12 (valid values: 0, 3, 5, 7, 8 and 13) --rrc.release arg (=8) UE Release (8 to 15) --rrc.mbms_service_id arg (=-1) MBMS service id for autostart (-1 means disabled) --rrc.mbms_service_port arg (=4321) Port of the MBMS service --rrc.nr_measurement_pci arg (=500) NR PCI for the simulated NR measurement --rrc.nr_short_sn_support arg (=1) Announce PDCP short SN support --nas.apn arg Set Access Point Name (APN) for data services --nas.apn_protocol arg Set Access Point Name (APN) protocol for data services --nas.user arg Username for CHAP authentication --nas.pass arg Password for CHAP authentication --nas.force_imsi_attach arg (=0) Whether to always perform an IMSI attach --nas.eia arg (=1,2,3) List of integrity algorithms included in UE capabilities --nas.eea arg (=0,1,2,3) List of ciphering algorithms included in UE capabilities --slicing.enable arg (=0) enable slicing in the UE --slicing.nssai-sst arg (=1) sst of requested slice --slicing.nssai-sd arg (=1) sd of requested slice --pcap.enable arg (=none) Enable (MAC, MAC_NR, NAS) packet captures for wireshark --pcap.mac_filename arg (=/tmp/ue_mac.pcap) MAC layer capture filename --pcap.mac_nr_filename arg (=/tmp/ue_mac_nr.pcap) MAC_NR layer capture filename --pcap.nas_filename arg (=/tmp/ue_nas.pcap) NAS layer capture filename --gui.enable arg (=0) Enable GUI plots --log.rf_level arg RF log level --log.phy_level arg PHY log level --log.phy_lib_level arg PHY lib log level --log.phy_hex_limit arg PHY log hex dump limit --log.mac_level arg MAC log level --log.mac_hex_limit arg MAC log hex dump limit --log.rlc_level arg RLC log level --log.rlc_hex_limit arg RLC log hex dump limit --log.pdcp_level arg PDCP log level --log.pdcp_hex_limit arg PDCP log hex dump limit --log.rrc_level arg RRC log level --log.rrc_hex_limit arg RRC log hex dump limit --log.gw_level arg GW log level --log.gw_hex_limit arg GW log hex dump limit --log.nas_level arg NAS log level --log.nas_hex_limit arg NAS log hex dump limit --log.usim_level arg USIM log level --log.usim_hex_limit arg USIM log hex dump limit --log.stack_level arg Stack log level --log.stack_hex_limit arg Stack log hex dump limit --log.all_level arg (=info) ALL log level --log.all_hex_limit arg (=32) ALL log hex dump limit --log.filename arg (=/tmp/ue.log) Log filename --log.file_max_size arg (=-1) Maximum file size (in kilobytes). When passed, multiple files are created. Default -1 (single file) --usim.mode arg (=soft) USIM mode (soft or pcsc) --usim.algo arg USIM authentication algorithm --usim.op arg USIM operator code --usim.opc arg USIM operator code (ciphered variant) --usim.imsi arg USIM IMSI --usim.imei arg USIM IMEI --usim.k arg USIM K --usim.pin arg PIN in case real SIM card is used --usim.reader arg Force specific PCSC reader. Default: Try all available readers. --gw.netns arg Network namespace to for TUN device (empty for default netns) --gw.ip_devname arg (=tun_srsue) Name of the tun_srsue device --gw.ip_netmask arg (=255.255.255.0) Netmask of the tun_srsue device --channel.dl.enable arg (=0) Enable/Disable internal Downlink channel emulator --channel.dl.awgn.enable arg (=0) Enable/Disable AWGN simulator --channel.dl.awgn.snr arg (=30) SNR in dB --channel.dl.awgn.signal_power arg (=0) Received signal power in decibels full scale (dBfs) --channel.dl.fading.enable arg (=0) Enable/Disable Fading model --channel.dl.fading.model arg (=none) Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc) --channel.dl.delay.enable arg (=0) Enable/Disable Delay simulator --channel.dl.delay.period_s arg (=3600) Delay period in seconds (integer) --channel.dl.delay.init_time_s arg (=0) Initial time in seconds --channel.dl.delay.maximum_us arg (=100) Maximum delay in microseconds --channel.dl.delay.minimum_us arg (=10) Minimum delay in microseconds --channel.dl.rlf.enable arg (=0) Enable/Disable Radio-Link Failure simulator --channel.dl.rlf.t_on_ms arg (=10000) Time for On state of the channel (ms) --channel.dl.rlf.t_off_ms arg (=2000) Time for Off state of the channel (ms) --channel.dl.hst.enable arg (=0) Enable/Disable HST simulator --channel.dl.hst.period_s arg (=7.19999981) HST simulation period in seconds --channel.dl.hst.fd_hz arg (=750) Doppler frequency in Hz --channel.dl.hst.init_time_s arg (=0) Initial time in seconds --channel.ul.enable arg (=0) Enable/Disable internal Downlink channel emulator --channel.ul.awgn.enable arg (=0) Enable/Disable AWGN simulator --channel.ul.awgn.snr arg (=30) Noise level in decibels full scale (dBfs) --channel.ul.awgn.signal_power arg (=30) Transmitted signal power in decibels full scale (dBfs) --channel.ul.fading.enable arg (=0) Enable/Disable Fading model --channel.ul.fading.model arg (=none) Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc) --channel.ul.delay.enable arg (=0) Enable/Disable Delay simulator --channel.ul.delay.period_s arg (=3600) Delay period in seconds (integer) --channel.ul.delay.init_time_s arg (=0) Initial time in seconds --channel.ul.delay.maximum_us arg (=100) Maximum delay in microseconds --channel.ul.delay.minimum_us arg (=10) Minimum delay in microseconds --channel.ul.rlf.enable arg (=0) Enable/Disable Radio-Link Failure simulator --channel.ul.rlf.t_on_ms arg (=10000) Time for On state of the channel (ms) --channel.ul.rlf.t_off_ms arg (=2000) Time for Off state of the channel (ms) --channel.ul.hst.enable arg (=0) Enable/Disable HST simulator --channel.ul.hst.period_s arg (=7.19999981) HST simulation period in seconds --channel.ul.hst.fd_hz arg (=750) Doppler frequency in Hz --channel.ul.hst.init_time_s arg (=0) Initial time in seconds --cfr.enable arg (=0) CFR enable --cfr.mode arg (=manual) CFR mode --cfr.manual_thres arg (=2) Fixed manual clipping threshold for CFR manual mode --cfr.strength arg (=1) CFR ratio between amplitude-limited vs original signal (0 to 1) --cfr.auto_target_papr arg (=7) Signal PAPR target (in dB) in CFR auto modes --cfr.ema_alpha arg (=0.142857149) Alpha coefficient for the power average in auto_ema mode (0 to 1) --phy.worker_cpu_mask arg (=-1) cpu bit mask (eg 255 = 1111 1111) --phy.sync_cpu_affinity arg (=-1) index of the core used by the sync thread --phy.rx_gain_offset arg (=62) RX Gain offset to add to rx_gain to correct RSRP value --phy.prach_gain arg (=-1) Disable PRACH power control --phy.cqi_max arg (=15) Upper bound on the maximum CQI to be reported. Default 15. --phy.cqi_fixed arg (=-1) Fixes the reported CQI to a constant value. Default disabled. --phy.sfo_correct_period arg (=10) Period in ms to correct sample time --phy.sfo_emma arg (=0.100000001) EMA coefficient to average sample offsets used to compute SFO --phy.snr_ema_coeff arg (=0.100000001) Sets the SNR exponential moving average coefficient (Default 0.1) --phy.snr_estim_alg arg (=refs) Sets the noise estimation algorithm. (Default refs) --phy.pdsch_max_its arg (=8) Maximum number of turbo decoder iterations --phy.meas_evm arg (=0) Measure PDSCH EVM, increases CPU load (default false) --phy.nof_phy_threads arg (=3) Number of PHY threads --phy.equalizer_mode arg (=mmse) Equalizer mode --phy.intra_freq_meas_len_ms arg (=20) Duration of the intra-frequency neighbour cell measurement in ms. --phy.intra_freq_meas_period_ms arg (=200) Period of intra-frequency neighbour cell measurement in ms. Maximum as per 3GPP is 200 ms. --phy.correct_sync_error arg (=0) Channel estimator measures and pre-compensates time synchronization error. Increases CPU usage, improves PDSCH decoding in high SFO and high speed UE scenarios. --phy.cfo_is_doppler arg (=0) Assume detected CFO is doppler and correct the UL in the same direction. If disabled, the CFO is assumedto be caused by the local oscillator and the UL correction is in the opposite direction. Default assumes oscillator. --phy.cfo_integer_enabled arg (=0) Enables integer CFO estimation and correction. --phy.cfo_correct_tol_hz arg (=1) Tolerance (in Hz) for digital CFO compensation (needs to be low if interpolate_subframe_enabled=true. --phy.cfo_pss_ema arg (=0.0500000007) CFO Exponential Moving Average coefficient for PSS estimation during TRACK. --phy.cfo_ref_mask arg (=1023) Bitmask for subframes on which to run RS estimation (set to 0 to disable, default all sf) --phy.cfo_loop_bw_pss arg (=0.0500000007) CFO feedback loop bandwidth for samples from PSS --phy.cfo_loop_bw_ref arg (=0.0799999982) CFO feedback loop bandwidth for samples from RS --phy.cfo_loop_pss_tol arg (=400) Tolerance (in Hz) of the PSS estimation method. Below this value, PSS estimation does not feeds back the loopand RS estimations are used instead (when available) --phy.cfo_loop_ref_min arg (=0) Tolerance (in Hz) of the RS estimation method. Below this value, RS estimation does not feeds back the loop --phy.cfo_loop_pss_conv arg (=20) After the PSS estimation is below cfo_loop_pss_tol for cfo_loop_pss_timeout times consecutively, RS adjustments are allowed. --phy.interpolate_subframe_enabled arg (=0) Interpolates in the time domain the channel estimates within 1 subframe. --phy.estimator_fil_auto arg (=0) The channel estimator smooths the channel estimate with an adaptative filter. --phy.estimator_fil_stddev arg (=1) Sets the channel estimator smooth gaussian filter standard deviation. --phy.estimator_fil_order arg (=4) Sets the channel estimator smooth gaussian filter order (even values perform better). --phy.snr_to_cqi_offset arg (=0) Sets an offset in the SNR to CQI table. This is used to adjust the reported CQI. --phy.sss_algorithm arg (=full) Selects the SSS estimation algorithm. --phy.pdsch_csi_enabled arg (=1) Stores the Channel State Information and uses it for weightening the softbits. It is only used in TM1. --phy.pdsch_8bit_decoder arg (=0) Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) --phy.force_ul_amplitude arg (=0) Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling) --phy.detect_cp arg (=0) enable CP length detection --phy.in_sync_rsrp_dbm_th arg (=-130) RSRP threshold (in dBm) above which the UE considers to be in-sync --phy.in_sync_snr_db_th arg (=3) SNR threshold (in dB) above which the UE considers to be in-sync --phy.nof_in_sync_events arg (=10) Number of PHY in-sync events before sending an in-sync event to RRC --phy.nof_out_of_sync_events arg (=20) Number of PHY out-sync events before sending an out-sync event to RRC --expert.lte_sample_rates arg (=0) Whether to use default LTE sample rates instead of shorter variants. --phy.force_N_id_2 arg (=-1) Force using a specific PSS (set to -1 to allow all PSSs). --phy.force_N_id_1 arg (=-1) Force using a specific SSS (set to -1 to allow all SSSs). --phy.nr.store_pdsch_ko arg (=0) Dumps the PDSCH baseband samples into a file on KO reception. --sim.airplane_t_on_ms arg (=-1) On-time for airplane mode (in ms) --sim.airplane_t_off_ms arg (=-1) Off-time for airplane mode (in ms) --general.metrics_period_secs arg (=1) Periodicity for metrics in seconds --general.metrics_csv_enable arg (=0) Write UE metrics to CSV file --general.metrics_csv_filename arg (=/tmp/ue_metrics.csv) Metrics CSV filename --general.metrics_csv_append arg (=0) Set to true to append new output to existing CSV file --general.metrics_csv_flush_period_sec arg (=-1) Periodicity in s to flush CSV file to disk (-1 for auto) --general.metrics_json_enable arg (=0) Write UE metrics to a JSON file --general.metrics_json_filename arg (=/tmp/ue_metrics.json) Metrics JSON filename --general.tracing_enable arg (=0) Events tracing --general.tracing_filename arg (=/tmp/ue_tracing.log) Tracing events filename --general.tracing_buffcapacity arg (=1000000) Tracing buffer capcity --stack.have_tti_time_stats arg (=1) Calculate TTI execution statistics General options: -h [ --help ] Produce help message -v [ --version ] Print version information and exit root@srsran-srs-lte-0:/# ```

... still "cell not found"

Configuring gNB

Example configuration files can be found in the configs/ folder in the srsRAN Project codebase. Looking at configs/gnb_rf_b210_fdd_srsUE.yml: This particular configuration is intended to be used with srsUE. Note the pdcch parameters set in the cell_cfg section. These are set to match the capabilities of srsUE.

  cell_cfg:
    pdcch:
      dedicated:
        ss2_type: common                                            # Set search space to common to match capabilities
        dci_format_0_1_and_1_1: false                               # Use fallback DCI to match srsUE capabilities

But its incompatible with the latest release: INI was not able to parse cell_cfg.pdcch.dedicated.++

root@srsran-srs-lte-0:/# /opt/srsRAN_Project/target/bin/gnb cell_cfg pdcch -h
PDCCH parameters
Usage: /opt/srsRAN_Project/target/bin/gnb cell_cfg pdcch [OPTIONS]

Options:
  -h,--help                   Print this help message and exit
  --ss_type TEXT:{common,ue_dedicated} [ue_dedicated]
                              SearchSpace type for UE data

root@srsran-srs-lte-0:/# /opt/srsRAN_Project/target/bin/gnb -v
srsGNB version 0.1

πŸ€” I found the gnb release 23.5 in this image has an issue. https://github.com/srsran/srsRAN_Project/discussions/92#discussioncomment-6321682

Please use the latest commits in srsUE repo. The issue has been fixed.

So, I need to recreate an image from main branch!

git clone https://github.com/Gradiant/openverso-images.git ; cd openverso-images/images/srsran-5g

edit line in Dockerfile cd srsRAN_Project && echo NOTgit checkout release_$VERSION && \ remove line 93 libuhd4.4.0 \ to avoid error installing package and run sudo docker build . Cheking stdout:

Step 6/20 : RUN cd /opt && git clone https://github.com/srsran/srsRAN_Project.git &&    cd srsRAN_Project && echo NOTgit checkout release_$VERSION &&
 mkdir build &&     cd build &&     cmake -DCMAKE_INSTALL_PREFIX=/opt/srsRAN_Project/target -DENABLE_EXPORT=ON -DENABLE_ZEROMQ=ON -DENABLE_AVX512=False .
./ &&     make
 ---> Running in 48b13a96a32c
Cloning into 'srsRAN_Project'...
NOTgit checkout release_
-- The C compiler identification is GNU 9.4.0
.....................
-- Building srsRAN version 23.5.0
.................
 ---> 7b949998beec
Successfully built 7b949998beec

(it takes ~2 hours)

Push Locally Built Docker Image into the DockerHub (https://hub.docker.com/r/edgecom/library/tags)

```powershell sudo docker tag 7b949998beec edgecom/library:srsran5g-zmq-gnb-23.5 sudo docker push edgecom/library:srsran5g-zmq-gnb-23.5 ```

OK. There is needed options. srsRAN 5G gNB version 23.5.0 (5e6f50a20)

```powershell root@srsran-srs-lte-0:/# /opt/srsRAN_Project/target/bin/gnb cell_cfg pdcch -h PDCCH parameters Usage: /opt/srsRAN_Project/target/bin/gnb cell_cfg pdcch [OPTIONS] [SUBCOMMAND] Options: -h,--help Print this help message and exit Subcommands: common PDCCH Common configuration parameters dedicated PDCCH Dedicated configuration parameters root@srsran-srs-lte-0:/# /opt/srsRAN_Project/target/bin/gnb cell_cfg pdcch dedicated -h PDCCH Dedicated configuration parameters Usage: /opt/srsRAN_Project/target/bin/gnb cell_cfg pdcch dedicated [OPTIONS] Options: -h,--help Print this help message and exit --coreset1_rb_start TEXT:INT in [0 - 275] Starting Common Resource Block (CRB) number for CORESET 1 relative to CRB 0. Default: CRB0 --coreset1_l_crb TEXT:INT in [0 - 275] Length of CORESET 1 in number of CRBs. Default: Across entire BW of cell --coreset1_duration TEXT:INT in [1 - 2] Duration of CORESET 1 in number of OFDM symbols. Default: Max(2, Nof. CORESET#0 symbols) --ss2_n_candidates [UINT,UINT,UINT,UINT,UINT]:{0,1,2,3,4,5,6,8} [[,,,,]] Number of PDCCH candidates per aggregation level for SearchSpace#2. Default: {0, 0, 0, 0, 0} i.e. auto-compute nof. candidates --dci_format_0_1_and_1_1 BOOLEAN [1] DCI format to use in UE dedicated SearchSpace#2 --ss2_type TEXT:{common,ue_dedicated} [ue_dedicated] SearchSpace type for UE dedicated SearchSpace#2 root@srsran-srs-lte-0:/# /opt/srsRAN_Project/target/bin/gnb -v srsRAN 5G gNB version 23.5.0 (5e6f50a20) ```

PapaySail commented 1 year ago

⚠ srsUE with slicing issue

AMF rejected: [gmm] ERROR: Non cleartext IEs is included [0xc] (../src/amf/gmm-handler.c:116) Described in Open5GS issue #958:

Open5GS AMF will follow the following policy to enhance security. If UE does not use a NAS container for Non-cleartext IEs, Open5GS AMF will send Registration reject message. If UE sends Non-cleartext IEs without Integrity-protected, Open5GS AMF will send Registration reject message. If UE does not send NAS container in Security mode complete message, Open5GS AMF will send Registration reject message.

There is a bug in srsRAN_4G UE, see issue srsRAN_Project/issues/165:

When added the slicing section to ue_zmq.yaml, srsue created an InitialUEMessage appended NSSAI to the Plain NAS 5GS Message, and sent it to AMF. On the other hand, according to the specification below, NSSAI is not specified to be included in cleartext IE.

PapaySail commented 1 year ago

βœ” Successfully launched srsUE, PDU session established, traffic goes throught tunnel to UPF.

Details

UE start log: ```prolog Launching srsue + /bin/srsue /ue.conf --log.filename /dev/stdout --log.all_level warning --ue.phy nr --rat.eutra.dl_earfcn 2850 --rat.eutra.nof_carriers 0 --rat.nr.bands 3 --rat.nr.nof_carriers 1 --rrc.ue_category 4 --rrc.release 15 --nas.apn internet Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_zmq.so Inactive RF plugins: Reading configuration file /ue.conf... Built in Release mode using commit fa56836b1 on branch HEAD. Opening 1 channels in RF device=zmq with args=tx_port=tcp://127.0.0.1:2001,rx_port=tcp://127.0.0.1:2000,id=ue,base_srate=11.52e6 Supported RF device list: UHD zmq file CHx base_srate=11.52e6 CHx id=ue Current sample rate is 1.92 MHz with a base rate of 11.52 MHz (x6 decimation) CH0 rx_port=tcp://127.0.0.1:2000 CH0 tx_port=tcp://127.0.0.1:2001 Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) Waiting PHY to initialize ... done! Attaching UE... Closing stdin thread. Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=494 Random Access Complete. c-rnti=0x4601, ta=0 RRC Connected PDU Session Establishment successful. IP: 10.45.0.6 RRC NR reconfiguration successful. ``` From UE's shell: ```prolog <> Pod: open5gslice/srsran-srs-lte-0 | Container: ue root@srsran-srs-lte-0:/# ip --br a lo UNKNOWN 127.0.0.1/8 ::1/128 ip_vti0@NONE DOWN eth0@if198 UP 10.233.64.27/32 fe80::48d9:c0ff:fe25:2ca0/64 tun_srsue UNKNOWN 10.45.0.6/24 root@srsran-srs-lte-0:/# traceroute -ni tun_srsue 1.1.1.1 traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets 1 10.45.0.1 38.530 ms 39.507 ms 39.488 ms 2 188.120.232.247 39.470 ms 39.454 ms 39.435 ms 3 10.0.0.1 40.518 ms 48.201 ms 49.184 ms 4 172.31.141.1 49.190 ms 49.172 ms 49.140 ms 5 172.17.22.104 49.095 ms 172.17.23.111 55.905 ms 172.17.22.104 49.062 ms 6 80.64.102.134 50.528 ms 19.710 ms 17.214 ms 7 80.239.193.241 40.066 ms 41.160 ms 80.64.97.75 18.263 ms 8 80.64.97.74 19.290 ms 18.138 ms 1.1.1.1 17.041 ms root@srsran-srs-lte-0:/# ```

PapaySail commented 1 year ago

πŸ“Note for future optimization. There is SRSRAN Project Docker where docker-compose deployment to build and launch the gnb along with an all-in-one Docker container for Open5GS. There is Dockerfile. But there is no UE. Optinally you can use pre-built image also docker pull rohankharade/srsran:zmq. It is dramatically less in size and fresh, last pushed at Aug 2, 2023 at 11:50 am

PapaySail commented 1 year ago

eUPF with srsUE

    Image:         ghcr.io/edgecomllc/eupf:main
    Image ID:      ghcr.io/edgecomllc/eupf@sha256:085ac2a0dc335e75c5fbe0366d07cacfa5f0f93d6a9d99260a8bdff8d53c01a9

srsUE Built in Release mode using commit fa56836b1 on branch HEAD.

srsUE launch log

```ruby Launching srsue + /bin/srsue /ue.conf --log.filename /dev/stdout --log.all_level warning --ue.phy nr --rat.eutra.dl_earfcn 2850 --rat.eutra.nof_carri ers 0 --rat.nr.bands 3 --rat.nr.nof_carriers 1 --rrc.ue_category 4 --rrc.release 15 --nas.apn internet Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_zmq.so Inactive RF plugins: Reading configuration file /ue.conf... Built in Release mode using commit fa56836b1 on branch HEAD. Opening 1 channels in RF device=zmq with args=tx_port=tcp://127.0.0.1:2001,rx_port=tcp://127.0.0.1:2000,id=ue,base_srate=11.52e6 Supported RF device list: UHD zmq file CHx base_srate=11.52e6 CHx id=ue Current sample rate is 1.92 MHz with a base rate of 11.52 MHz (x6 decimation) CH0 rx_port=tcp://127.0.0.1:2000 CH0 tx_port=tcp://127.0.0.1:2001 Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) Current sample rate is 11.52 MHz with a base rate of 11.52 MHz (x1 decimation) Waiting PHY to initialize ... done! Attaching UE... Closing stdin thread. Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=654 Random Access Complete. c-rnti=0x4601, ta=0 RRC Connected PDU Session Establishment successful. IP: 10.46.0.9 RRC NR reconfiguration successful. ```

❌ Responce packets are not processed at srsUE. πŸ› @pirog-spb kubectl sniff -n open5gslice srsran-srs-lte-0 -f "not host 127.0.0.1"

Details

```ruby root@srsran-srs-lte-0:/# ping -I tun_srsue 10.233.64.1 -c 5 PING 10.233.64.1 (10.233.64.1) from 10.46.0.9 tun_srsue: 56(84) bytes of data. --- 10.233.64.1 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4095ms root@srsran-srs-lte-0:/# ping -I tun_srsue 1.1.1.1 -c2 PING 1.1.1.1 (1.1.1.1) from 10.46.0.9 tun_srsue: 56(84) bytes of data. --- 1.1.1.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1028ms / # iperf3 -c 10.233.64.1 -p 5201 -t 30 -R --bind-dev tun_srsue ^C- - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate iperf3: interrupt - the client has terminated / # ``` Example packets dump ```ruby No. Time Source Destination Protocol Length Info 207 5.762811 10.46.0.9 10.233.64.1 TCP 76 52380 β†’ 5201 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2148501962 TSecr=0 WS=128 208 0.034427 10.46.0.9 10.233.64.1 GTP 120 [TCP Retransmission] 52380 β†’ 5201 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2148501962 TSecr=0 WS=128 209 0.000448 10.233.64.1 10.46.0.9 GTP 112 5201 β†’ 52380 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1892768424 TSecr=2148501962 WS=128 210 0.602288 10.233.22.229 10.233.64.57 SCTP 108 HEARTBEAT 211 0.000019 10.233.64.57 10.233.22.229 SCTP 108 HEARTBEAT_ACK 212 0.379907 10.46.0.9 10.233.64.1 TCP 76 [TCP Retransmission] 52380 β†’ 5201 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2148502979 TSecr=0 WS=128 213 0.027753 10.46.0.9 10.233.64.1 GTP 120 [TCP Retransmission] 52380 β†’ 5201 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2148502979 TSecr=0 WS=128 214 0.000186 10.233.64.1 10.46.0.9 GTP 112 [TCP Retransmission] 5201 β†’ 52380 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1892769434 TSecr=2148501962 WS=128 215 1.028213 10.233.64.1 10.46.0.9 GTP 112 [TCP Retransmission] 5201 β†’ 52380 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1892770462 TSecr=2148501962 WS=128 216 0.959843 10.46.0.9 10.233.64.1 TCP 76 [TCP Retransmission] 52380 β†’ 5201 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2148504995 TSecr=0 WS=128 217 0.041925 10.46.0.9 10.233.64.1 GTP 120 [TCP Retransmission] 52380 β†’ 5201 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM TSval=2148504995 TSecr=0 WS=128 218 0.000190 10.233.64.1 10.46.0.9 GTP 112 [TCP Retransmission] 5201 β†’ 52380 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1892771465 TSecr=2148501962 WS=128 219 2.005978 10.233.64.1 10.46.0.9 GTP 112 [TCP Retransmission] 5201 β†’ 52380 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM TSval=1892773470 TSecr=2148501962 WS=128 ```

srsUE-eUPFpcap.zip

PapaySail commented 1 year ago

move srsRAN chart to separate repo srsRAN5Gue-zmg-gNB

added open5gs full scenario to #417

PapaySail commented 12 months ago

srsRAN5Gue-zmg-gNB to public

Details

```powershell helm registry login registry-1.docker.io -u edgecom helm package srsRAN5Gue-zmg-gNB Successfully packaged chart and saved it to: C:\Users\SergO\Documents\GitHub\srsRAN5Gue-zmg-gNB-0.1.3.tgz PS C:\Users\SergO\Documents\GitHub> ```