ajay | b3f4098 | 2021-12-08 14:26:11 -0800 | [diff] [blame] | 1 | .. |
| 2 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 3 | SPDX-License-Identifier: Apache-2.0 |
ajay | 8794529 | 2021-12-08 00:52:00 -0800 | [diff] [blame] | 4 | .. _gNB-Simulator: |
| 5 | |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 6 | gNB Simulator |
| 7 | ============= |
| 8 | |
Vini Gajjar | e43a47f | 2021-12-16 13:47:04 +0530 | [diff] [blame] | 9 | .. image:: ../_static/images/gNBSim.png |
| 10 | :width: 700px |
| 11 | |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 12 | Description |
| 13 | ----------- |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 14 | The gNBSim tool simulates gNodeB and UE by generating and processing NAS and |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 15 | NGAP messages for the configured UEs and call flows. The tool currently supports |
| 16 | simulation profiles for the following procedures, |
| 17 | |
| 18 | * Registration |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 19 | * UE Initiated PDU Session Establishment |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 20 | * UE Initiated De-registration. |
Vini Gajjar | e43a47f | 2021-12-16 13:47:04 +0530 | [diff] [blame] | 21 | * AN Release |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 22 | * Ue Initiated Service Request Procedure |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 23 | |
| 24 | It is also capable to generate and send user data packets (ICMP echo request) |
| 25 | and process down-link user data (ICMP echo response) over the established data |
| 26 | plane path (N3 Tunnel). |
| 27 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 28 | Configure gNBSim |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 29 | ----------------------- |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 30 | * The config file for gNBSim can be found at *<repo dir>/config/gnbsim.yaml* |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 31 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 32 | *Note: The configuration has following major fields (Read the comments in |
| 33 | the config file for more details)* |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 34 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 35 | * **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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 41 | |
| 42 | * Enable or disable a specific profile using the **enable** field. |
| 43 | |
| 44 | *Note: Currently following profiles are supported* |
| 45 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 46 | * **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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 59 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 60 | Build gNBSim |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 61 | ------------------- |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 62 | * To modify gNBSim and build a new docker image: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 63 | |
| 64 | .. code-block:: bash |
| 65 | |
| 66 | $ cd <repo dir> |
| 67 | $ make docker-build |
| 68 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 69 | * To use newly created image in the AiaB cluster: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 70 | |
| 71 | .. code-block:: bash |
| 72 | |
| 73 | $ cd <aiab repo dir> |
| 74 | $ make reset-5g-test |
| 75 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 76 | Update *ransim-values.yaml* to point to the newly built image, then run: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 77 | |
| 78 | .. code-block:: bash |
| 79 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 80 | $ make 5g-test |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 81 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 82 | (refer AiaB documentation :ref:`aiab-guide`) |
| 83 | |
| 84 | Run gNBSim |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 85 | ----------- |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 86 | * To quickly launch and test AiaB with 5G SD-CORE using gNBSim: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 87 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 88 | .. 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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 96 | |
| 97 | .. code-block:: bash |
| 98 | |
| 99 | $ kubectl exec -it gnbsim-0 -n omec bash |
| 100 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 101 | Then run following command to launch gNBSim: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 102 | |
| 103 | .. code-block:: bash |
| 104 | |
| 105 | $ ./gnbsim |
| 106 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 107 | *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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 110 | |
| 111 | .. code-block:: bash |
| 112 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 113 | $ ./gnbsim --cfg <config file path> |