Skip to content

Latest commit

 

History

History
103 lines (78 loc) · 5.07 KB

free5gc.md

File metadata and controls

103 lines (78 loc) · 5.07 KB

free5GC — optional core

free5GC v4.3.0 core in the same cluster, separate from Open5GS: namespace free5gc, its own configuration (free5gc/free5gc.env), installer and uninstaller. The IPs do not collide with the Open5GS ones, so both stay installed together; one core at a time serves the radio, and the switch is done in the dashboard.

Functions NRF, AMF, SMF, UPF, AUSF, UDM, UDR, PCF, NSSF, CHF, NEF + MongoDB 7 + WebConsole
Configuration config.env (common) + free5gc/free5gc.env (own) → manifests generated by free5gc/lib/render.py
N2 / N3 10.10.0.30 / 10.10.0.31 on the fiber
Pools internet 10.60/16 · internet2 10.61/16 · ims 10.62/16
Network name InnovaFree5GC
Subscribers WebConsole http://<core machine>:31000 (admin / free5gc — change it)
Test ./free5gc/test.sh → 6 ok, 0 failure(s)

Why own manifests and not the official chart: the chart hard-coded PLMN and IPs; the generator takes everything from the project configuration and follows the same network as Open5GS.

1. Configuration

From config.env (same in both cores) From free5gc/free5gc.env
PLMN (MCC/MNC), TAC version and images (F5_VERSION, F5_REGISTRY, F5_MONGO_IMAGE)
slices: SST, SD, DNN (SLICES) pools per slice (F5_UE_POOLS) and extra DNNs (F5_EXTRA_DNNS, e.g. ims)
fiber network (RAN_LINK_*) IPs on the fiber: AMF, UPF, UERANSIM gNB (F5_GNB_SIM_IP)
UERANSIM UEs and SUBSCRIBERS WebConsole (F5_WEBUI_NODEPORT), network name (F5_NETWORK_NAME), log level

2. Network

Same design as Open5GS: everything over the pod network, only N2 (AMF) and N3 (UPF) on the fiber (macvlan ran-link). N4 over the pod network: the SMF discovers the UPF IP at startup (headless service upf), which is why the SMF is restarted after a new UPF (the dashboard already does it). N6: NAT of the pools through the eth0 of the UPF pod.

The UPF uses the gtp5g kernel module (v0.10.2), installed on the host through DKMS.

3. Install

Core machine, with Open5GS already installed:

sudo ./free5gc/setup-gtp5g.sh       # once: kernel module (rebuilt by itself when the kernel updates)
./free5gc/install.sh --dry-run      # generates and validates, does not apply
./free5gc/install.sh                # installs and brings it up in order; registers the config.env subscribers
./free5gc/test.sh                   # pods, PFCP, NG Setup, registration, session and ping of the simulated UE
sudo ./install.sh --dashboard-only  # the dashboard starts offering the core switch
Option Does
--stopped installs and leaves everything at 0 replicas
--no-ueransim does not bring up the UERANSIM of this core
--subscribers registers the ones from config.env (UERANSIM UEs + SUBSCRIBERS)
--import-open5gs copies the SIMs registered in Open5GS (which must be up)

During the import, the keys go straight from one database to the other, without showing on the screen. A slice without SD becomes the one with the same SST; a DNN that free5GC does not have is left out and listed.

4. Using it with the OCUDU gNB

Create a separate .yml, a copy of the one used with Open5GS changing only the AMF:

cu_cp:
  amf:
    addr: 10.10.0.30        # free5GC AMF

In the reference setup: ~/ocudu/configs/gnb_split_free5gc.yml. The gNB N3 is still 10.10.0.1. The core switch in the dashboard only offers the .yml files that point to the AMF of the chosen core.

5. Commercial phones

Validated with OCUDU + LiteOn: registration, internet and ims sessions, browsing.

  • IMS voice advertised (imsVoPS: 1) and the ims DNN are needed: without them the phone registers and leaves the cell ~1 s later (voice phones leave 5G when the network says it has no voice). Already configured.
  • Slice 2 limitation: when the phone asks for a session without giving the S-NSSAI, the free5GC AMF always uses the first allowed slice, regardless of the DNN. A phone that asks for internet2 without a slice lands on slice 1 and is rejected. Open5GS chooses by DNN and does not have this problem. Slice 2 works with a UE that gives the slice (UERANSIM, a phone with URSP).
  • The network name shows after the registration; in a manual search the SIM name shows.

6. Remove

./free5gc/uninstall.sh              # deletes the free5gc namespace (including its subscribers)
sudo ./free5gc/setup-gtp5g.sh --remove

7. Files

File Purpose
free5gc/free5gc.env own configuration
free5gc/install.sh · uninstall.sh · test.sh install, remove, test
free5gc/setup-gtp5g.sh kernel module (sudo, once)
free5gc/lib/render.py generates the configuration of each function, Deployments, Services, dashboard permissions and UERANSIM values
free5gc/lib/subscribers.py registration through the WebConsole API and import from Open5GS

Certificates: test PKI generated on the first install in ~/.config/innovanetwork/free5gc/cert (not in git); free5GC requires the files even with the SBI over HTTP.