Operate your own 5G private network — A tutorial

Guillaume Belanger
10 min read1 hour ago

--

A hands-on introduction to Ella Core, an open-source 5G mobile core network designed for private deployments.

Introduction

In this tutorial, we will deploy, initialize, and configure Ella Core, an open-source 5G mobile core network. First, we will use Multipass to create a virtual machine, install Ella Core, access the the UI, initialize Ella Core, and configure it. Then, we will create another virtual machine, install a 5G radio and User Equipment simulator, connect it to Ella Core, and use the simulator to validate that the subscriber can communicate with the Internet using Ella Core.

You can expect to spend about 30 minutes completing this tutorial. Follow the steps in sequence to ensure a successful deployment.

Pre-requisites

To complete this tutorial, you will need a Ubuntu 24.04 machine with the following specifications:

  • Memory: 16GB
  • CPU: 6 cores
  • Disk: 50GB

1. Create Virtual Machines

From the Ubuntu machine, install LXD and Multipass:

sudo snap install lxd

Initialize LXD:

sudo lxd init --auto

Install Multipass:

sudo snap install multipass

Create three LXD networks:

lxc network create n2 ipv4.address=22.22.22.1/24
lxc network create n3 ipv4.address=33.33.33.1/24
lxc network create n6 ipv4.address=66.66.66.1/24

Create three Multipass instances:

multipass launch noble --name=ella-core --disk=10G --cpus 2 --network n2 --network n3 --network n6
multipass launch noble --name=router --disk=10G --network n6
multipass launch noble --name=radio --memory=6G --cpus 2 --disk=10G --network n2 --network n3

Validate that the 3 instances have been created:

multipass list

You should see the following output:

Name                    State             IPv4             Image
ella-core Running 10.166.86.107 Ubuntu 24.04 LTS
22.22.22.28
33.33.33.31
66.66.66.234
radio Running 10.166.86.151 Ubuntu 24.04 LTS
22.22.22.248
33.33.33.106
router Running 10.166.86.132 Ubuntu 24.04 LTS
66.66.66.48

Your instances will have different IP addresses. The tutorial will use the IP addresses from this example. Whenever you see a placeholder value (ex. <ella-core-ens3-ip>), replace it with the appropriate IP address. You can always retrieve a specific interface IP address by opening a shell into an instance and running ip a.

2. Install Ella Core

2.1 Install and start the Ella Core snap

Connect to the ella-core Multipass instance:

multipass shell ella-core

Install the Ella Core snap and connect it to the required interfaces:

sudo snap install ella-core
sudo snap connect ella-core:network-control
sudo snap connect ella-core:process-control
sudo snap connect ella-core:sys-fs-bpf-upf-pipeline
sudo snap connect ella-core:system-observe

Start Ella Core:

sudo snap start ella-core.cored

2.2 Access the UI

From the host, open your browser and navigate to https://<ella-core-ens3-ip>:5002/ to access Ella Core’s UI. Replace the placeholder with the appropriate value.

You should see the Initialization page.

Initialization page in Ella Core

Your browser may display a warning about the security of the connection. This is because the certificate used by Ella Core is self-signed. You can safely ignore this warning.

2.3 Initialize Ella Core

In the Initialization page, create the first user with the following credentials:

  • Email: admin@ellanetworks.com
  • Password: admin

After creating the user, you will be redirected to the login page. Use the credentials you just created to log in.

You will be redirected to the dashboard.

Ella Core is now initialized and ready to be used.

2.5 Configure your private network

Here, we will navigate through the Ella Core UI to create a profile, a subscriber, and a route.

2.5.1 Create a Profile

Navigate to the Profiles page and click on the Create button.

Create a profile with the following parameters:

  • Name: default
  • IP Pool: 10.45.0.0/16
  • DNS: 8.8.8.8
  • MTU: 1500
  • Bitrate Uplink: 200 Mbps
  • Bitrate Downlink: 100 Mbps

2.5.2 Create a subscriber

Navigate to the Subscribers page and click on the Create button.

Create a subscriber with the following parameters:

  • IMSI: Click on Generate to automatically generate the MSIN
  • Key: Click on Generate to automatically generate a key
  • Sequence Number: Keep the default value
  • Profile: default

After creating the subscriber, click on the View button to see the subscriber’s details. Note the IMSI, Key, and OPC values. You will use these values later to configure the 5G radio simulator.

2.5.3 Create a route

Navigate to the Routes page and click on the Create button.

Create a route with the following parameters:

  • Destination: Click on Default
  • Gateway: <router-ens4-ip>
  • Interface: n6
  • Metric: 0

2.5.4 Validate that no radio is connected

Navigate to the Radios page. You should see that no radio is connected.

3. Configure the router

Open a shell into the router Multipass instance:

multipass shell router

Enable IP forwarding:

sudo sysctl -w net.ipv4.ip_forward=1

Enable NAT for the 10.45.0.0/16 subnet by rewriting the source IP address of packets leaving the system to the IP address of the router’s outgoing interface:

sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 -j MASQUERADE

Add a route to the ella-core Multipass instance:

sudo ip route add 10.45.0.0/16 via <ella-core-ens6-ip> dev ens4

Replace the placeholder with the appropriate value.

Exit the Multipass instance:

exit

4. Install a 5G Radio Simulator

In this section, we will install UERANSIM, a 5G radio and User Equipment (UE) simulator, and connect it to Ella Core.

4.1 Install and start the UERANSIM 5G radio simulator

Connect to the radio Multipass instance:

multipass shell radio

Install the UERANSIM snap:

sudo snap install ueransim --channel=edge
sudo snap connect ueransim:network-control

Edit the configuration file at /var/snap/ueransim/common/gnb.yaml:

mcc: '001'
mnc: '01'

nci: '0x000000010'
idLength: 32
tac: 1

linkIp: 127.0.0.1
ngapIp: <radio-ens4-ip>
gtpIp: <radio-ens5-ip>

amfConfigs:
- address: <ella-core-ens4-ip>
port: 38412

slices:
- sst: 0x1
sd: 0x102030

ignoreStreamIds: true

Make sure to modify the placeholder values.

Start the 5G radio:

ueransim.nr-gnb --config /var/snap/ueransim/common/gnb.yaml

You should see the following output:

UERANSIM v3.2.6
[2025-02-23 16:16:26.635] [sctp] [info] Trying to establish SCTP connection... (22.22.22.28:38412)
[2025-02-23 16:16:26.636] [sctp] [info] SCTP connection established (22.22.22.28:38412)
[2025-02-23 16:16:26.637] [sctp] [debug] SCTP association setup ascId[3]
[2025-02-23 16:16:26.637] [ngap] [debug] Sending NG Setup Request
[2025-02-23 16:16:26.642] [ngap] [debug] NG Setup Response received
[2025-02-23 16:16:26.642] [ngap] [info] NG Setup procedure is successful

Leave the radio running.

In your browser, navigate to the Ella Core UI and click on the Radios tab. You should see a radio connected with the name UERANSIM-gnb-1–1–1.

The 5G radio simulator (UERANSIM) is automatically connected to Ella

4.3 Start the UERANSIM 5G User Equipment (UE) simulator

Open a new terminal window and connect to the radio Multipass instance:

multipass shell radio

Edit the configuration file at /var/snap/ueransim/common/ue.yaml:

supi: 'imsi-<subscriber imsi>'
mcc: '001'
mnc: '01'
protectionScheme: 0
homeNetworkPublicKey: '75d1dde9519b390b172104ae3397557a114acbd39d3c39b2bcc3ce282abc4c3e'
homeNetworkPublicKeyId: 1
routingIndicator: '0000'

key: '<subscriber key>'
op: '<subscriber opc>'
opType: 'OPC'
amf: '8000'
imei: '356938035643803'
imeiSv: '4370816125816151'

gnbSearchList:
- 127.0.0.1

uacAic:
mps: false
mcs: false

uacAcc:
normalClass: 0
class11: false
class12: false
class13: false
class14: false
class15: false

sessions:
- type: 'IPv4'
apn: 'internet'
slice:
sst: 0x01
sd: 0x102030

configured-nssai:
- sst: 0x01
sd: 0x102030

default-nssai:
- sst: 1
sd: 1

integrity:
IA1: true
IA2: true
IA3: true

ciphering:
EA1: true
EA2: true
EA3: true

integrityMaxRate:
uplink: 'full'
downlink: 'full'

Modify the placeholder values:

  • supi: The imsi value used by the subscriber with the imsi- prefix
  • key: The key value used by the subscriber
  • op: The opc value used by the subscriber

Those values were noted when you created the subscriber at step 2.5.2.

Start the User Equipment (UE) simulator:

sudo ueransim.nr-ue --config /var/snap/ueransim/common/ue.yaml

You should see the following output:

UERANSIM v3.2.6
[2025-02-23 16:18:41.433] [nas] [info] UE switches to state [MM-DEREGISTERED/PLMN-SEARCH]
[2025-02-23 16:18:41.434] [rrc] [debug] New signal detected for cell[1], total [1] cells in coverage
[2025-02-23 16:18:41.435] [nas] [info] Selected plmn[001/01]
[2025-02-23 16:18:41.435] [rrc] [info] Selected cell plmn[001/01] tac[1] category[SUITABLE]
[2025-02-23 16:18:41.435] [nas] [info] UE switches to state [MM-DEREGISTERED/PS]
[2025-02-23 16:18:41.435] [nas] [info] UE switches to state [MM-DEREGISTERED/NORMAL-SERVICE]
[2025-02-23 16:18:41.435] [nas] [debug] Initial registration required due to [MM-DEREG-NORMAL-SERVICE]
[2025-02-23 16:18:41.435] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2025-02-23 16:18:41.435] [nas] [debug] Sending Initial Registration
[2025-02-23 16:18:41.437] [nas] [info] UE switches to state [MM-REGISTER-INITIATED]
[2025-02-23 16:18:41.437] [rrc] [debug] Sending RRC Setup Request
[2025-02-23 16:18:41.439] [rrc] [info] RRC connection established
[2025-02-23 16:18:41.439] [rrc] [info] UE switches to state [RRC-CONNECTED]
[2025-02-23 16:18:41.439] [nas] [info] UE switches to state [CM-CONNECTED]
[2025-02-23 16:18:41.455] [nas] [debug] Authentication Request received
[2025-02-23 16:18:41.456] [nas] [debug] Received SQN [000000000001]
[2025-02-23 16:18:41.456] [nas] [debug] SQN-MS [000000000000]
[2025-02-23 16:18:41.456] [nas] [debug] Sending Authentication Failure due to SQN out of range
[2025-02-23 16:18:41.470] [nas] [debug] Authentication Request received
[2025-02-23 16:18:41.470] [nas] [debug] Received SQN [000000000021]
[2025-02-23 16:18:41.470] [nas] [debug] SQN-MS [000000000000]
[2025-02-23 16:18:41.471] [nas] [debug] Security Mode Command received
[2025-02-23 16:18:41.471] [nas] [debug] Selected integrity[1] ciphering[0]
[2025-02-23 16:18:41.473] [nas] [debug] Registration accept received
[2025-02-23 16:18:41.473] [nas] [info] UE switches to state [MM-REGISTERED/NORMAL-SERVICE]
[2025-02-23 16:18:41.473] [nas] [debug] Sending Registration Complete
[2025-02-23 16:18:41.473] [nas] [info] Initial Registration is successful
[2025-02-23 16:18:41.473] [nas] [debug] Sending PDU Session Establishment Request
[2025-02-23 16:18:41.473] [nas] [debug] UAC access attempt is allowed for identity[0], category[MO_sig]
[2025-02-23 16:18:41.699] [nas] [debug] PDU Session Establishment Accept received
[2025-02-23 16:18:41.699] [nas] [info] PDU Session establishment is successful PSI[1]
[2025-02-23 16:18:41.745] [app] [info] Connection setup for PDU session[1] is successful, TUN interface[uesimtun0, 10.45.0.1] is up.

This output indicates that the User Equipment has successfully connected to the network and has been assigned an IP address. In this case, the IP address is 10.45.0.1.

Leave the UE running.

5. Validate the connection

In your browser, navigate to the Ella Core UI and click on the Subscribers tab. You should see that the subscriber you created has been assigned an IP address. The IP address should match the IP address assigned to the UE.

The Ella Core subscriber got assigned an IP address

Open a new terminal window and connect to the radio Multipass instance:

multipass shell radio

List the network interfaces:

ip a

You should see a new interface uesimtun0 with the UE’s IP address:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:8d:69:a4 brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 10.166.86.151/24 metric 100 brd 10.166.86.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe8d:69a4/64 scope link
valid_lft forever preferred_lft forever
3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:85:da:3b brd ff:ff:ff:ff:ff:ff
altname enp0s4
inet 22.22.22.248/24 metric 200 brd 22.22.22.255 scope global dynamic ens4
valid_lft 2925sec preferred_lft 2925sec
inet6 fd42:d568:b1cc:b85f:5054:ff:fe85:da3b/64 scope global mngtmpaddr noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe85:da3b/64 scope link
valid_lft forever preferred_lft forever
4: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:8c:28:23 brd ff:ff:ff:ff:ff:ff
altname enp0s5
inet 33.33.33.106/24 metric 200 brd 33.33.33.255 scope global dynamic ens5
valid_lft 2925sec preferred_lft 2925sec
inet6 fd42:82fb:ddd5:b537:5054:ff:fe8c:2823/64 scope global mngtmpaddr noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe8c:2823/64 scope link
valid_lft forever preferred_lft forever
5: uesimtun0: <POINTOPOINT,PROMISC,NOTRAILERS,UP,LOWER_UP> mtu 1400 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.45.0.1/32 scope global uesimtun0
valid_lft forever preferred_lft forever
inet6 fe80::71a5:f3c:bc25:611b/64 scope link stable-privacy
valid_lft forever preferred_lft forever

This interface allows the UE to communicate with the network.

Ping the Ella Core documentation website from the subscriber’s interface:

ping -I uesimtun0 docs.ellanetworks.com -c4

You should see a successful ping:

PING ellanetworks.github.io (185.199.108.153) from 10.45.0.1 uesimtun0: 56(84) bytes of data.
64 bytes from cdn-185-199-108-153.github.com (185.199.108.153): icmp_seq=1 ttl=55 time=44.7 ms
64 bytes from cdn-185-199-108-153.github.com (185.199.108.153): icmp_seq=2 ttl=55 time=43.6 ms
64 bytes from cdn-185-199-108-153.github.com (185.199.108.153): icmp_seq=3 ttl=55 time=44.3 ms
64 bytes from cdn-185-199-108-153.github.com (185.199.108.153): icmp_seq=4 ttl=55 time=52.5 ms

--- ellanetworks.github.io ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 43.565/46.274/52.539/3.639 ms

Now, use curl to fetch the Ella Core documentation website:

curl --interface uesimtun0 https://docs.ellanetworks.com

You should see the HTML content of the Ella Core documentation website.

You have successfully validated that the subscriber can communicate with the internet.

6. Destroy the Tutorial Environment (Optional)

When you are done with the tutorial, you can destroy the Multipass instances:

multipass delete ella-core radio router --purge

You can also delete the networks created with LXD:

lxc network delete n2
lxc network delete n3
lxc network delete n6

Conclusion

Ella Core is a 5G mobile core network designed for private deployments. It consolidates the complexity of traditional 5G networks into a single application, offering simplicity, reliability, and security.

In this tutorial, you learned how to deploy Ella Core, configure subscribers, integrate a radio and cell phone simulator, and connect the subscribers to the Internet.

If you want to know more about Ella Core, you can:

View the official Ella Core documentation

Read the Whitepaper on Medium

See the source code on GitHub

--

--

Guillaume Belanger
Guillaume Belanger

Written by Guillaume Belanger

Guillaume is an software developer and Engineering Manager working on open source Telco applications.

No responses yet