blob: cf8eb4084995805e4c5187bc13194f09ef8027dd [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-----------
14The gNB Sim tool simulates gNodeB and UE by generating and processing NAS and
15NGAP messages for the configured UEs and call flows. The tool currently supports
16simulation profiles for the following procedures,
17
18* Registration
19* UE initiated PDU Session Establishment
20* UE Initiated De-registration.
Vini Gajjare43a47f2021-12-16 13:47:04 +053021* AN Release
Vini Gajjarcdfe0bf2021-12-03 14:51:07 +053022
23It is also capable to generate and send user data packets (ICMP echo request)
24and process down-link user data (ICMP echo response) over the established data
25plane path (N3 Tunnel).
26
27Configure gNB Simulator
28-----------------------
29* The config file for GNBSIM can be found at *<repo dir>/config/gnbsim.yaml*
30
31 *Note: The configuration has following major fields (Read the comments in the config file for more details)*
32
33 * **gnbs**: List of gNB's to be simulated. Each item in the list holds configuration specific to a gNB.
34 * **profiles**: List of test/simulation profiles. Each item in the list holds configuration specific to a profile.
35
36* Enable or disable a specific profile using the **enable** field.
37
38 *Note: Currently following profiles are supported*
39
40 * **register**: Registration procedure
41 * **pdusessest** (Default): Registration + UE initiated PDU Session Establishment + User Data packets
42 * **deregister**: Registration + UE initiated PDU Session Establishment + User Data packets + Deregister
43
44Build gNB Simulator
45-------------------
46* To modify gNB Sim within a container run
47
48 .. code-block:: bash
49
50 $ kubectl exec -it gnbsim-0 -n omec bash
51
52 Make required changes and run
53
54 .. code-block:: bash
55
56 $ go build
57
58* To modify gNB Sim and build a new docker image
59
60 .. code-block:: bash
61
62 $ cd <repo dir>
63 $ make docker-build
64
65 Use newly created image in the AIAB cluster run,
66
67 .. code-block:: bash
68
69 $ cd <aiab repo dir>
70 $ make reset-5g-test
71
72 Modify the override file (ransim-values.yaml) to add the new image name
73
74 .. code-block:: bash
75
76 $ make 5gc
77
78Run gNB Sim
79-----------
80
81 Enter into the gNB Sim pod by running
82
83 .. code-block:: bash
84
85 $ kubectl exec -it gnbsim-0 -n omec bash
86
87 After entering the pod run,
88
89 .. code-block:: bash
90
91 $ ./gnbsim
92
93 *Note: By default, the gNB Sim reads the configuration from /free5gc/config/gnb.conf file. To provide a different configuration file,
94 use the below command*
95
96 .. code-block:: bash
97
98 $ ./gnbsim --cfg config/gnbsim.yaml