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 | |
ajay | cbd1706 | 2022-03-06 11:12:58 -0800 | [diff] [blame] | 28 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 29 | Configure gNBSim |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 30 | ----------------------- |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 31 | * 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] | 32 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 33 | *Note: The configuration has following major fields (Read the comments in |
| 34 | the config file for more details)* |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 35 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 36 | * **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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 42 | |
| 43 | * Enable or disable a specific profile using the **enable** field. |
| 44 | |
| 45 | *Note: Currently following profiles are supported* |
| 46 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 47 | * **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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 60 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 61 | Run gNBSim |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 62 | ----------- |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 63 | * To quickly launch and test AiaB with 5G SD-CORE using gNBSim: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 64 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 65 | .. 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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 73 | |
| 74 | .. code-block:: bash |
| 75 | |
| 76 | $ kubectl exec -it gnbsim-0 -n omec bash |
| 77 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 78 | Then run following command to launch gNBSim: |
Vini Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 79 | |
| 80 | .. code-block:: bash |
| 81 | |
| 82 | $ ./gnbsim |
| 83 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 84 | *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 Gajjar | cdfe0bf | 2021-12-03 14:51:07 +0530 | [diff] [blame] | 87 | |
| 88 | .. code-block:: bash |
| 89 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame] | 90 | $ ./gnbsim --cfg <config file path> |
ajay | cbd1706 | 2022-03-06 11:12:58 -0800 | [diff] [blame] | 91 | |
| 92 | Build 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 | |
| 108 | Update *~/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 | |