← Back to list

5G ROAMING (Open5GS, Packet Rusher)

Image generated by OpenAI’s DALL·E

Alex · 2024-05-17 17:18 · 5 claps · 13.2 min read
#5g #roaming #open5gs #packetrusher #networking
Open on Medium ↗
Wiki topics: LLM · Large Language Models MM · Multimodal & Generative Media

5G ROAMING (Open5GS, Packet Rusher)

Image generated by OpenAI’s DALL·E

Image generated by OpenAI’s DALL·E

UPD: the work was done on April-May 2024. The technologies discussed below are developing rapidly and some features can be changed soon.

Introduction

We will introduce the configuration of modern 5G Roaming using the open-source Open5GS Core solution, alongside the currently developing Packet Rusher (UE/GNB simulator).

Open5gs provides great open-source solution for smooth upgrading 4G architecture to 5G and is commonly used not only in academic works but also in deployment. The new roaming feature with LBO method was introduced on December 2023 which we have successfully configured and tested using Packet Rusher.

Packet Rusher itself is in a developing stage and still does not have sufficient documentation however the configuration seems similar to UERANSIM. The last one was used at first but had appeared not to support Roaming testing (denying different HPLMN to access the GNB). Packet Rusher promises many useful features to be implemented and is backed by a trustful company HPE while remaining open-source.

System requirements

Two systems were used: Ubuntu 22.04 and Ubuntu 20.04

The first one was the Home PLMN Core storing the actual data about test device.

The Packet Rusher requirements forced us to down-grade initial Ubuntu 22.04 to 20.04 because of unsupported kernel version. Therefore the second Core and Packet Rusher testing environment run on Ubuntu 20.04 with 5.15 Kernel recommended in Packet Rusher documentation.

Configuration and testing scenario

This article will cover

  1. Home PLMN Core functions configurations
  2. Visited PLMN Core functions configurations
  3. Packet Rusher configuration
  4. Testing scenario result

Testing scenario:

We have a device originally registered in Germany PLMN (MCC 262, MNC 74) visiting the test PLMN (MCC 999, MNC 70). The SEPP communication is established between the two Cores. VPLMN does not have any information about the test device in its database which assumes the verification going solely on HPLMN side as it should be in the 5G standard.

The first HPLMN Core uses LAN addresses 192.168.20.x/24, the second VPLMN uses 192.168.50.x/24. Testing LAN connection is established using Wi-Fi. It simulates global communication between 5G Cores and doesn’t allow any direct communication between UE and the other Core through regular IP (because of routing configuration).

Globally(LAN for testing) discovered addresses for HPLMN:

AMF: 192.168.20.241

SGWU: 192.168.20.242

UPF: 192.168.20.243

SEPP N-32c: 192.168.20.251

SEPP N-32f: 192.168.20.252

For VPLMN:

AMF: 192.168.50.185

SGWU: 192.168.50.186

UPF: 192.168.50.187

SEPP N-32c: 192.168.50.251

SEPP N-32f: 192.168.50.252

GNB: 192.168.50.190

Note: Only SEPP N-32f/c interfaces are involved in the ‘global’ communication within LAN, other services run in a monolith.

Before configuration please follow Open5GS installation guide and Packet Rusher installation guide. We do not cover the installation here.

Note: for MongoDB better follow MongoDB installation guide instead of relying on Open5GS QuickStart.

Home PLMN System configurations

STEP-1: Bind IP addresses and set up routing

For project implementation you need to bind the IP addresses used by Open5GS or Packet Rusher to actual interface. You can identify them using

ifconfig
ip addr show

Then you should bind the addresses, disable firewall and manage routing Open5GS core to its own gateway. Keep in mind that the changes are not consistent and have to be done every time the system is restarted.

In our case we use wlo1 Wi-Fi interface and 192.168.237.1 as default gateway for this interface.

### Enable IPv4/IPv6 Forwarding
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1

### Firewall disabling
sudo ufw disable

### Add NAT Rule
sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
sudo ip6tables -t nat -A POSTROUTING -s 2001:db8:cafe::/48 ! -o ogstun -j MASQUERADE

### amf
sudo ip addr add 192.168.20.241/24 dev wlo1
### sgwu
sudo ip addr add 192.168.20.242/24 dev wlo1
### upf
sudo ip addr add 192.168.20.243/24 dev wlo1
### mme
sudo ip addr add 192.168.20.238/24 dev wlo1
### n32-c
sudo ip addr add 192.168.20.251/24 dev wlo1
### n32-f
sudo ip addr add 192.168.20.252/24 dev wlo1
### GNB -> packet-rusher
sudo ip addr add 192.168.20.249/24 dev wlo1

### Routing packets within LAN
sudo ip route add 192.168.50.0/24 via <gateway> dev wlo1

STEP-2: Set up configuration files

Note: ‘diff’ command was used to mark only the differences between default configuration files taken from Open5GS GitHub and our own configurations.

We do not need MME and HSS configurations mentioned in Open5GS Quickstart because these are 4G modules.

GitHub and packet manager Open5GS installation differences:

GitHub version has ‘@localstatedir’ and ‘@sysconfdir’ notations in all mentioned configuration files (+pcrf.yaml). These were replaced by ‘/etc’ and ‘/var’ correspondingly for default Ubuntu configuration. This note only matters if using GitHub configurations.

In case of installing Open5GS with ‘apt’, the notations are replaced automatically. We do not mention these differences below anymore.

amf.yaml

We need to add access control for different PLMN to be able to communicate with our Core through SEPP. Also we should change the default address and default paths to the actual ones.

@@ -16,11 +16,18 @@
         - uri: http://127.0.0.200:7777
   ngap:
     server:
-      - address: 127.0.0.5
+      - address: 192.168.20.241
   metrics:
     server:
       - address: 127.0.0.5
         port: 9090
+  access_control:
+    - plmn_id:
+        mcc: 999
+        mnc: 70
+    - plmn_id:
+        mcc: 262
+        mnc: 74
   guami:
     - plmn_id:
         mcc: 999
@@ -32,7 +39,7 @@
     - plmn_id:
         mcc: 999
         mnc: 70
-      tac: 1
+      tac: 7
   plmn_support:
     - plmn_id:
         mcc: 999

pcf.yaml

We need to add a policy for managing incoming connections (ensures slicing and quality-of-service).

@@ -19,4 +19,27 @@
     server:
       - address: 127.0.0.13
         port: 9090
+  policy:
+     - plmn_id:
+         mcc: 999
+         mnc: 070
+       slice:
+         - sst: 1
+           default_indicator: true
+           session:
+             - name: internet
+               type: 3
+               ambr:
+                 downlink:
+                   value: 1
+                   unit: 3
+                 uplink:
+                   value: 1
+                   unit: 3
+               qos:
+                 index: 9 
+                 arp:
+                   priority_level: 8 
+                   pre_emption_vulnerability: 1
+                   pre_emption_capability: 1

ausf.yaml

@@ -9,8 +9,7 @@
 ausf:
   sbi:
     server:
-      - address: 127.0.0.11
-        port: 7777
+      - address: ausf.5gc.mnc070.mcc999.3gppnetwork.org
     client:
       scp:
         - uri: http://127.0.0.200:7777

upf.yaml

@@ -13,7 +13,7 @@
     client:
   gtpu:
     server:
-      - address: 127.0.0.7
+      - address: 192.168.20.243
   session:
     - subnet: 10.45.0.0/16
       gateway: 10.45.0.1

udm.yaml

@@ -25,8 +25,7 @@
   sbi:
     server:
-      - address: 127.0.0.12
-        port: 7777
+      - address: udm.5gc.mnc070.mcc999.3gppnetwork.org
     client:
       scp:
         - uri: http://127.0.0.200:7777

nrf.yaml

@@ -13,8 +13,7 @@
           mnc: 70
     sbi:
       server:
-        - address: 127.0.0.10
-          port: 7777
+        - address: nrf.5gc.mnc070.mcc999.3gppnetwork.org

sepp1.yaml

We use default certificates for TLS communication and provide our SEPP the information about other Core’s SEPP to communicate with.

@@ -10,33 +10,35 @@
   default:
     tls:
       server:
-        private_key: @sysconfdir@/open5gs/tls/sepp1.key
-        cert: @sysconfdir@/open5gs/tls/sepp1.crt
+        private_key: /etc/open5gs/tls/sepp2.key
+        cert: /etc/open5gs/tls/sepp2.crt
+        verify_client: true
+        verify_client_cacert: /etc/open5gs/tls/ca.crt
       client:
-        cacert: @sysconfdir@/open5gs/tls/ca.crt
+        cacert: /etc/open5gs/tls/ca.crt
+        client_private_key: /etc/open5gs/tls/sepp2.key
+        client_cert: /etc/open5gs/tls/sepp2.crt
   sbi:
     server:
-      - address: 127.0.1.250
+      - address: 127.0.0.250
         port: 7777
     client:
       scp:
         - uri: http://127.0.0.200:7777
   n32:
     server:
-      - sender: sepp1.localdomain
+      - sender: sepp2.localdomain
         scheme: https
-        address: 127.0.1.251
-        port: 7777
+        address: 192.168.20.251
         n32f:
           scheme: https
-          address: 127.0.1.252
-          port: 7777
+          address: 192.168.20.252
     client:
       sepp:
-        - receiver: sepp2.localdomain
-          uri: https://sepp2.localdomain:7777
-          resolve: 127.0.2.251
+        - receiver: sepp1.localdomain
+          uri: https://sepp1.localdomain
+          resolve: 192.168.50.251
           n32f:
-            uri: https://sepp2.localdomain:7777
-            resolve: 127.0.2.252
+            uri: https://sepp1.localdomain
+            resolve: 192.168.50.252

scp.yaml

@@ -13,5 +13,5 @@
         port: 7777
     client:
       nrf:
-        - uri: http://127.0.0.10:7777
+        - uri: http://nrf.5gc.mnc070.mcc999.3gppnetwork.org

sgwu.yaml

Just bind address you have binded for it in gtpu-server:

@@ -13,5 +12,5 @@
     client:
   gtpu:
     server:
-      - address: 127.0.0.6
+      - address: 192.168.20.242

nssf.yaml

@@ -15,6 +15,6 @@
       scp:
         - uri: http://127.0.0.200:7777
       nsi:
-        - uri: http://127.0.0.10:7777
+        - uri: http://nrf.5gc.mnc070.mcc999.3gppnetwork.org
           s_nssai:
             sst: 1

STEP-3: Adding FQDNs to /etc/hosts

We should change direct IP addressing for some functions to enhance flexibility and allow them to use HTTP(80) and HTTPS(443) ports. The hosts file should look like the following:

127.0.0.1       localhost
127.0.1.1       mtaa

127.0.0.10      nrf.5gc.mnc070.mcc999.3gppnetwork.org
127.0.0.11      ausf.5gc.mnc070.mcc999.3gppnetwork.org
127.0.0.12      udm.5gc.mnc070.mcc999.3gppnetwork.org

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

STEP-4: Adding parameters to services for ability of binding private addresses

This part covers internal Linux Ubuntu ‘systemctl’ configurations which are not allowing binding private addresses by default. You need to set it manually.

Note: Files are located on ‘/usr/lib/systemd/system’ by default

open5gs-ausfd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-ausfd -c @sysconfdir@/open5gs/ausf.yaml
+ExecStart=/usr/bin/open5gs-ausfd -c /etc/open5gs/ausf.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

open5gs-udmd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-udmd -c @sysconfdir@/open5gs/udm.yaml
+ExecStart=/usr/bin/open5gs-udmd -c /etc/open5gs/udm.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

open5gs-nrfd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-nrfd -c @sysconfdir@/open5gs/nrf.yaml
+ExecStart=/usr/bin/open5gs-nrfd -c /etc/open5gs/nrf.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

open5gs-seppd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-seppd -c @sysconfdir@/open5gs/sepp1.yaml
+ExecStart=/usr/bin/open5gs-seppd -c /etc/open5gs/sepp1.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

Visited PLMN System configuration

The steps are similar to those of HPLMN therefore the configurations will be provided without repeating explanation.

STEP-1: Bind IP addresses and set up routing

### Enable IPv4/IPv6 Forwarding
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1

### Firewall disabling
sudo ufw disable

### Add NAT Rule
sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
sudo ip6tables -t nat -A POSTROUTING -s 2001:db8:cafe::/48 ! -o ogstun -j MASQUERADE

### amf
sudo ip addr add 192.168.50.185/24 dev wlo1
### sgwu
sudo ip addr add 192.168.50.186/24 dev wlo1
### upf
sudo ip addr add 192.168.50.187/24 dev wlo1
### mme
sudo ip addr add 192.168.50.182/24 dev wlo1
### n32-c
sudo ip addr add 192.168.50.251/24 dev wlo1
### n32-f
sudo ip addr add 192.168.50.252/24 dev wlo1
### GNB -> packet-rusher
sudo ip addr add 192.168.50.190/24 dev wlo1

# routing packets within LAN
sudo ip route add 192.168.20.0/24 via <gateway> dev wlo1

STEP-2: Set up configuration files

amf.yaml

@@ -15,27 +15,34 @@
         - uri: http://127.0.0.200:7777
   ngap:
     server:
-      - address: 127.0.0.5
+      - address: 192.168.50.185
   metrics:
     server:
       - address: 127.0.0.5
         port: 9090
-  guami:
+  access_control:
     - plmn_id:
         mcc: 999
         mnc: 70
+    - plmn_id:
+        mcc: 262
+        mnc: 74
+  guami:
+    - plmn_id:
+        mcc: 262
+        mnc: 74
       amf_id:
         region: 2
         set: 1
   tai:
     - plmn_id:
-        mcc: 999
-        mnc: 70
-      tac: 1
+        mcc: 262
+        mnc: 74
+      tac: 7
   plmn_support:
     - plmn_id:
-        mcc: 999
-        mnc: 70
+        mcc: 262
+        mnc: 74
       s_nssai:
         - sst: 1
   security:

smf.yaml

The difference from HPLMN is adding sst and dnn configuration to perform Roaming slicing.

@@ -9,3 +9,8 @@
 smf:
+  info:
+    - s_nssai:
+        - sst: 1
+          dnn:
+           - internet
   sbi:
     server:
       - address: 127.0.0.4
@@ -38,5 +43,5 @@
     - 2001:4860:4860::8888
     - 2001:4860:4860::8844
   mtu: 1400
-  freeDiameter: @sysconfdir@/freeDiameter/smf.conf
+  freeDiameter: /etc/freeDiameter/smf.conf

pcf.yaml

@@ -18,4 +18,27 @@
     server:
       - address: 127.0.0.13
         port: 9090
+  policy:
+    - plmn_id:
+        mcc: 999
+        mnc: 70
+      slice:
+        - sst: 1
+          default_indicator: true
+          session:
+            - name: internet
+              type: 3
+              ambr:
+                downlink:
+                  value: 1
+                  unit: 3
+                uplink:
+                  value: 1
+                  unit: 3
+              qos: 
+                index: 9
+                arp:
+                 priority_level: 8
+                 pre_emption_vulnerability: 1
+                 pre_emption_capability: 1

ausf.yaml

@@ -8,8 +8,7 @@
 ausf:
   sbi:
     server:
-      - address: 127.0.0.11
-        port: 7777
+      - address: ausf.5gc.mnc074.mcc262.3gppnetwork.org
     client:
       scp:
         - uri: http://127.0.0.200:7777

upf.yaml

@@ -12,10 +12,10 @@
     client:
   gtpu:
     server:
-      - address: 127.0.0.7
+      - address: 192.168.50.187
   session:
     - subnet: 10.45.0.1/16
-    - subnet: 2001:db8:cafe::1/48
+      # - subnet: 2001:db8:cafe::1/48
   metrics:
     server:
       - address: 127.0.0.7

udm.yaml

@@ -25,8 +25,7 @@
   sbi:
     server:
-      - address: 127.0.0.12
-        port: 7777
+      - address: udm.5gc.mnc074.mcc262.3gppnetwork.org
     client:
       scp:
         - uri: http://127.0.0.200:7777

nrf.yaml

@@ -13,8 +13,7 @@
           mnc: 70
     sbi:
       server:
-        - address: 127.0.0.10
-          port: 7777
+        - address: nrf.5gc.mnc074.mcc262.3gppnetwork.org

sepp1.yaml

@@ -9,33 +9,37 @@
   default:
     tls:
       server:
-        private_key: @sysconfdir@/open5gs/tls/sepp1.key
-        cert: @sysconfdir@/open5gs/tls/sepp1.crt
+        private_key: etc/open5gs/tls/sepp1.key
+        cert: etc/open5gs/tls/sepp1.crt
+        verify_client: true
+        verify_client_cacert: etc/open5gs/tls/ca.crt
       client:
-        cacert: @sysconfdir@/open5gs/tls/ca.crt
+        cacert: etc/open5gs/tls/ca.crt
+        client_private_key: etc/open5gs/tls/sepp1.key
+        client_cert: etc/open5gs/tls/sepp1.crt
   sbi:
     server:
-      - address: 127.0.1.250
+      - address: 127.0.0.250
         port: 7777
     client:
+            #      nrf:
+            #        - uri: http://127.0.0.10:7777
       scp:
         - uri: http://127.0.0.200:7777
   n32:
     server:
       - sender: sepp1.localdomain
         scheme: https
-        address: 127.0.1.251
-        port: 7777
+        address: 192.168.50.251
         n32f:
           scheme: https
-          address: 127.0.1.252
-          port: 7777
+          address: 192.168.50.252
     client:
       sepp:
         - receiver: sepp2.localdomain
-          uri: https://sepp2.localdomain:7777
-          resolve: 127.0.2.251
+          uri: https://sepp2.localdomain
+          resolve: 192.168.20.251
           n32f:
-            uri: https://sepp2.localdomain:7777
-            resolve: 127.0.2.252
+            uri: https://sepp2.localdomain
+            resolve: 192.168.20.252

scp.yaml

@@ -12,5 +12,5 @@
         port: 7777
     client:
       nrf:
-        - uri: http://127.0.0.10:7777
+        - uri: http://nrf.5gc.mnc074.mcc262.3gppnetwork.org

sgwu.yaml

@@ -12,5 +12,5 @@
     client:
   gtpu:
     server:
-      - address: 127.0.0.6
+      - address: 192.168.50.186

nssf.yaml

@@ -11,9 +11,11 @@
       - address: 127.0.0.14
         port: 7777
     client:
+            # nrf:
+              # - uri: 127.0.0.10:7777
       scp:
         - uri: http://127.0.0.200:7777
       nsi:
-        - uri: http://127.0.0.10:7777
+        - uri: http://nrf.5gc.mnc074.mcc262.3gppnetwork.org
           s_nssai:
             sst: 1

STEP-3: Adding FQDNs to /etc/hosts

127.0.0.1       localhost
127.0.1.1       obile
127.0.0.10      nrf.5gc.mnc074.mcc262.3gppnetwork.org
127.0.0.11      ausf.5gc.mnc074.mcc262.3gppnetwork.org
127.0.0.12      udm.5gc.mnc074.mcc262.3gppnetwork.org

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

STEP-4: Adding parameters to services for ability of binding private addresses

open5gs-ausfd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-ausfd -c @sysconfdir@/open5gs/ausf.yaml
+ExecStart=/usr/bin/open5gs-ausfd -c /etc/open5gs/ausf.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

open5gs-udmd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-udmd -c @sysconfdir@/open5gs/udm.yaml
+ExecStart=/usr/bin/open5gs-udmd -c /etc/open5gs/udm.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

open5gs-nrfd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-nrfd -c @sysconfdir@/open5gs/nrf.yaml
+ExecStart=/usr/bin/open5gs-nrfd -c /etc/open5gs/nrf.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

open5gs-seppd.service:

@@ -9,10 +9,11 @@
 Group=open5gs

 Restart=always
-ExecStart=@bindir@/open5gs-seppd -c @sysconfdir@/open5gs/sepp1.yaml
+ExecStart=/usr/bin/open5gs-seppd -c /etc/open5gs/sepp1.yaml
 RestartSec=2
 RestartPreventExitStatus=1
 ExecReload=/bin/kill -HUP $MAINPID
+AmbientCapabilities=CAP_NET_BIND_SERVICE

 [Install]
 WantedBy=multi-user.target

Packet Rusher configuration:

@@ -1,22 +1,22 @@
 gnodeb:
   controlif:
-    ip: "192.168.11.13"
+    ip: "192.168.50.190"
     port: 9487
   dataif:
-    ip: "192.168.11.13"
+    ip: "192.168.50.190"
     port: 2152
   plmnlist:
-    mcc: "999"
-    mnc: "70"
-    tac: "000001"
+    mcc: "262"
+    mnc: "74"
+    tac: "000007"
     gnbid: "000008"
   slicesupportlist:
     sst: "01"
-    sd: "000001" # optional, can be removed if not used
+    #   sd: "000001" # optional, can be removed if not used
 ue:
-  msin: "0000000120"
-  key: "00112233445566778899AABBCCDDEEFF"
-  opc: "00112233445566778899AABBCCDDEEFF"
+  msin: "0000071624"
+  key: "7F176C500D47CF2090CB6D91F4A73479"
+  opc: "3D45770E83C7BBB6900F3653FDA6330F"
   amf: "8000"
   sqn: "00000000"
   dnn: "internet"
@@ -26,7 +26,7 @@
     mnc: "70"
   snssai:
     sst: 01
-    sd: "000001" # optional, can be removed if not used
+    #  sd: "000001" # optional, can be removed if not used
   integrity:
     nia0: false
     nia1: false
@@ -38,7 +38,7 @@
     nea2: true
     nea3: false
 amfif:
-  - ip: "192.168.11.30"
+  - ip: "192.168.50.185"
     port: 38412
 logs:
   level: 4

Testing

We have successfully launched Packer Rusher testing scenario using the configuration above. The trace indicates that the interface for our UE is successfully created and the PDU session is established.

obile@obile:~/MTAA/PacketRusher$ sudo ./packetrusher ue
INFO[0000] Selecting 192.168.50.185 for host 192.168.50.185 as AMF's IP address 
INFO[0000] Selecting 192.168.50.190 for host 192.168.50.190 as gNodeB's N3/Data IP address 
INFO[0000] Selecting 192.168.50.190 for host 192.168.50.190 as gNodeB's N2/Control IP address 
INFO[0000] Loaded config at: /home/obile/MTAA/PacketRusher/config/config.yml 
INFO[0000] PacketRusher version 1.0.1                   
INFO[0000] ---------------------------------------      
INFO[0000] [TESTER] Starting test function: Testing an ue attached with configuration 
INFO[0000] [TESTER][UE] Number of UEs: 1                
INFO[0000] [TESTER][UE] disableTunnel is false          
INFO[0000] [TESTER][GNB] Control interface IP/Port: 192.168.50.190/9487~ 
INFO[0000] [TESTER][GNB] Data interface IP/Port: 192.168.50.190/2152 
INFO[0000] [TESTER][AMF] AMF IP/Port: 192.168.50.185/38412 
INFO[0000] ---------------------------------------      
INFO[0000] [GNB] SCTP/NGAP service is running           
INFO[0000] [GNB] Initiating NG Setup Request            
INFO[0000] [GNB][SCTP] Receive message in 0 stream      
INFO[0000] [GNB][NGAP] Receive NG Setup Response        
INFO[0000] [GNB][AMF] AMF Name: open5gs-amf0            
INFO[0000] [GNB][AMF] State of AMF: Active              
INFO[0000] [GNB][AMF] Capacity of AMF: 255              
INFO[0000] [GNB][AMF] PLMNs Identities Supported by AMF -- mcc: 262 mnc:74 
INFO[0000] [GNB][AMF] List of AMF slices Supported by AMF -- sst:01 sd:was not informed 
INFO[0001] [TESTER] TESTING REGISTRATION USING IMSI 0000071624 UE 
INFO[0001] [GNB] Received incoming connection from new UE 
INFO[0001] [UE] Initiating Registration                 
INFO[0001] [UE] Switched from state 0 to state 1        
INFO[0001] [GNB][SCTP] Receive message in 1 stream      
INFO[0001] [GNB][NGAP] Receive Downlink NAS Transport   
INFO[0001] [UE][NAS] Message without security header    
INFO[0001] [UE][NAS] Receive Authentication Request     
INFO[0001] [UE][NAS][MAC] Authenticity of the authentication request message: OK 
INFO[0001] [UE][NAS][SQN] SQN of the authentication request message: VALID 
INFO[0001] [UE][NAS] Send authentication response       
INFO[0001] [UE] Switched from state 1 to state 2        
INFO[0001] [GNB][SCTP] Receive message in 1 stream      
INFO[0001] [GNB][NGAP] Receive Downlink NAS Transport   
INFO[0001] [UE][NAS] Message with security header       
INFO[0001] [UE][NAS] Message with integrity and with NEW 5G NAS SECURITY CONTEXT 
INFO[0001] [UE][NAS] successful NAS MAC verification    
INFO[0001] [UE][NAS] Receive Security Mode Command      
INFO[0001] [UE][NAS] Type of ciphering algorithm is 5G-EA0 
INFO[0001] [UE][NAS] Type of integrity protection algorithm is 128-5G-IA2 
INFO[0001] [GNB][SCTP] Receive message in 1 stream      
INFO[0001] [GNB][NGAP] Receive Initial Context Setup Request 
INFO[0001] [GNB][UE] UE Context was created with successful 
INFO[0001] [GNB][UE] UE RAN ID 1                        
INFO[0001] [GNB][UE] UE AMF ID 2                        
INFO[0001] [GNB][UE] UE Mobility Restrict --Plmn-- Mcc: not informed Mnc: not informed 
INFO[0001] [GNB][UE] UE Masked Imeisv: 1110000000ffff00 
INFO[0001] [GNB][UE] Allowed Nssai-- Sst: [01] Sd: [not informed] 
INFO[0001] [GNB][NGAP][AMF] Send Initial Context Setup Response. 
INFO[0001] [GNB] Initiating Initial Context Setup Response 
INFO[0001] [GNB][NGAP] No PDU Session to set up in InitialContextSetupResponse. 
INFO[0001] [UE][NAS] Message with security header       
INFO[0001] [UE][NAS] Message with integrity and ciphered 
INFO[0001] [UE][NAS] successful NAS CIPHERING           
INFO[0001] [UE][NAS] successful NAS MAC verification    
INFO[0001] [UE][NAS] Receive Registration Accept        
INFO[0001] [UE][NAS] UE 5G GUTI: &{119 11 [242 98 242 71 2 0 64 192 0 6 165]} 
INFO[0001] [UE] Switched from state 2 to state 3        
INFO[0001] [UE] Initiating New PDU Session              
INFO[0001] [GNB][SCTP] Receive message in 1 stream      
INFO[0001] [GNB][NGAP] Receive Downlink NAS Transport   
INFO[0001] [UE][NAS] Message with security header       
INFO[0001] [UE][NAS] Message with integrity and ciphered 
INFO[0001] [UE][NAS] successful NAS CIPHERING           
INFO[0001] [UE][NAS] successful NAS MAC verification    
INFO[0001] [UE][NAS] Receive Configuration Update Command 
INFO[0001] [UE] Initiating Configuration Update Complete 
INFO[0001] [GNB][SCTP] Receive message in 1 stream      
INFO[0001] [GNB][NGAP] Receive PDU Session Resource Setup Request 
INFO[0001] [GNB][NGAP][UE] PDU Session was created with successful. 
INFO[0001] [GNB][NGAP][UE] PDU Session Id: 1            
INFO[0001] [GNB][NGAP][UE] NSSAI Selected --- sst: NSSAI was not selected sd: NSSAI was not selected 
INFO[0001] [GNB][NGAP][UE] PDU Session Type: ipv4       
INFO[0001] [GNB][NGAP][UE] QOS Flow Identifier: 1       
INFO[0001] [GNB][NGAP][UE] Uplink Teid: 59994           
INFO[0001] [GNB][NGAP][UE] Downlink Teid: 1             
INFO[0001] [GNB][NGAP][UE] Non-Dynamic-5QI: 9           
INFO[0001] [GNB][NGAP][UE] Priority Level ARP: 8        
INFO[0001] [GNB][NGAP][UE] UPF Address: 192.168.50.187 :2152 
INFO[0001] [GNB] Initiating PDU Session Resource Setup Response 
INFO[0001] [UE][NAS] Message with security header       
INFO[0001] [UE][NAS] Message with integrity and ciphered 
INFO[0001] [UE][NAS] successful NAS CIPHERING           
INFO[0001] [UE][NAS] successful NAS MAC verification    
INFO[0001] [UE][NAS] Receive DL NAS Transport           
INFO[0001] [UE][NAS] Receiving PDU Session Establishment Accept 
INFO[0001] [UE][NAS] PDU session QoS RULES: [1 0 6 49 49 1 1 255 1] 
INFO[0001] [UE][NAS] PDU session DNN: internet          
INFO[0001] [UE][NAS] PDU session NSSAI -- sst: 1 sd: 000 
INFO[0001] [UE][NAS] PDU address received: 10.45.0.2    
INFO[0002] [UE][GTP] Interface val0000071624 has successfully been configured for UE 10.45.0.2 
INFO[0002] [UE][GTP] You can do traffic for this UE using VRF vrf0000071624, eg: 
INFO[0002] [UE][GTP] sudo ip vrf exec vrf0000071624 iperf3 -c IPERF_SERVER -p PORT -t 9000

We can test this interface using

mtr -a 10.45.0.2 8.8.8.8

The result is a successful traceroute from our device all the way up to google DNS

Wireshark capture confirms the traffic is going from UE:

This capture also shows that traffic does not go through SEPP N-32f interface but directly to the web confirming that we use the LBO method.

Conclusion

We have configured 5G Roaming using recently provided open-source solutions with Open5GS update and Packet Rusher pre-release. Both solutions are rather raw and need some work-arounds to solve the internal errors. However, the issues are not crucial.

Test UE was successfully connected to the Internet using VPLMN GNB and registered with HPLMN Core. The traffic goes using modern LBO method lowering the communication latency.

This article is supposed to help others to install and configure their 5G Roaming with modern solutions like Open5GS and Packet Rusher. This work is the first one discussing this topic at the moment of creation.

Discussion

  1. The systems used on this project run on different Ubuntu versions. The sytsme hosting the HPLMN uses the last LTS Ubuntu 22.04 version (at the moment of creation). However, it would not support Packet Rusher to test bidirectional Roaming using our testbed. The second Ubuntu 20.04 System supports both Open5GS and Packet Rusher.
  2. Load-testing was not performed due to insufficient documentation for this feature in Packet Rusher. The performance of the network was not measured in units but only whether it works or not.
  3. Some configurations are not crucial for Roaming-only setup. These configuration are good enough for overall 5G system testing, not only Roaming features. However, actual deployment of private 5G network would require much more additional security, monitoring etc. measures.

메타데이터
post_id
dacb34f3497c
slug
5g-roaming-open5gs-packet-rusher-dacb34f3497c
url
https://medium.com/@vidime.sa.buduci.rok/5g-roaming-open5gs-packet-rusher-dacb34f3497c
canonical_url
https://medium.com/@vidime.sa.buduci.rok/5g-roaming-open5gs-packet-rusher-dacb34f3497c
author_url
https://medium.com/@vidime.sa.buduci.rok
status
ok
fetched_at
2026-07-08 12:40:34