From dbf261bdbafc2db0def5dc934e3a959744f835f1 Mon Sep 17 00:00:00 2001 From: Eduardo Schulz <33841225+eduardoschulz@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:08:48 -0300 Subject: [PATCH] Update oaicn.md Adding how to add a UE to core --- docs/core-network/oaicn.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/core-network/oaicn.md b/docs/core-network/oaicn.md index 187fb35..ffd7573 100644 --- a/docs/core-network/oaicn.md +++ b/docs/core-network/oaicn.md @@ -30,10 +30,10 @@ mv docker-compose-basic-nrf.yaml ~/oai-cn5g-fed/docker-compose/ You also must configure a route to the internal docker network so that the gNB can make a connection. ```shell -sudo ip route add route 192.168.70.128/26 via {ip_addr_corehost} dev {interface} +sudo ip route add 192.168.70.128/26 via {ip_addr_corehost} dev {interface} #example -sudo ip route add route 192.168.70.128/26 via 191.4.205.38 dev br01 +sudo ip route add 192.168.70.128/26 via 191.4.205.38 dev br01 ``` ## 2.0 Deploying the Core Network @@ -48,6 +48,25 @@ python3 core-networks.py --type start-basic --scenario 1 python3 core-networks.py --type stop-basic --scenario 1 ``` +### 2.1 Adding UE to Core Database +```shell + +docker exec -it mysql bash +mysql -u root -p + +password: linux +``` + +```SQL +use oai_db; +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES +('001010123456789', '5G_AKA', '41B7157E3337F0ADD8DA89210D89E17F', '41B7157E3337F0ADD8DA89210D89E17F', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', '1CD638FC96E02EBD35AA0D41EB6F812F', NULL, NULL, NULL, NULL, '001010123456789'); + +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010123456789', '00101', '{\"sst\": 222, \"sd\": \"123\"}','{\"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\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.4\"}]}}'); +``` +**The configuration above is only going to last until the core is restarted**. If you want to make this static you must make changes on the db files inside path/oaicn/docker-compose/databases/. + ## 3.0 More Information [Basic Deployment using Docker Compose](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_SA5G_BASIC_DEPLOYMENT.md)