5G Simulation Setup Configuration
The downloaded project folder contains several different files of different formats required for the simulation. Please check whether you have all the files listed below, in your directory before attempting to run the simulation.
Defining Network Parameters
When setting up a mobile network, there are several parameters that will be used by the network operators to distinguish themselves from other operators as well as to uniquely identify each customer. As we will be running inside a simulation environment without any real world hardware, we can assign any dummy values to these parameters. Following are the list of parameters which need to be defined prior to the operation
- MCC - Mobile Country Code
- MNC - Mobile Network Code
- SST - Slice Service Type
- SD - Slice Differentiator
- TAC - Tracking Area Code
- PLMN_SUPPORT_TAC - Public Land Mobile Network Support TAC
In the project folder, there are two instances where you need to define these parameters.
- .env file
- oai_db.sql
Environment File
.env Environment file contains the network paramaters which are being used by the docker composer yaml files when setting up the core network and other operator side infrastructure.
SQL Database
oai_db.sql file contains the network parameters of the customers which are to be connected to our custom mobile 5G network. Unlike in the environment file, the parameters are not defined directly in the file. Please follow the following steps to setup your own custom parameters.
1. Changing the Subscription Authentication parameters -
Navigate to the line 153 on the sql file and you can see an INSERT statement as seen on the above image. The following line is one of the inserted data rows. This contains previously mentioned network parameters which is used by the network to authenticate and communicate with each individual UE.
('413171000000001', '5G_AKA', '12345678901234567890123456789012', '12345678901234567890123456789012', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', '23456789012345678901234567890123', NULL, NULL, NULL, NULL, '413171000000001'),
Here the first and the last values which correspond to ueid and supi fields, contains the decoded information. For an example, in our case the value assigned is 413171000000001 which corresponds to 413+17+1000000001. Here,
- 413 - Mobile Country Code
- 17 - Mobile Network Code
- 1000000001 - 10 Digit Counter
Therefore the formula for this value is MCC + MNC + Counter
You need to edit all the insert row statements where each would correspond to a virtual UE in the simulation setup. If you want to increase or decrease the number of UE's, you can add or remove more insert rows with proper MCC, MNC and unique 10 digit counter.
2. Changing the Session Management Parameters -
Navigate to the line 212 on the sql file and you can see an INSERT statement as seen on the above image. These information are used by the network when managing the sessions for each UE. Following line shows one example insert statement,
INSERT INTO
SessionManagementSubscriptionData
(ueid
,servingPlmnid
,singleNssai
,dnnConfigurations
) VALUES ('413171000000001', '41317', '{\"sst\": 2, \"sd\": \"2\"}','{\"default\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"100Mbps\", \"downlink\":\"100Mbps\"}}}');
Similarly, the first ueid column contains the unique IDs of UEs which were defined in the previous step. Other than that there are few more parameters to be set such as servingPlmnid and singleNssai. Here,
- UEID - User Equipment ID
- servingPlmnid - MCC+MNC
- singleNssai - SST and SD values
Similar to the previous step, change all the rows corresponding to your virtual UE devices and if you need additional or to reduce the number of UEs, you can add or remove SQL INSERT statements in this file. Also through dnnConfigurations you can set extra parameters like Netwoek speed, priority etc..