{%hackmd ElOJTlJjTg-GQtxooVV5iw %} # Open5Gs Installation ![open5Gs Architecture Design](https://hackmd.io/_uploads/BJOFNKMjp.png) ## MongoDB Installation ``` $ sudo apt update $ sudo apt install gnupg $ curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor $ echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list ``` ``` $ sudo apt update $ sudo apt install -y mongodb-org $ sudo systemctl start mongod (if '/usr/bin/mongod' is not running) $ sudo systemctl enable mongod (ensure to automatically start it on system boot) ``` ## Open5Gs Installation using ubuntu packcage manager ``` $ sudo add-apt-repository ppa:open5gs/latest $ sudo apt update $ sudo apt install open5gs ``` ## WebUI Installation ### NodeJS Installation ``` # Download and import the Nodesource GPG key $ sudo apt update $ sudo apt install -y ca-certificates curl gnupg $ sudo mkdir -p /etc/apt/keyrings $ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg # Create deb repository $ NODE_MAJOR=20 $ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list # Run Update and Install $ sudo apt update $ sudo apt install nodejs -y ``` ### Web Installation ``` curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash - ``` ## Register Subscriber Information Connect to http://localhost:3000 and login with admin account. Username : admin Password : 1423 Tip: You can change the password in Account Menu. To add subscriber information, you can do WebUI operations in the following order: Go to Subscriber Menu. Click + Button to add a new subscriber. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber. Click SAVE Button Enter the subscriber details of your SIM cards using this tool, to save the subscriber profile in the HSS and UDR MongoDB database backend. If you are using test SIMs, the details are normally printed on the card. ## Configuration 1. Modify /etc/open5gs/nrf.yaml to set the Serving PLMN ID. ``` $ diff --git a/configs/open5gs/nrf.yaml.in b/configs/open5gs/nrf.yaml.in index cd9e45feb..58e8cbbce 100644 --- a/configs/open5gs/nrf.yaml.in +++ b/configs/open5gs/nrf.yaml.in @@ -10,8 +10,8 @@ global: nrf: serving: # 5G roaming requires PLMN in NRF - plmn_id: - mcc: 999 - mnc: 70 + mcc: 001 + mnc: 01 sbi: server: - address: 127.0.0.10 ``` 2. Modify /etc/open5gs/amf.yaml to set the NGAP IP address, PLMN ID, TAC and NSSAI. ``` $ diff --git a/configs/open5gs/amf.yaml.in b/configs/open5gs/amf.yaml.in index 938917e32..35d0ab5aa 100644 --- a/configs/open5gs/amf.yaml.in +++ b/configs/open5gs/amf.yaml.in @@ -18,27 +18,27 @@ amf: - uri: http://127.0.0.200:7777 ngap: server: - - address: 127.0.0.5 + - address: 10.10.0.5 metrics: server: - address: 127.0.0.5 port: 9090 guami: - plmn_id: - mcc: 999 - mnc: 70 + mcc: 001 + mnc: 01 amf_id: region: 2 set: 1 tai: - plmn_id: - mcc: 999 - mnc: 70 + mcc: 001 + mnc: 01 tac: 1 plmn_support: - plmn_id: - mcc: 999 - mnc: 70 + mcc: 001 + mnc: 01 s_nssai: - sst: 1 security: ``` 3. Modify /etc/open5gs/upf.yaml to set the GTP-U address. ``` $ diff --git a/configs/open5gs/upf.yaml.in b/configs/open5gs/upf.yaml.in index e78b018f1..35a54419e 100644 --- a/configs/open5gs/upf.yaml.in +++ b/configs/open5gs/upf.yaml.in @@ -15,7 +15,7 @@ upf: # - address: 127.0.0.4 gtpu: server: - - address: 127.0.0.7 + - address: 10.11.0.7 session: - subnet: 10.45.0.1/16 - subnet: 2001:db8:cafe::1/48 ``` 4. Restart Service ``` $ sudo systemctl restart open5gs-smfd $ sudo systemctl restart open5gs-amfd $ sudo systemctl restart open5gs-upfd $ sudo systemctl restart open5gs-hssd $ sudo systemctl restart open5gs-pcrfd $ sudo systemctl restart open5gs-nrfd $ sudo systemctl restart open5gs-ausfd $ sudo systemctl restart open5gs-udmd $ sudo systemctl restart open5gs-nssfd $ sudo systemctl restart open5gs-udrd $ sudo systemctl restart open5gs-webui ```