From 1015c1f5f0350500173bbe1e9741817544fa8ed7 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Wed, 20 Aug 2025 23:41:34 +0200 Subject: [PATCH] Add new CI pipeline for N2 Handover The pipeline is using the already existing conf files for the source/target gNB CUs/DUs. For the sake of simplicity, neighbour-config.conf has been rewritten and simplified in this commit, then adopted in this pipeline. The file was not used before. --- .../conf_files/gnb-cu.sa.band78.106prb.conf | 2 +- .../conf_files/gnb-cucp.sa.e1-ho-n2.conf | 82 +++++ ci-scripts/conf_files/neighbour-config.conf | 68 ++-- .../xml_files/container_5g_rfsim_n2_ho.xml | 207 ++++++++++++ .../5g_f1_rfsimulator/docker-compose.yaml | 1 + .../5g_rfsimulator_n2_ho/docker-compose.yaml | 308 ++++++++++++++++++ 6 files changed, 630 insertions(+), 38 deletions(-) create mode 100644 ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf create mode 100644 ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml create mode 100644 ci-scripts/yaml_files/5g_rfsimulator_n2_ho/docker-compose.yaml diff --git a/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf b/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf index 051ebd04fc..4294f920ad 100644 --- a/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf +++ b/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf @@ -15,7 +15,7 @@ gNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); - + @include "neighbour-config.conf" nr_cellid = 12345678L; diff --git a/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf b/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf new file mode 100644 index 0000000000..ad4cca969e --- /dev/null +++ b/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf @@ -0,0 +1,82 @@ +Active_gNBs = ( "cu-cp-0"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + +# cell_type = "CELL_MACRO_GNB"; + + gNB_name = "cu-cp-0"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); + @include "neighbour-config.conf" + + nr_cellid = 12345678L; + + tr_s_preference = "f1"; + + local_s_address = "192.168.71.150"; + remote_s_address = "192.168.71.171"; + local_s_portd = 2153; + remote_s_portd = 2153; + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// AMF parameters: + amf_ip_address = ({ ipv4 = "192.168.71.132"; }); + + E1_INTERFACE = + ( + { + type = "cp"; + ipv4_cucp = "192.168.71.150"; + port_cucp = 38462; + ipv4_cuup = "0.0.0.0"; # multiple CU-UPs + port_cuup = 38462; + } + ) + + NETWORK_INTERFACES : + { + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.150"; + }; + } +); + +security = { + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms = ( "nea0" ); + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms = ( "nia2", "nia0" ); + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering = "yes"; + drb_integrity = "no"; +}; + +log_config : { + global_log_level = "info"; + pdcp_log_level = "info"; + rrc_log_level = "info"; + f1ap_log_level = "info"; + ngap_log_level = "info"; +}; diff --git a/ci-scripts/conf_files/neighbour-config.conf b/ci-scripts/conf_files/neighbour-config.conf index 875129365e..4d4cd8136c 100644 --- a/ci-scripts/conf_files/neighbour-config.conf +++ b/ci-scripts/conf_files/neighbour-config.conf @@ -1,52 +1,46 @@ neighbour_list = ( + ########################################################## + # Entry USED BY gNB_ID = 0xe00 (nr_cellid = 1) # + ########################################################## { - nr_cellid = 1; + nr_cellid = 0; # Serving cell of gNB 0xe00 neighbour_cell_configuration = ( { - gNB_ID = 0xb00; - nr_cellid = 2; - physical_cellId = 0x002; - absoluteFrequencySSB = 641280 ; - subcarrierSpacing = 1; #30 KHz - plmn = { mcc = 216; mnc = 03; mnc_length = 2}; - tracking_area_code = 2; - }, - { - gNB_ID = 0xa00; - nr_cellid = 3; - physical_cellId = 0x003; - absoluteFrequencySSB = 641280 ; - subcarrierSpacing = 1; #30 KHz - plmn = { mcc = 999; mnc = 99; mnc_length = 2}; - tracking_area_code = 3; - }, - { - gNB_ID = 0xc00; - nr_cellid = 4; - physical_cellId = 0x004; - absoluteFrequencySSB = 641280 ; - subcarrierSpacing = 1; #30 KHz - plmn = { mcc = 999; mnc = 99; mnc_length = 2}; - tracking_area_code = 4; + gNB_ID = 0xb00; + nr_cellid = 1; # Cell served by gNB 0xb00 + physical_cellId = 1; + absoluteFrequencySSB= 621312; + subcarrierSpacing = 1; # 30 kHz + band = 78; + plmn = { mcc = 208; mnc = 99; mnc_length = 2 }; + tracking_area_code = 1; } - ) + ); }, + + ########################################################## + # Entry USED BY gNB_ID = 0xb00 (nr_cellid = 2) # + ########################################################## { - nr_cellid = 2; + nr_cellid = 1; # Serving cell of gNB 0xb00 neighbour_cell_configuration = ( { - gNB_ID = 0xe00; - nr_cellid = 1; - physical_cellId = 0x000; - absoluteFrequencySSB = 641280 ; - subcarrierSpacing = 1; #30 KHz - plmn = { mcc = 001; mnc = 01; mnc_length = 2}; - tracking_area_code = 1; + gNB_ID = 0xe00; + nr_cellid = 0; # Cell served by gNB 0xe00 + physical_cellId = 0; + absoluteFrequencySSB= 641280; + subcarrierSpacing = 1; # 30 kHz + band = 78; + plmn = { mcc = 208; mnc = 99; mnc_length = 2 }; + tracking_area_code = 1; } - ) + ); } - ); +); +############################################################ +# Common NR measurement-event configuration # +############################################################ nr_measurement_configuration = { Periodical = { diff --git a/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml b/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml new file mode 100644 index 0000000000..1b2e84046c --- /dev/null +++ b/ci-scripts/xml_files/container_5g_rfsim_n2_ho.xml @@ -0,0 +1,207 @@ + + + rfsim-5gnr-f1-n2-ho + F1 SA TDD N2 Handover + wrench + + 111111 + 800813 + 000001 + 000002 + 000003 + 020001 + 020002 + 030001 + 030002 + 000004 + 040001 + 050001 + 020001 + 020002 + 050002 + 030001 + 030002 + 050003 + 020001 + 020002 + 050004 + 050001 + 020001 + 020002 + 050002 + 100001 + 222222 + + + + + Pull_Local_Registry + Pull Images from Local Registry + 0 + oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan + + + + Create_Workspace + Create new Workspace + 0 + 0 + + + + Deploy_Object + Deploy OAI 5G CoreNetwork + ci-scripts/yaml_files/5g_rfsimulator_n2_ho + mysql oai-amf oai-smf oai-upf oai-ext-dn + 0 + 0 + + + + Deploy_Object + Deploy OAI 5G CU-CP/CU-UP/DU 0 + UE RFsim SA + ci-scripts/yaml_files/5g_rfsimulator_n2_ho + oai-cucp-0 oai-cuup-0 oai-du-0 oai-nr-ue + 0 + 0 + + + + Attach_UE + Attach OAI UE (Wait for IP) + rfsim5g_ue + acamas + + + + Deploy_Object + Deploy OAI 5G CU-CP/CU-UP/DU 1 RFsim SA + ci-scripts/yaml_files/5g_rfsimulator_n2_ho + oai-cucp-1 oai-cuup-1 oai-du-1 + 0 + 0 + + + + Ping + Ping NR-UE from ext-dn + rfsim5g_ext_dn + acamas + rfsim5g_ue + acamas + -c 100 -i 0.25 + 5 + + + + Ping + Ping ext-dn from NR-UE + rfsim5g_ue + acamas + rfsim5g_ext_dn + acamas + -c 100 -i 0.25 + 10 + + + + Iperf + Iperf (DL/10Mbps/UDP)(30 sec) + -u -b 3M -t 20 -R + rfsim5g_ue + acamas + rfsim5g_ext_dn + acamas + 5 + 90 + + + + Iperf + Iperf (UL/4Mbps/UDP)(30 sec) + -u -b 1M -t 20 + rfsim5g_ue + acamas + rfsim5g_ext_dn + acamas + 5 + 90 + + + + IdleSleep + Sleep + 5 + + + + Custom_Command + Trigger N2 Handover + acamas + echo ci trigger_n2_ho 1,1 | ncat 192.168.71.150 9090 + yes + + + + Custom_Command + UE (1) connected to DU-PCI 1? + acamas + echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.180 9090 | grep "1234" + + + + Custom_Command + Trigger N2 Handover + acamas + echo ci trigger_n2_ho 0,1 | ncat 192.168.71.180 9090 + yes + + + + Custom_Command + UE (1) connected to DU-PCI 0? + acamas + echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3584" + + + + Undeploy_Object + true + Undeploy all OAI 5G stack + ci-scripts/yaml_files/5g_rfsimulator_n2_ho + 0 + 0 + 10,100,100,100 + 10,100,100,100 + + + + Clean_Test_Server_Images + true + Clean Test Images on Test Server + 0 + oai-gnb-asan oai-nr-cuup-asan oai-nr-ue-asan + + + diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml index 18313d0559..e5061ff679 100644 --- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml @@ -111,6 +111,7 @@ services: public_net: ipv4_address: 192.168.71.150 volumes: + - ../../conf_files/neighbour-config.conf:/opt/oai-gnb/etc/neighbour-config.conf - ../../conf_files/gnb-cu.sa.band78.106prb.conf:/opt/oai-gnb/etc/gnb.conf healthcheck: test: /bin/bash -c "pgrep nr-softmodem" diff --git a/ci-scripts/yaml_files/5g_rfsimulator_n2_ho/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_n2_ho/docker-compose.yaml new file mode 100644 index 0000000000..1149d4f156 --- /dev/null +++ b/ci-scripts/yaml_files/5g_rfsimulator_n2_ho/docker-compose.yaml @@ -0,0 +1,308 @@ +services: + mysql: + container_name: "rfsim5g-mysql" + image: mysql:8.0 + volumes: + - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql + - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh + environment: + - TZ=Europe/Paris + - MYSQL_DATABASE=oai_db + - MYSQL_USER=test + - MYSQL_PASSWORD=test + - MYSQL_ROOT_PASSWORD=linux + healthcheck: + test: /bin/bash -c "/tmp/mysql-healthcheck.sh" + interval: 10s + timeout: 5s + retries: 30 + networks: + public_net: + ipv4_address: 192.168.71.131 + oai-amf: + container_name: "rfsim5g-oai-amf" + image: oaisoftwarealliance/oai-amf:ci-tmp-pr-372-26c14bcd + environment: + - TZ=Europe/paris + volumes: + - ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml + depends_on: + - mysql + networks: + public_net: + ipv4_address: 192.168.71.132 + oai-smf: + container_name: "rfsim5g-oai-smf" + image: oaisoftwarealliance/oai-smf:v2.1.9 + environment: + - TZ=Europe/Paris + volumes: + - ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml + depends_on: + - oai-amf + networks: + public_net: + ipv4_address: 192.168.71.133 + oai-upf: + container_name: "rfsim5g-oai-upf" + image: oaisoftwarealliance/oai-upf:v2.1.9 + environment: + - TZ=Europe/Paris + volumes: + - ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml + depends_on: + - oai-smf + cap_add: + - NET_ADMIN + - SYS_ADMIN + cap_drop: + - ALL + privileged: true + networks: + public_net: + ipv4_address: 192.168.71.134 + interface_name: eth0 + traffic_net: + ipv4_address: 192.168.72.134 + interface_name: eth1 + oai-ext-dn: + privileged: true + container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:focal + entrypoint: /bin/bash -c \ + "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ + "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" + depends_on: + - oai-upf + networks: + traffic_net: + ipv4_address: 192.168.72.135 + healthcheck: + test: /bin/bash -c "ping -c 2 192.168.72.134" + interval: 10s + timeout: 5s + retries: 5 + + oai-cucp-0: + image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop} + container_name: rfsim5g-oai-cucp-0 + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --rfsim --rfsimulator.serveraddr 192.168.71.190 + --telnetsrv --telnetsrv.shrmod ci + --telnetsrv.listenaddr 192.168.71.150 + --gNBs.[0].nr_cellid 0 + --log_config.global_log_options level,nocolor,time + ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0 + depends_on: + - oai-amf + networks: + public_net: + ipv4_address: 192.168.71.150 + volumes: + - ../../conf_files/neighbour-config.conf:/opt/oai-gnb/etc/neighbour-config.conf + - ../../conf_files/gnb-cucp.sa.e1-ho-n2.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + start_period: 10s + start_interval: 500ms + interval: 10s + timeout: 5s + retries: 5 + + oai-cuup-0: + image: ${REGISTRY:-oaisoftwarealliance}/${NRCUUP_IMG:-oai-nr-cuup}:${TAG:-develop} + container_name: rfsim5g-oai-cuup-0 + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time + --gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.71.150 + --gNBs.[0].E1_INTERFACE.[0].ipv4_cuup 192.168.71.151 + --gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.71.151 + --gNBs.[0].local_s_address 192.168.71.151 + ASAN_OPTIONS: detect_leaks=0 + depends_on: + - oai-cucp-0 + networks: + public_net: + ipv4_address: 192.168.71.151 + volumes: + - ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-cuup" + start_period: 10s + start_interval: 500ms + interval: 10s + timeout: 5s + retries: 5 + + + oai-du-0: + image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop} + container_name: rfsim5g-oai-du-0 + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --rfsim + --log_config.global_log_options level,nocolor,time + --gNBs.[0].nr_cellid 0 + --telnetsrv --telnetsrv.listenaddr 192.168.71.171 + --telnetsrv.shrmod ci + --rfsimulator.serveraddr 192.168.71.190 + --gNBs.[0].servingCellConfigCommon.[0].ra_ResponseWindow 5 + ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0 + depends_on: + - oai-cucp-0 + networks: + public_net: + ipv4_address: 192.168.71.171 + volumes: + - ../../conf_files/neighbour-config.conf:/opt/oai-gnb/etc/neighbour-config.conf + - ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + start_period: 10s + start_interval: 500ms + interval: 10s + timeout: 5s + retries: 5 + + oai-nr-ue: + image: ${REGISTRY:-oaisoftwarealliance}/${NRUE_IMG:-oai-nr-ue}:${TAG:-develop} + container_name: rfsim5g-oai-nr-ue + cap_drop: + - ALL + cap_add: + - NET_ADMIN # for interface bringup + - NET_RAW # for ping + environment: + USE_ADDITIONAL_OPTIONS: --rfsim --rfsimulator.serveraddr server + --band 78 -C 3619200000 -r 106 --numerology 1 --ssb 516 + --uicc0.imsi 208990100001100 + --log_config.global_log_options level,nocolor,time + networks: + public_net: + ipv4_address: 192.168.71.190 + devices: + - /dev/net/tun:/dev/net/tun + volumes: + - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf + healthcheck: + test: /bin/bash -c "pgrep nr-uesoftmodem" + interval: 10s + timeout: 5s + retries: 5 + + oai-cucp-1: + image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop} + container_name: rfsim5g-oai-cucp-1 + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --rfsim --rfsimulator.serveraddr 192.168.71.190 + --telnetsrv --telnetsrv.shrmod ci + --telnetsrv.listenaddr 192.168.71.180 + --gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.71.180 + --gNBs.[0].E1_INTERFACE.[0].ipv4_cuup 192.168.71.181 + --gNBs.[0].local_s_address 192.168.71.180 + --gNBs.[0].remote_s_address 192.168.71.181 + --gNBs.[0].gNB_ID 0xb00 + --gNBs.[0].nr_cellid 1 + --gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NG_AMF 192.168.71.180 + --gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.71.180 + --log_config.global_log_options level,nocolor,time + ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0 + networks: + public_net: + ipv4_address: 192.168.71.180 + volumes: + - ../../conf_files/neighbour-config.conf:/opt/oai-gnb/etc/neighbour-config.conf + - ../../conf_files/gnb-cucp.sa.e1-ho-n2.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + start_period: 10s + start_interval: 500ms + interval: 10s + timeout: 5s + retries: 5 + + oai-cuup-1: + image: ${REGISTRY:-oaisoftwarealliance}/${NRCUUP_IMG:-oai-nr-cuup}:${TAG:-develop} + container_name: rfsim5g-oai-cuup-1 + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time + --gNBs.[0].E1_INTERFACE.[0].ipv4_cucp 192.168.71.180 + --gNBs.[0].E1_INTERFACE.[0].ipv4_cuup 192.168.71.181 + --gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.71.181 + --gNBs.[0].local_s_address 192.168.71.181 + ASAN_OPTIONS: detect_leaks=0 + depends_on: + - oai-cucp-0 + networks: + public_net: + ipv4_address: 192.168.71.181 + volumes: + - ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-cuup" + start_period: 10s + start_interval: 500ms + interval: 10s + timeout: 5s + retries: 5 + + oai-du-1: + image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop} + container_name: rfsim5g-oai-du-1 + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --rfsim + --rfsimulator.serveraddr 192.168.71.190 + --log_config.global_log_options level,nocolor,time + --gNBs.[0].gNB_DU_ID 1234 + --gNBs.[0].gNB_ID 0xb00 + --gNBs.[0].nr_cellid 1 + --gNBs.[0].servingCellConfigCommon.[0].physCellId 1 + --gNBs.[0].servingCellConfigCommon.[0].absoluteFrequencySSB 621312 + --gNBs.[0].servingCellConfigCommon.[0].dl_absoluteFrequencyPointA 620040 + --MACRLCs.[0].local_n_address 192.168.71.182 + --MACRLCs.[0].remote_n_address 192.168.71.180 + ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0 + depends_on: + - oai-cucp-1 + networks: + public_net: + ipv4_address: 192.168.71.182 + volumes: + - ../../conf_files/neighbour-config.conf:/opt/oai-gnb/etc/neighbour-config.conf + - ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + start_period: 10s + start_interval: 500ms + interval: 10s + timeout: 5s + retries: 5 + +networks: + public_net: + driver: bridge + name: rfsim5g-oai-public-net + ipam: + config: + - subnet: 192.168.71.128/26 + driver_opts: + com.docker.network.bridge.name: "rfsim5g-public" + traffic_net: + driver: bridge + name: rfsim5g-oai-traffic-net + ipam: + config: + - subnet: 192.168.72.128/26 + driver_opts: + com.docker.network.bridge.name: "rfsim5g-traffic"