blob: b7ba78962ebbd567a82189e59ffc5e8818e11caa [file] [log] [blame]
ajayb3f40982021-12-08 14:26:11 -08001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
ajay87945292021-12-08 00:52:00 -08004.. _gNB-Simulator:
5
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +05306gNB Simulator
7=============
8
Vini Gajjare43a47f2021-12-16 13:47:04 +05309.. image:: ../_static/images/gNBSim.png
10 :width: 700px
11
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053012Description
13-----------
Vini Gajjar816e1852022-01-24 14:32:44 +053014The gNBSim tool simulates gNodeB and UE by generating and processing NAS and
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053015NGAP messages for the configured UEs and call flows. The tool currently supports
16simulation profiles for the following procedures,
17
18* Registration
Vini Gajjar816e1852022-01-24 14:32:44 +053019* UE Initiated PDU Session Establishment
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053020* UE Initiated De-registration.
Vini Gajjare43a47f2021-12-16 13:47:04 +053021* AN Release
Vini Gajjar816e1852022-01-24 14:32:44 +053022* Ue Initiated Service Request Procedure
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053023
24It is also capable to generate and send user data packets (ICMP echo request)
25and process down-link user data (ICMP echo response) over the established data
26plane path (N3 Tunnel).
27
Vini Gajjar816e1852022-01-24 14:32:44 +053028Configure gNBSim
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053029-----------------------
Vini Gajjar816e1852022-01-24 14:32:44 +053030* The config file for gNBSim can be found at *<repo dir>/config/gnbsim.yaml*
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053031
Vini Gajjar816e1852022-01-24 14:32:44 +053032 *Note: The configuration has following major fields (Read the comments in
33 the config file for more details)*
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053034
Vini Gajjar816e1852022-01-24 14:32:44 +053035 * **gnbs**:
36 List of gNB's to be simulated. Each item in the list holds configuration
37 specific to a gNB.
38 * **profiles**:
39 List of test/simulation profiles. Each item in the list holds
40 configuration specific to a profile.
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053041
42* Enable or disable a specific profile using the **enable** field.
43
44 *Note: Currently following profiles are supported*
45
Vini Gajjar816e1852022-01-24 14:32:44 +053046 * **register**:
47 Registration procedure
48 * **pdusessest** (Default):
49 Registration + UE initiated PDU Session Establishment + User Data packets
50 * **deregister**:
51 Registration + UE initiated PDU Session Establishment + User Data packets
52 + Deregister
53 * **anrelease**:
54 Registration + UE initiated PDU Session Establishment + User Data packets
55 + AN Release
56 * **uetriggservicereq**:
57 Registration + UE initiated PDU Session Establishment + User Data packets
58 + AN Release + UE Initiated Service Request
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053059
Vini Gajjar816e1852022-01-24 14:32:44 +053060Build gNBSim
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053061-------------------
Vini Gajjar816e1852022-01-24 14:32:44 +053062* To modify gNBSim and build a new docker image:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053063
64 .. code-block:: bash
65
66 $ cd <repo dir>
67 $ make docker-build
68
Vini Gajjar816e1852022-01-24 14:32:44 +053069* To use newly created image in the AiaB cluster:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053070
71 .. code-block:: bash
72
73 $ cd <aiab repo dir>
74 $ make reset-5g-test
75
Vini Gajjar816e1852022-01-24 14:32:44 +053076 Update *ransim-values.yaml* to point to the newly built image, then run:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053077
78 .. code-block:: bash
79
Vini Gajjar816e1852022-01-24 14:32:44 +053080 $ make 5g-test
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053081
Vini Gajjar816e1852022-01-24 14:32:44 +053082 (refer AiaB documentation :ref:`aiab-guide`)
83
84Run gNBSim
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053085-----------
Vini Gajjar816e1852022-01-24 14:32:44 +053086* To quickly launch and test AiaB with 5G SD-CORE using gNBSim:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053087
Vini Gajjar816e1852022-01-24 14:32:44 +053088 .. code-block:: bash
89
90 $ make 5g-test
91
92 (refer AiaB documentation :ref:`aiab-guide`)
93
94* Alternatively, once 5G SD-CORE is up, you can enter into the gNBSim pod by
95 running:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053096
97 .. code-block:: bash
98
99 $ kubectl exec -it gnbsim-0 -n omec bash
100
Vini Gajjar816e1852022-01-24 14:32:44 +0530101 Then run following command to launch gNBSim:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +0530102
103 .. code-block:: bash
104
105 $ ./gnbsim
106
Vini Gajjar816e1852022-01-24 14:32:44 +0530107 *Note: By default, the gNB Sim reads the configuration from
108 /gnbsim/config/gnb.conf file. To provide a different configuration file, use
109 the below command*
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +0530110
111 .. code-block:: bash
112
Vini Gajjar816e1852022-01-24 14:32:44 +0530113 $ ./gnbsim --cfg <config file path>