NR SA - Network Slicing
The purpose of this tutorial is to show you how to test Network Slices. The purpose of this tutorial is to show how to configure different slices in terms of signaling message, not to show different traffic flows via each of the slide. In terms of the signaling messages, Network slicing configuration is configured by following messages.
- Registration Request : UE informs network on which slice it wants to use. UE can specify one or more of slices at this step.
- Requested NSSAI
- Network Slicing Indication
- Registration Accept : Network informs UE on what kind of slices are allowed and which slice is configured for the UE.
- Allowed NSSAI
- Configured NSSAI
- Network Slicing Indication
- NSSAI Inclusion Mode
Table of Contents
- NR SA - Network Slicing
Test Setup
I used two different setups for the test in this tutorial depending on the type of DUTs for each test. When I used a commercial UE as DUT, I used <Setup 1> and when I used a Amarisoft UEsim as DUT I used <Setup 2>.
< Setup 1 >
< Setup 2 >
Test setup with UEsim for this tutorial is as shown below.
Key Configuration Parameters
Followings are important configuration parameters for this tutorial. You may click on the items for the descriptions from Amarisoft documents.
- enb config
- nssai : In this link, you will get the descriptions for all the items listed below
- sst
- sd
- mme config
- Uesim Config
Test 1 : Network Slice with default settings - Commericial UE
This is to show a very basic test with Commercial UE. It is with almost basic configuration. In most case, commercial UE does not provide any way for the user to change Network Slice configuration on UEside. So it would be good to figure out the network slice configuration on UE before the test.
Configuration
An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration In thisTest, I used the gnb-sa .cfg without any change.
If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side
In this test, I used the default configuration for core network(i.e, mme-ims.cfg, ims.default.cfg and ue_db-ims.cfg).
Following is the configuration for network slice in gnb-sa .cfg
nssai in plmn_list indicates the list of nssai supported by the specific tracking area. Together with nssai in mme.cfg, these are used to determined the allowed NSSAI in Attach Accept message. If this is not configured, the default nssai(sst: 1 (eMBB)) is assumed.
Following is the configuration for slice in mme-ims.cfg. nssai in mme.cfg indicates the list of nssai supported by the mme. Together with nssai in enb.cfg, these are used to determined the allowed NSSAI in Attach Accept message. If this is not configured, the default nssai(sst: 1 (eMBB)) is assumed.
In this test, the slice will be applied to the "internet" PDN.
Followings are not used for this test, but if you enable this parameter (slices[]) you can apply a specific NSSAI to a specific QoS flow.
Following is the configuration for network slice in ue_db-ims.cfg. In this test, no specific pnd_list:[ ] configuration is specified.
Perform the Test
Check with cell parameter and see if it is configured as intended.
Power on UE and make it sure that UE attaches
Confirm that UE completed the attach and get the IP address. If you don't get this including IP address, you need to troubleshoot.
Log Analysis
In this section, I will show you only the portions of the log that are relavent to this tutorial. For the full log, refer to the sample log linked aboved.
In the Registration Request message in this test, UE request NSSAI {SST 1}. This is based on UE configuration. You need to change UE configuration if you want to change this contents.
In Registration Accept message, Core Network put S-NSSAI {SST=1} in Allowed NSSAI IE.
Yon can confirm the DNN used for the connection.
Now UE initiate the PDU session by sending PDU Session Establishment Request.
Network establish the PDU session by sending PDU session establishment accept. In this message, Core network informs UE of the network slice that is associated with the PDU session via S-NSSAI IE.
The PDU Session Establishment Accept message is conveyed to UE via DL NAS transport message.
Test 2 : Network Slice with Single Slices - UEsim
This is to show on how to configure single Network Slice and test with Amarisoft UEsim. Since we have full control over UE configuration with Amarisoft UEsim, we can test DUT with more detailed configurations.
Configuration
An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration In this tutorial, I used the ue-nr-sa-slice-single.cfg that is copied and modified from the ue-nr.cfg and gnb-sa-slice.cfg that is copied and modified from gnb-sa.cfg. The mme configurations that are used for this test are mme-ims-slice-single.cfg and ue_db-ims-slice-single.cfg which are copied and modified from mme-ims.cfg and ue_db-ims.cfg
If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side
I used gnb-sa-slice.cfg for enb configuration. gnb-sa-slice.cfg is copied and modified from gnb-sa.cfg
For core network configuration, I used mme-ims-slice-single.cfg which is copied and modified from mme-ims.cfg. For UE database, I used ue_db-ims-slice-single.cfg which is copied and modified from ue_db-ims.cfg
For the UEsim, I used ue-nr-sa-slice-single.cfg which is copied and modified from ue-nr-sa.cfg
Following is the configuration in gnb-sa-slice.cfg .
In this configuration, three network slices ({sst:1, sd:1}, {sst:2}, {sst:3, sd:50}) are configured for the gNB (
Followings are the configurations in mme-ims-slice-single.cfg
Same as in gNB configuration, three network slices ({sst:1, sd:1}, {sst:2}, {sst:3, sd:50}) are configured for the CORE Network.
Two of the network slices are associated with "internet" PDU for different 5QI. Slice {sst:1, sd1} is associated with 5QI 6 and {sst:3,sd:50} is associated with 5QI 7.
Followings are the configurations in ue_db-ims-slice-single.cfg
You can manually specify the APN name and the associated Network slice in pdn_list configuration parameter in UE DB on Callbox. In this test case, the "internet" APN is set as default PDU and {sst:1, sd:1} is the network slice mapped to this PDU.
Followings are the configurations in ue-nr-sa-slice-single.cfg (
On UEsim configuration as well, you can specify the default apn and the default network slice that is mapped to the apn. Here in this test, "internet" is set as the default APN and {sst:1, sd:1} is configured as the default network slice.
Perform the Test
Check with cell parameter and see if it is configured as intended.
Power on UE and make it sure that UE attaches
Confirm that UE completed the attach and get the IP address. If you don't get this including IP address, you need to troubleshoot.
Log Analysis
In this section, I will show you only the portions of the log that are relavent to this tutorial. For the full log, refer to the sample log linked above.
In case of UEsim, you may see the Registration Request in Plan 5GS NAS message without much detailed information because the UEsim does not have any stored Security Context when lte service just started/restarted and the power_on was done for the first time).
In this case, UEsim send Registration Request after Security Setup embedded within Security mode complete message. Here in Registration Request message, UE specifies 'Requested NSSAI' as set in the configuration file. In this test, it is set to SST:1, SD : 1.
Then Network specifies Allowed NSSAI in Registration Accept. In this test, it is set to SST:1, SD:1.
Then UE (UEsim) initiate PDU session by sending PDU Session Establishment Request with S-NSSAI using one of network slices listed in Allowed NSSAI.
Then Network completes PDU Session with S-NSSAI (the S-NSSAI associated with the PDU session).
Test 3 : Network Slice with Multiple Slices - UEsim
This is to show on how to configure single Network Slice and test with Amarisoft UEsim. Since we have full control over UE configuration with Amarisoft UEsim, we can test DUT with more detailed configurations.
Configuration
An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration In this tutorial, I used the ue-nr-sa-slice-multi.cfg that is copied and modified from the ue-nr.cfg and gnb-sa-slice.cfg that is copied and modified from gnb-sa.cfg. The mme configurations that are used for this test are mme-ims-slice-multi.cfg and ue_db-ims-slice-multi.cfg which are copied and modified from mme-ims.cfg and ue_db-ims.cfg
If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side
I used gnb-sa-slice.cfg for enb configuration. gnb-sa-slice.cfg is copied and modified from gnb-sa.cfg
For core network configuration, I used mme-ims-slice-multi.cfg which is copied and modified from mme-ims.cfg. For UE database, I used ue_db-ims-slice-multi.cfg which is copied and modified from ue_db-ims.cfg
For the UEsim, I used ue_db-ims-slice-multi.cfg which is copied and modified from ue-nr-sa.cfg
Following is the configuration in gnb-sa-slice.cfg
In this configuration, three network slices ({sst:1, sd:1}, {sst:2}, {sst:3, sd:50}) are configured for the gNB (
Followings are the configurations in mme-ims-slice-multi.cfg
Same as in gNB configuration, three network slices ({sst:1, sd:1}, {sst:2}, {sst:3, sd:50}) are configured for the CORE Network.
Two of the network slices are associated with "internet" PDU for different 5QI. Slice {sst:1, sd1} is associated with 5QI 6 and {sst:3,sd:50} is associated with 5QI 7.
Followings are the configurations in ue_db-ims-slice-multi.cfg
You can manually specify the APN name and the associated Network slice in pdn_list configuration parameter in UE DB on Callbox. In this test case, the "internet" APN is set as default PDU and {sst:1, sd:1} is the network slice mapped to this PDU.
Followings are the configurations in ue-nr-sa-slice-multi.cfg
On UEsim configuration as well, you can specify the default apn and the default network slice that is mapped to the apn. Here in this test, "internet" is set as the default APN. Two slices{sst:1, sd:1} and {sst:3, sd:50} are configured as the default network slice.
Perform the Test
Check with cell parameter and see if it is configured as intended.
Power on UE and make it sure that UE attaches
Confirm that UE completed the attach and get the IP address. If you don't get this including IP address, you need to troubleshoot.
Log Analysis
In this section, I will show you only the portions of the log that are relavent to this tutorial. For the full log, refer to the sample log linked aboved.
In case of UEsim, you may see the Registration Request in Plan 5GS NAS message without much detailed information because the UEsim does not have any stored Security Context when lte service just started/restarted and the power_on was done for the first time).
In this case, UEsim send Registration Request after Security Setup embedded within Security mode complete message. Here in Registration Request message, UE specifies 'Requested NSSAI' as set in the configuration file. In this test, it is set to TWO slices {SST:1, SD : 1} and {SST:3, SD : 50}.
Then Network specifies Allowed NSSAI in Registration Accept. In this test, it is set to the TWO slices {SST:1, SD:1} and {SST:3, SD:50} .
Then UE (UEsim) initiate PDU session by sending PDU Session Establishment Request with S-NSSAI using one of network slices listed in Allowed NSSAI.
Then Network completes PDU Session with S-NSSAI (the S-NSSAI associated with the PDU session).
Test 4 : Network Slice with RAN Slices - UEsim
This is to show on how to configure single Network Slice and test with Amarisoft UEsim. Since we have full control over UE configuration with Amarisoft UEsim, we can test DUT with more detailed configurations.
Configuration
An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration In this tutorial, I used the ue-nr-sa.cfg (a default sample configuration as it is) and gnb-sa-ran-slice.cfg that is copied and modified from gnb-sa.cfg. The mme configurations that are used for this test are mme-ran-slice.cfg which are copied and modified from mme-ims.cfg
If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side
For core network configuration, I used mme-ran-slice.cfg which is copied and modified from mme-ims.cfg.
For the UEsim, I used ue-nr-sa.cfg (a default sample configuration as it is)
Following is the configuration in gnb-sa-ran-slice.cfg
In this configuration, three network slices ({sst:1, sd:1}, {sst:2}, {sst:3, sd:50}) are configured for the gNB (
Followings are the configurations in mme-ran-slice.cfg
Same as in gNB configuration, three network slices ({sst:1, sd:1}, {sst:2}, {sst:3, sd:50}) are configured for the CORE Network.
In this test, two different PDN will be used but none of the pdn is configured with any specific PDN in configuration file. The "default" pdn will be assigned with a slice that network will allocate by default during the initial registration. The "internet" pdn will be triggered by RemoteAPI with a specific slices configuration which is set by user.
Followings are the configurations in ue-nr-sa.cfg In this test, I don't put any specific configuration for slices on UEsim since those configuration will be specified by RemoteAPI.
Perform the Test
Check with cell parameter and see if it is configured as intended.
Power on UE and make it sure that UE attaches
Once the initial attach process is complete, trigger the "internet" pdu with a specific slice configuration using the remoteAPI as follows.
./ws.js ue '{"message":"pdn_connect", "ue_id" : 1, "apn" : "internet", "snssai" : {"sst" : 3,"sd" : 50} }' |
If there is no syntax problem, you will get the following output.
You can confirm the traffic for the two PDU session. (
In the (mme) screen, you can confirm if the two PDUs are established as you intended.
Log Analysis
In this section, I will show you only the portions of the log that are relavent to this tutorial. For the full log, refer to the sample log linked aboved.
During the initial registration, UE send PDU session establishment request with Request Type = Initial Request via UL NAS transport which carries a NAS message (PDU session establishment request in this case) in it.
This is PDU session establishment Request message exactracted from UL NAS transport and is conveyed to SMF.
Network respond with PDU session establishment accept and allocates an NSSAI (SST = 01 in this case) and DNN=default.mnc001.mcc001.gprs
Now an DRB is created and associated with PDU session created by the core network. The mapping between PDU session and DRB / RLC is done by the IEs - pdu-Session, drb-Identity, LogicalChannelIdentity and servedRadioBearer.
For this slice associated initial PDU session, the physical layer resources are allocated as shown below.
With the remoteAPI ./ws.js ue '{"message":"pdn_connect", "ue_id" : 1, "apn" : "internet", "snssai" : {"sst" : 3,"sd" : 50} }', following procedure is performed.
UE triggers a PDU session and request a specific network slice (SST 3, SD 50 in this case) and DNN "internet". The NAS message (PDU session establishment request in this case) is encapsulated by UL NAS Transport and is conveyed to AMF
The PDU session establishment request message is transferred to SMF (You see PDU session identity is 2 in this case)
Core network respond with PDU session establishement accept allocating a specific NSSAI (SST=3, SD=50 in this case) which is associated with a specific DNN (internet.mnc001.mcc01.gprs in this case)
This is PDU session establishement accept message extracted from the DL NAS transport. Basically the contents of the messages are same as in DL NAS transport.
Now an DRB is created and associated with PDU session created by the core network. The mapping between PDU session and DRB / RLC is done by the IEs - pdu-Session, drb-Identity, LogicalChannelIdentity and servedRadioBearer.
For this slice associated initial PDU session, the physical layer resources are allocated as shown below.
Test 5 : USRP - UEsim
This is to show on how to test USRP (Manage UE Policy Command) message. Main purpose of this test is to focus on the parameters and the syntax of remote API command for usrp and verify the corresponding NAS message sent out from the callbox(MME in this case)
Configuration
Use the same configuration as Test 2
Perform the Test
Check with cell parameter and see if it is configured as intended.
Power on UE and make it sure that UE attaches
Confirm that UE completed the attach and get the IP address. If you don't get this including IP address, you need to troubleshoot. (
Now send a RemoteAPI command to send "Manage UE policy command" message.
Following is the text version of the command so that you can copy and modify easily.
[root@CBC-2023010100 mme]# ./ws.js mme '{"message":"ursp_rules","imsi":"001010123456789", "imei":"01234567000001", "ue_policy_section_management_list": [ { "plmn": "00101", "instruction_list": [ { "upsc": 0, "ue_policy_part_list": [ { "ursp_rules": [ { "precedence": 255, "traffic_descriptor_components": [ { "ipv4_remote_addr": "192.168.3.3", "mask": "255.255.255.255" }, { "match_all": "false" }, { "dnn": "internet" }, ], "route_list": [ { "precedence": 255, "components": [ { "snssai": {"sst": 1, "sd": 1} }, { "dnn": "internet" }, { "preferred_access_type": "3gpp" }, ], }, ], }, ], }, ], }, ], } ], }' WebSocket remote API tool version 2025-03-17, Copyright (C) 2012-2025 Amarisoft [0.004] ### Connected to 127.0.0.1:9000 [0.005] ### Ready: name=MME, type=MME, version=2025-03-17, product=CBC [0.024] <== Send message ursp_rules id#1 [0.045] ==> Message received { "message": "ursp_rules", "message_id": "id#1", "time": 11689.642, "utc": 1742662644.989 } |
Log Analysis
In this section, I will show you only the portions of the log that are relavent to this tutorial. For the full log, refer to the sample log linked above.
In this tutorial, there is only one NAS message that you need to check. It is DL NAS transport message that carriers Manage UE policy command. Once the usrp_rules remote API command is properly processed, you are supposed to see this message sent out by the callbox core network (MME).
RRC / NAS Signaling
DL NAS Transport/Manage UE policy Command
: This is the RegistrationRequest message sent by UE to inform the network slice configuration it wants (
Protocol discriminator = 0x7e (5GS Mobility Management)
Security header = 0x2 (Integrity protected and ciphered)
Auth code = 0xd6af39a6
Sequence number = 0x0c
Protocol discriminator = 0x7e (5GS Mobility Management)
Security header = 0x0 (Plain 5GS NAS message, not security protected)
Message type = 0x68 (DL NAS transport)
Payload container type = 5 (UE policy container)
Payload container:
Procedure transaction identity = 128
Message type = 0x01 (Manage UE policy command)
UE policy section management list:
Length: 64
UE policy section management sublist (PLMN 1):
MCC = 001
MNC = 01
Instruction 1:
UPSC: 0
UE policy part 1
UE policy part contents length: 53
UE policy part type: 1 (URSP)
UE policy part contents:
URSP rule 1
Length of URSP rule: 50
Precedence value of URSP rule: 255
Length of traffic descriptor: 21
Traffic descriptor:
IPv4 remote address = 192.168.3.2 mask 255.255.255.255
Match-all
DNN = "internet"
Length of route selection descriptor list: 24
Route selection descriptor list:
Route selection descriptor 1
Length of route selection descriptor: 22
Precedence value of route selection descriptor: 255
Length of route selection descriptor contents: 19
Route selection descriptor components:
S-NSSAI
Length of S-NSSAI contents = 4 (SST and SD)
SST = 0x01
SD = 0x000001
DNN = "internet"
Preferred access type = 1 (3GPP access)