A deployment of the OAI 5G Core configured for network slicing experiments. The stack runs as a Docker Compose deployment with two independent network slices, each with a dedicated SMF and UPF pair.
Before starting the core network, provision the LXC container environment by following
src/README.md.
- Repository Layout
- Prerequisites
- Configuration Overview
- Running the Core Network —
start_cn.sh - Network Interface Summary
- Sources
Core-Network/
├── src/ # LXC container lifecycle scripts — see src/README.md
│ ├── setup_container/
│ ├── Export_container/
│ └── setup_Github/
└── oai-cn5g/
├── docker-compose-slicing.yaml # Core network stack (two slices, dedicated SMF+UPF per slice)
├── start_cn.sh # Main launch script
├── conf/ # NF configuration files (AMF, SMF, UPF, NSSF, ...)
└── database/ # MySQL seed data (UE subscriptions and authentication)
Defines all core NF containers, fixed IP assignments, and inter-service dependencies. All containers are attached to the demo-oai-public-net bridge network (192.168.70.128/26).
| Container | IP | Role |
|---|---|---|
oai-nrf |
192.168.70.130 |
Network Repository Function |
mysql |
192.168.70.131 |
UE subscription database |
oai-amf |
192.168.70.132 |
Access and Mobility Management |
oai-ext-dn |
192.168.70.135 |
External data network (iperf server) |
oai-udr |
192.168.70.136 |
Unified Data Repository |
oai-udm |
192.168.70.137 |
Unified Data Management |
oai-ausf |
192.168.70.138 |
Authentication Server |
oai-nssf |
192.168.70.139 |
Network Slice Selection |
oai-smf-slice1 |
192.168.70.133 |
Session Management — Slice 1 |
oai-upf-slice1 |
192.168.70.134 |
User Plane — Slice 1 (DNN oai, UE subnet 12.1.1.0/24) |
oai-smf-slice2 |
192.168.70.140 |
Session Management — Slice 2 |
oai-upf-slice2 |
192.168.70.141 |
User Plane — Slice 2 (DNN oai2, UE subnet 12.1.2.0/24) |
These IPs are fixed in
docker-compose-slicing.yaml. The gNB configuration must point tooai-amfat192.168.70.132.
Per-NF configuration files consumed at container startup. Includes AMF, SMF, UPF, NSSF, and slice-specific parameters.
Default S-NSSAIs:
| SST | SD | Purpose |
|---|---|---|
| 1 | 0xFFFFFF |
Default slice |
| 1 | 0x000002 |
Secondary slice |
SQL dump loaded at startup by the mysql container. Contains UE entries: IMSI, authentication keys, DNN assignment, and slice subscription.
cd oai-cn5g
./start_cn.sh -m <rfsim|usrp>The -m flag selects the network interface for UPF tunnel injection:
| Mode | Interface | When to use |
|---|---|---|
rfsim |
eth0 |
Local deployment inside an LXC container (RF simulation) |
usrp |
tun0 |
Colosseum deployment with real RF (USRP hardware) |
tun0is the tunnel interface used by the UPF to carry user-plane traffic on Colosseum. UPF gateways must be bound to this interface rather thaneth0in that environment.
[1/4] Recreate the Docker bridge network
Removes any existing demo-oai-public-net instance and recreates it:
Subnet: 192.168.70.128/26
Gateway: 192.168.70.129
[2/4] Tear down any previous deployment
docker-compose -f docker-compose-slicing.yaml down[3/4] Start all core network services
docker-compose -f docker-compose-slicing.yaml up -dBrings up all NF containers in detached mode.
[4/4] Inject UPF tunnel addresses
Assigns tunnel addresses on the selected interface inside each UPF container:
| Container | Tunnel Address |
|---|---|
oai-upf-slice1 |
12.1.1.1/24 |
oai-upf-slice2 |
12.1.2.1/24 |
This step can fail silently if the UPF containers are not yet ready. If UEs fail to obtain an IP address, verify with:
docker exec oai-upf-slice1 ip addr show <interface>
docker ps -aIf containers exit shortly after starting, inspect logs with
docker logs <container-name>.
| Mode | UPF Interface | Used for |
|---|---|---|
rfsim |
eth0 |
LXC bridge network; UPF tunnel and inter-NF traffic |
usrp (Colosseum) |
tun0 |
Colosseum user-plane tunnel (GTP-U) |
All NFs communicate over the demo-oai-public-net bridge (192.168.70.128/26). The gNB connects to the AMF at 192.168.70.132 over the same network.
oai-ext-dn applies the following static routes at startup, enabling end-to-end connectivity for iperf tests:
12.1.1.0/24 via 192.168.70.134 # → UPF Slice 1
12.1.2.0/24 via 192.168.70.141 # → UPF Slice 2
Repository
- wineslab/ORANSlice — upstream 5G core baseline, built on the OpenAirInterface oai-cn5g stack