... | ... | @@ -66,16 +66,15 @@ $ mysql> create database oai_db_v2; |
|
|
$ mysql> exit
|
|
|
# then import the DB
|
|
|
$ cd build/scripts
|
|
|
$ mysql -u root -p oai_db < oai_db_v2.sql
|
|
|
$ mysql -u root -p oai_db_v2 < oai_db_v2.sql
|
|
|
|
|
|
# Import your UE configuration:
|
|
|
$ mysql> use oai_db;
|
|
|
# Provisioning UE information, for example, Imsi: 208950000000031, msisdn: 380561234567, imei: 55000000000001, imei_sv: NULL, ms_ps_status: PURGED, rau_tau_timer: 50, ue_ambr_ul: 40000000
|
|
|
# ue_ambr_dl: 100000000, access_restriction: 47, mme_cap: 0000000000, mmeidentity_idmmeidentity: 1, key: 0x0C0A34601D4F07677303652C0462535B, RFSP-Index: 0, urrp_mme: 0, sqn: 0x40
|
|
|
# rand: ebd07771ace8677a, OPc: 0x63bfa50ee6523365ff14c1f45f88737d
|
|
|
$ mysql> use oai_db_v2;
|
|
|
|
|
|
# Provisioning UE information, for example, ueid: 208950000000035, authenticationMethod: 5G_AKA, encPermanentKey: 0C0A34601D4F07677303652C0462535B, protectionParameterId: 0C0A34601D4F07677303652C0462535B, sequenceNumber: 000000000020, authenticationManagementField: 8000, algorithmId: milenage, encOpcKey: 63bfa50ee6523365ff14c1f45f88737d, encTopcKey: NULL, vectorGenerationInHss: NULL, n5gcAuthMethod: NULL, rgAuthenticationInd: NULL, supi: 208950000000035
|
|
|
|
|
|
$ mysql> INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES ('208950000000035', '5G_AKA', '0C0A34601D4F07677303652C0462535B', '0C0A34601D4F07677303652C0462535B', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', '63bfa50ee6523365ff14c1f45f88737d', NULL, NULL, NULL, NULL, '208950000000035');
|
|
|
|
|
|
$ mysql> INSERT INTO users VALUES
|
|
|
('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
|
|
|
```
|
|
|
|
|
|
#### Deploy MySQL in a docker container
|
... | ... | @@ -83,17 +82,17 @@ $ mysql> INSERT INTO users VALUES |
|
|
You can deploy MySQL in a docker container as following:
|
|
|
|
|
|
```bash
|
|
|
$ docker run --name cn5g-mysql --network oai-cn5g-test-public-net -d mysql/mysql-server:5.7
|
|
|
$ cd oai-cn5g-amf
|
|
|
$ docker cp build/scripts/oai_db.sql cn5g-mysql:/home
|
|
|
$ docker exec -it cn5g-mysql /bin/bash
|
|
|
$ docker run --name cn5g-mysql-udr --network oai-cn5g-test-public-net -d mysql/mysql-server:5.7
|
|
|
$ cd oai-cn5g-udr
|
|
|
$ docker cp build/scripts/oai_db_v2.sql cn5g-mysql-udr:/home
|
|
|
$ docker exec -it cn5g-mysql-udr /bin/bash
|
|
|
|
|
|
```
|
|
|
|
|
|
Then, check the default password (`GENERATED ROOT PASSWORD`) by using the following command
|
|
|
|
|
|
```bash
|
|
|
$ docker logs cn5g-mysql
|
|
|
$ docker logs cn5g-mysql-udr
|
|
|
```
|
|
|
The expected output is as following
|
|
|
|
... | ... | @@ -125,7 +124,7 @@ Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skippin |
|
|
|
|
|
```bash
|
|
|
#provide the corresponding password to login to MySQL
|
|
|
$ docker exec -it cn5g-mysql mysql -uroot -p
|
|
|
$ docker exec -it cn5g-mysql-udr mysql -uroot -p
|
|
|
|
|
|
```
|
|
|
|
... | ... | @@ -135,20 +134,20 @@ Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skippin |
|
|
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'linux';
|
|
|
|
|
|
#IMPORT DB:
|
|
|
$ mysql -u root -p oai_db < oai_db.sql
|
|
|
# Provisioning UE information, for example, Imsi: 208950000000031, msisdn: 380561234567, imei: 55000000000001, imei_sv: NULL, ms_ps_status: PURGED, rau_tau_timer: 50, ue_ambr_ul: 40000000
|
|
|
# ue_ambr_dl: 100000000, access_restriction: 47, mme_cap: 0000000000, mmeidentity_idmmeidentity: 1, key: 0x0C0A34601D4F07677303652C0462535B, RFSP-Index: 0, urrp_mme: 0, sqn: 0x40
|
|
|
# rand: ebd07771ace8677a, OPc: 0x63bfa50ee6523365ff14c1f45f88737d
|
|
|
$ mysql -u root -p oai_db_v2 < oai_db_v2.sql
|
|
|
|
|
|
# Provisioning UE information, for example, ueid: 208950000000035, authenticationMethod: 5G_AKA, encPermanentKey: 0C0A34601D4F07677303652C0462535B, protectionParameterId: 0C0A34601D4F07677303652C0462535B, sequenceNumber: 000000000020, authenticationManagementField: 8000, algorithmId: milenage, encOpcKey: 63bfa50ee6523365ff14c1f45f88737d, encTopcKey: NULL, vectorGenerationInHss: NULL, n5gcAuthMethod: NULL, rgAuthenticationInd: NULL, supi: 208950000000035
|
|
|
|
|
|
$ mysql> INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES ('208950000000035', '5G_AKA', '0C0A34601D4F07677303652C0462535B', '0C0A34601D4F07677303652C0462535B', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', '63bfa50ee6523365ff14c1f45f88737d', NULL, NULL, NULL, NULL, '208950000000035');
|
|
|
|
|
|
mysql> INSERT INTO users VALUES ('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
|
|
|
|
|
|
```
|
|
|
Finally you need to grant the remote access to MySQL from AMF:
|
|
|
Finally you need to grant the remote access to MySQL from UDR:
|
|
|
|
|
|
```bash
|
|
|
mysql> GRANT ALL ON oai_db.* TO root@AMF_IP_ADDR IDENTIFIED BY 'linux';
|
|
|
mysql> GRANT ALL ON oai_db.* TO root@UDR_IP_ADDR IDENTIFIED BY 'linux';
|
|
|
```
|
|
|
Where AMF_IP_ADDR is the IP Address of the AMF
|
|
|
Where UDR_IP_ADDR is the IP Address of the UDR
|
|
|
|
|
|
|
|
|
## UDR Configuration
|
... | ... | |