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