Preface: In the industrial world, "average latency" is a useless metric. If an autonomous forklift takes 5ms to receive a stop signal 99% of the time, but 500ms 1% of the time, someone gets injured. Wi-Fi cannot guarantee worst-case latency. 5G Network Slicing can. This article guides you through configuring a private 5G core to secure resources for critical AI control loops.
1. The Concept of Slicing (S-NSSAI)
Network Slicing allows a single physical network to look like multiple logical networks. A "Slice" is identified by the S-NSSAI (Single Network Slice Selection Assistance Information), which consists of:
- SST (Slice/Service Type): 8-bit value (e.g., 1=eMBB, 2=URLLC, 3=MIoT).
- SD (Slice Differentiator): 24-bit value to differentiate slices of the same type (e.g., "Robot-Fleet-A" vs "Robot-Fleet-B").
2. 3GPP Standards & QoS Flows
Within a slice, traffic is further managed by QoS Flows. Each flow is assigned a 5QI (5G QoS Identifier).
Critical 5QI Values for AI:
| 5QI Value | Resource Type | Target Delay | Packet Error Rate | Use Case |
|---|---|---|---|---|
| 82 | Delay Critical GBR | 10 ms | 10^-5 | Discrete Automation (Robots) |
| 83 | Delay Critical GBR | 10 ms | 10^-4 | Real-time Gaming / VR |
| 9 | Non-GBR | 300 ms | N/A | Video Buffered Streaming (Cameras) |
GBR = Guaranteed Bit Rate. Unlike Wi-Fi, the 5G scheduler will reserve Resource Blocks (RBs) for GBR flows, ensuring the bandwidth is available before the packet arrives.
3. Configuring the Core (Open5GS)
Let's implement a slicing configuration using Open5GS, a popular open-source 5G Core.
Step 1: Define Slices in PCRF/PCF
We edit the Policy Control Function configuration to handle two slices: one for high-bandwidth cameras (eMBB) and one for low-latency control (URLLC).
# open5gs/pcf.yaml
session:
- ssi:
sst: 1 # eMBB
sd: 000001
pcc_rule:
- id: 1
flow:
- direction: bidirectional
description: permit out ip from any to any
qos:
index: 9 # Default Internet
- ssi:
sst: 2 # URLLC (Critical)
sd: 000002
pcc_rule:
- id: 2
flow:
- direction: bidirectional
description: permit out ip from any to any
qos:
index: 82 # Delay Critical
arp:
priority_level: 1 # Highest Pre-emption Capability
Step 2: Subscriber Provisioning (MongoDB)
Users (SIM Cards) must be subscribed to specific slices in the UDM (Unified Data Management). A camera SIM will only be allowed on Slice 1. A Robot SIM will be allowed on Slice 2.
4. Radio Access Network Partitioning
Configuring the Core is only half the battle. The gNodeB (Base Station) must enforce these slices on the air interface.
This is typically done via Resource Block (RB) Partitioning:
- Hard Slicing: Frequencies 3.5GHz - 3.55GHz are exclusively for Slice 2. No contamination allowed.
- Soft Slicing: Scheduler prioritizes Slice 2, but Slice 1 can use unused capacity.
5. UE Configuration (Modem Setup)
On the device side (e.g., a Quectel RM500Q modem), we must configure the URSP (UE Route Selection Policy) rules or force the APN to bind to a specific slice.
# AT Commands for Quectel Modem
# Set PDU Session ID 1 to Slice 2 (SST=2, SD=2)
AT+CGDCONT=2,"IP","urllc.net"
AT+C5GNSSAI=1,2,000002
# Force PDU Session Establishment
AT+CGACT=1,2
Once established, the OS sees a network interface (e.g., `wwan0`) that is effectively a dedicated physical cable to the core network, completely isolated from the noisy video traffic on `wwan1`.
Conclusion: 5G Slicing brings the determinism of ethernet cables to the wireless world. For AI agents interacting with the physical world, it is not just a performance upgrade—it is a safety requirement.