Skip to content

Conversation

@anaswarac-dac
Copy link

πŸ“Œ Description:
This PR introduces support for associating multiple DNNs to a single device group in the 5G Core, enabling flexible and scalable configurations in deployments with a single UPF.

βœ… Key Highlights:
Introduced configuration support for multiple DNNs per IMSI range in the sdcore-5g-values.yml file.

Each DNN can have its own:

IP pool

MTU

DNS

UE QoS profile (including MBR uplink/downlink and traffic class)

Validated end-to-end traffic flow for both ims and internet DNNs over the same UPF.

πŸ“‚ Configuration Changes (in sdcore-5g-values.yml):

βœ… device-groups Section:

ip-domains list now includes multiple DNNs (ims, internet) under a single group (gnbsim-user-group1).
ip-domain-expanded changed to ip-domains
Each DNN is mapped to a different ue-ip-pool and ue-dnn-qos.
device-groups:
- name: "gnbsim-user-group1"
imsis:
- "208930100007487"
- "208930100007488"
- "208930100007489"
- "208930100007490"
- "208930100007491"
- "208930100007492"
- "208930100007493"
- "208930100007494"
- "208930100007495"
- "208930100007496"
msisdns:
- "msisdn-9000000001"
- "msisdn-9000000002"
- "msisdn-9000000003"
- "msisdn-9000000004"
- "msisdn-9000000005"
- "msisdn-9000000006"
- "msisdn-9000000007"
- "msisdn-9000000008"
- "msisdn-9000000009"
- "msisdn-9000000010"
ip-domain-name: "pool1"
ip-domains:
- dnn: ims
dns-primary: "8.8.8.8"
mtu: 1400
ue-ip-pool: "172.252.0.0/16"
ue-dnn-qos:
dnn-mbr-downlink: 2400
dnn-mbr-uplink: 1200
bitrate-unit: Kbps
traffic-class:
name: "platinum"
qci: 5
arp: 1
pdb: 100
pelr: 6
- dnn: internet
dns-primary: "10.176.0.11"
mtu: 1460
ue-ip-pool: {{ core.upf.default_upf.ue_ip_pool }}
ue-dnn-qos:
dnn-mbr-downlink: 1000
dnn-mbr-uplink: 1000
bitrate-unit: Mbps
traffic-class:
name: "platinum"
qci: 9
arp: 6
pdb: 300
pelr: 6
site-info: "enterprise"

network-slices:
- name: "default" # can be any unique slice name
slice-id: # must match with slice configured in gNB, UE
sd: "000000"
sst: 1
site-device-group:
- "gnbsim-user-group1" # All UEs in this device-group are assigned to this slice
# Applicaiton filters control what each user can access.
# Default, allow access to all applications
application-filtering-rules:
- rule-name: "ALLOW-ALL-QCI-5"
priority: 250
action: "permit"
endpoint: "0.0.0.0/0"
traffic-class:
qci: 5
arp: 1
- rule-name: "ALLOW-ALL-QCI-9"
priority: 250
action: "permit"
endpoint: "0.0.0.0/0"
traffic-class:
qci: 9
arp: 6
site-info:
# Provide gNBs and UPF details and also PLMN for the site
gNodeBs:
- name: "gnb1"
tac: 1
- name: "gnb2"
tac: 2
plmn:
mcc: "001"
mnc: "01"
site-name: "enterprise"
upf:
upf-name: "upf" # associated UPF for this slice. One UPF per Slice.
upf-port: 8805

βœ… Userplane Section:
Defined dnn_list with individual DNNs and their respective ue_ip_pool.
cpiface:
dnn_list:
- dnn: "ims"
ue_ip_pool: "172.252.0.0/16"
- dnn: "internet"
ue_ip_pool: "172.250.0.0/16" # Must match slice DNN
hostname: "upf"
enable_ue_ip_alloc: false

Signed-off-by: anaswara <[email protected]>
@anaswarac-dac anaswarac-dac requested a review from a team January 9, 2026 10:31
@gab-arrobo gab-arrobo requested a review from Copilot January 9, 2026 20:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables support for multiple DNNs (Data Network Names) per device group in the 5G Core, allowing flexible configurations where a single UPF can serve multiple network types (e.g., IMS and internet) with distinct QoS profiles and IP pools.

Changes:

  • Modified DevGroup struct to support multiple IP domains (IpDomains array) instead of a single domain
  • Added MSISDN list support to device groups
  • Updated comparison logic to handle multiple IP domains and MSISDNs

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +620 to +628
for i := range groupNew.IpDomains {
if i >= len(groupOld.IpDomains) {
// If groupOld doesn't have enough IpDomains
return true
}

oldIpDomain := groupOld.IpDomains[i]
newIpDomain := groupNew.IpDomains[i]

Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comparison logic doesn't account for cases where groupOld has more IpDomains than groupNew. If groupOld.IpDomains has 3 entries and groupNew.IpDomains has 2, the function will only compare the first 2 and miss the deletion. Add a length comparison before the loop to check if len(groupNew.IpDomains) != len(groupOld.IpDomains).

Suggested change
for i := range groupNew.IpDomains {
if i >= len(groupOld.IpDomains) {
// If groupOld doesn't have enough IpDomains
return true
}
oldIpDomain := groupOld.IpDomains[i]
newIpDomain := groupNew.IpDomains[i]
// Check if the number of IpDomains has changed
if len(groupNew.IpDomains) != len(groupOld.IpDomains) {
logger.SimappLog.Infoln("Number of IpDomains changed")
return true
}
for i := range groupNew.IpDomains {
if i >= len(groupOld.IpDomains) {
// If groupOld doesn't have enough IpDomains
return true
}

Copilot uses AI. Check for mistakes.
Comment on lines +644 to +645
// Compare UeDnnQos if not nil
if oldIpDomain.UeDnnQos != nil && newIpDomain.UeDnnQos != nil {
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comparison doesn't detect changes when UeDnnQos transitions from nil to non-nil or vice versa. If oldIpDomain.UeDnnQos is nil but newIpDomain.UeDnnQos has a value (or vice versa), the function returns false when it should return true. Add an XOR check to detect when one is nil and the other isn't.

Suggested change
// Compare UeDnnQos if not nil
if oldIpDomain.UeDnnQos != nil && newIpDomain.UeDnnQos != nil {
// Detect changes in presence of UeDnnQos (nil vs non-nil)
if (oldIpDomain.UeDnnQos == nil) != (newIpDomain.UeDnnQos == nil) {
logger.SimappLog.Infoln("UeDnnQos presence changed (nil vs non-nil)")
return true
}
// Compare UeDnnQos fields when both are non-nil
if oldIpDomain.UeDnnQos != nil && newIpDomain.UeDnnQos != nil {
// Detect changes in presence of TrafficClass (nil vs non-nil)
if (oldIpDomain.UeDnnQos.TrafficClass == nil) != (newIpDomain.UeDnnQos.TrafficClass == nil) {
logger.SimappLog.Infoln("TrafficClass presence changed (nil vs non-nil)")
return true
}

Copilot uses AI. Check for mistakes.
Comment on lines +644 to +645
// Compare UeDnnQos if not nil
if oldIpDomain.UeDnnQos != nil && newIpDomain.UeDnnQos != nil {
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to UeDnnQos, the TrafficClass comparison doesn't detect transitions between nil and non-nil states. If one TrafficClass is nil and the other isn't, this represents a configuration change that should be detected.

Suggested change
// Compare UeDnnQos if not nil
if oldIpDomain.UeDnnQos != nil && newIpDomain.UeDnnQos != nil {
// Compare UeDnnQos, including nil/non-nil transitions and TrafficClass
if (oldIpDomain.UeDnnQos == nil) != (newIpDomain.UeDnnQos == nil) {
logger.SimappLog.Infoln("UeDnnQos presence changed")
return true
}
if oldIpDomain.UeDnnQos != nil && newIpDomain.UeDnnQos != nil {
// Detect nil/non-nil transitions for TrafficClass itself
if (oldIpDomain.UeDnnQos.TrafficClass == nil) != (newIpDomain.UeDnnQos.TrafficClass == nil) {
logger.SimappLog.Infoln("TrafficClass presence changed")
return true
}

Copilot uses AI. Check for mistakes.
Comment on lines +647 to +651
if oldIpDomain.UeDnnQos.TrafficClass.Name != newIpDomain.UeDnnQos.TrafficClass.Name ||
oldIpDomain.UeDnnQos.TrafficClass.Qci != newIpDomain.UeDnnQos.TrafficClass.Qci ||
oldIpDomain.UeDnnQos.TrafficClass.Arp != newIpDomain.UeDnnQos.TrafficClass.Arp ||
oldIpDomain.UeDnnQos.TrafficClass.Pdb != newIpDomain.UeDnnQos.TrafficClass.Pdb ||
oldIpDomain.UeDnnQos.TrafficClass.Pelr != newIpDomain.UeDnnQos.TrafficClass.Pelr {
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TrafficClass comparison doesn't check the UeDnnQos bitrate fields (dnn-mbr-downlink, dnn-mbr-uplink, bitrate-unit shown in the PR description). Changes to these QoS parameters won't be detected, leading to stale configurations. Include comparisons for all relevant UeDnnQos fields.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant