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