blob: 927c8afcd17930a97afbcfb1562b47477b7db3ad [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
ajaycbd17062022-03-06 11:12:58 -080028
Vini Gajjar816e1852022-01-24 14:32:44 +053029Configure gNBSim
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053030-----------------------
Vini Gajjar816e1852022-01-24 14:32:44 +053031* The config file for gNBSim can be found at *<repo dir>/config/gnbsim.yaml*
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053032
Vini Gajjar816e1852022-01-24 14:32:44 +053033 *Note: The configuration has following major fields (Read the comments in
34 the config file for more details)*
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053035
Vini Gajjar816e1852022-01-24 14:32:44 +053036 * **gnbs**:
37 List of gNB's to be simulated. Each item in the list holds configuration
38 specific to a gNB.
39 * **profiles**:
40 List of test/simulation profiles. Each item in the list holds
41 configuration specific to a profile.
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053042
43* Enable or disable a specific profile using the **enable** field.
44
45 *Note: Currently following profiles are supported*
46
Vini Gajjar816e1852022-01-24 14:32:44 +053047 * **register**:
48 Registration procedure
49 * **pdusessest** (Default):
50 Registration + UE initiated PDU Session Establishment + User Data packets
51 * **deregister**:
52 Registration + UE initiated PDU Session Establishment + User Data packets
53 + Deregister
54 * **anrelease**:
55 Registration + UE initiated PDU Session Establishment + User Data packets
56 + AN Release
57 * **uetriggservicereq**:
58 Registration + UE initiated PDU Session Establishment + User Data packets
59 + AN Release + UE Initiated Service Request
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053060
Vini Gajjar816e1852022-01-24 14:32:44 +053061Run gNBSim
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053062-----------
Vini Gajjar816e1852022-01-24 14:32:44 +053063* To quickly launch and test AiaB with 5G SD-CORE using gNBSim:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053064
Vini Gajjar816e1852022-01-24 14:32:44 +053065 .. code-block:: bash
66
67 $ make 5g-test
68
69 (refer AiaB documentation :ref:`aiab-guide`)
70
71* Alternatively, once 5G SD-CORE is up, you can enter into the gNBSim pod by
72 running:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053073
74 .. code-block:: bash
75
76 $ kubectl exec -it gnbsim-0 -n omec bash
77
Vini Gajjar816e1852022-01-24 14:32:44 +053078 Then run following command to launch gNBSim:
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053079
80 .. code-block:: bash
81
82 $ ./gnbsim
83
Vini Gajjar816e1852022-01-24 14:32:44 +053084 *Note: By default, the gNB Sim reads the configuration from
85 /gnbsim/config/gnb.conf file. To provide a different configuration file, use
86 the below command*
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053087
88 .. code-block:: bash
89
Vini Gajjar816e1852022-01-24 14:32:44 +053090 $ ./gnbsim --cfg <config file path>
ajaycbd17062022-03-06 11:12:58 -080091
92Build gNBSim
93-------------------
94
95* If you find a need to change gNBSim code and use the updated image in the AIAB setup then
96 follow below steps.
97
98* To modify gNBSim and build a new docker image:
99
100 .. code-block:: bash
101
102 $ git clone https://github.com/omec-project/gnbsim.git
103 $ cd gnbsim
104 $ make docker-build #requires golang installed on the machine
105
106* To use newly created image in the AiaB cluster:
107
108Update *~/aether-in-box/sd-core-5g-values.yaml* to point to the newly built image, then run:
109
110 .. code-block:: bash
111
112 $ cd ~/aether-in-a-box/
113 $ make reset-5g-test
114
115
116 .. code-block:: bash
117
118 $ make 5g-test
119
120 (refer AiaB documentation :ref:`aiab-guide`)
121
122