|
||||||
Comparing to free5gc, Running the test with open5GS went through much smoothly. I was able to reach to the point of ping test without any serious issues. I just spent a few hours of tweaking configuration to make them match properly among gNB configuration (Amarisoft gNB), UE (Amarisoft UEsim), open5GS configuration and open5GS subscriber database. TestSetupThe test setup that I used is as shown below. I used Amari callbox as gNB connecting to open5GS. NOTE : I noticed that open5gs support milenage authentication algorithm only (not supporting 3gpp XOR algorithm). Since I don't have any test USIM with milenage algorithm, I used Amarisoft UEsimulator where I can configure USIM parameters as I want. Network Adaptor setting for the virtual box is set as follows. Following is ip setup shown on the Linux (Ubuntu running in Virtualbox on Windows 10 PC). route setting on Ubuntu Server in the virtual box is as follows. Before you RunSince 5GC is connected to RAN via gtp and sctp as explained in these notes (GTP, SCTP, NGAP), gtp5g and sctp driver should be properly installed and activated. As you see here, you don't see any gtp driver here implying that the gtp is implemented within the core protocol stack (not as linux driver). In the same way, you can check if sctp driver is activated.. but you would see this result only after you run free5gc. Now check if all the services for each components of the corenetwork is running. ConfigurationNow you have to change all the necessary configuration files according to your test setup. At the initial test, I need to change only two files amf.yaml and upf.amf file, but you may need to change more files as your test gets more complicated. Following is the contents of amf.yaml and upf.yaml and the red part is what I have changed from the original configuration. It is import to get not only plmn but aslo tac to match between gNB(Amari Callbox) and open5gs configuration.
Following is the configuration changes in upf
Restart the ServicesOnce you completed the change of configuration files, you need to restart the services which are using the changed configuration files as shown below.
Log AnalysisI did simple initial attach and ping from open5gs to UE. Followings are the trace log captured by Amarisoft gNB and openGS. Following is the log captured on Amarisoft Callbox WebGUI. Following is the Wireshark log captured on open5gs PC. (NOTE : This is the wireshark view with the profile contributed by Merlin Chlosta. He kindly agreed to share his wireshark profile. You can get it from his github). Followings are the message details from Amarisoft gNB. Most of NAS and NGAP log will be listed here but some very basic RRC message will be omited for simplicity. [1], [2]. Refer to the note about SCTP
[3] NG setup request Message: 192.168.100.32:38412 NG setup request
Data: initiatingMessage: { procedureCode id-NGSetup, criticality reject, value { protocolIEs { { id id-GlobalRANNodeID, criticality reject, value globalGNB-ID: { pLMNIdentity '00F110'H, gNB-ID gNB-ID: '0012345'H } }, { id id-RANNodeName, criticality ignore, value "gnb0012345" }, { id id-SupportedTAList, criticality reject, value { { tAC '000001'H, broadcastPLMNList { { pLMNIdentity '00F110'H, tAISliceSupportList { { s-NSSAI { sST '01'H } } } } } } } }, { id id-DefaultPagingDRX, criticality ignore, value v128 } } } }
[4] NG setup response
Message: 192.168.100.32:38412 NG setup response
Data: successfulOutcome: { procedureCode id-NGSetup, criticality reject, value { protocolIEs { { id id-AMFName, criticality reject, value "open5gs-amf0" }, { id id-ServedGUAMIList, criticality reject, value { { gUAMI { pLMNIdentity '00F110'H, aMFRegionID '02'H, aMFSetID '0000000001'B, aMFPointer '000000'B } } } }, { id id-RelativeAMFCapacity, criticality ignore, value 255 }, { id id-PLMNSupportList, criticality reject, value { { pLMNIdentity '00F110'H, sliceSupportList { { s-NSSAI { sST '01'H } } } } } } } } }
[8] Registration request
Message: Registration request
Data: 0000: 7e 00 41 79 00 0d 01 00 f1 10 f0 ff 00 00 00 00 ~.Ay............ 0010: 00 00 10 2e 02 e0 e0 ....... Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x41 (Registration request) 5GS registration type: Follow-on request bit = 1 Value = 1 (initial registration) ngKSI: TSC = 0 NAS key set identifier = 7 5GS mobile identity: SUCI SUPI format = 0 (IMSI) MCC = 001 MNC = 01 Routing indicator = 0 Protection sheme id = 0 (Null scheme) Home network public key identifier = 0 MSIN = 0000000001 UE security capability: 0xe0 (5G-EA0=1, 128-5G-EA1=1, 128-5G-EA2=1, 128-5G-EA3=0, 5G-EA4=0, 5G-EA5=0, 5G-EA6=0, 5G-EA7=0) 0xe0 (5G-IA0=1, 128-5G-IA1=1, 128-5G-IA2=1, 128-5G-IA3=0, 5G-IA4=0, 5G-IA5=0, 5G-IA6=0, 5G-IA7=0)
[9] Initial UE message
Message: 192.168.100.32:38412 Initial UE message
initiatingMessage: { procedureCode id-InitialUEMessage, criticality ignore, value { protocolIEs { { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E004179000D0100F110F0FF000000000000102E02E0E0'H }, { id id-UserLocationInformation, criticality reject, value userLocationInformationNR: { nR-CGI { pLMNIdentity '00F110'H, nRCellIdentity '001234501'H }, tAI { pLMNIdentity '00F110'H, tAC '000001'H } } }, { id id-RRCEstablishmentCause, criticality ignore, value mo-Signalling }, { id id-UEContextRequest, criticality ignore, value requested } } } }
[10] Downlink NAS transport
Message: 192.168.100.32:38412 Downlink NAS transport
initiatingMessage: { procedureCode id-DownlinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E005600020000211697B0AED5555D7C697D4AA79703A1202010....'H } } } }
[11] Authentication request
Message: Authentication request
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x56 (Authentication request) ngKSI: TSC = 0 NAS key set identifier = 0 ABBA: Length = 2 Data = 00 00 Authentication parameter RAND: Data = 16 97 b0 ae d5 55 5d 7c 69 7d 4a a7 97 03 a1 20 Authentication parameter AUTN: Length = 16 Data = 6e f3 94 c5 8e f7 90 01 4e 5a ed 53 2f 69 8f 72
[14] Authentication response
Message: Authentication response
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x57 (Authentication response) Authentication response parameter: Length = 16 Data = c2 18 18 ac 3e 42 70 a0 f4 56 35 18 2d 8d 1f 50
[15] Uplink NAS transport
Message: 192.168.100.32:38412 Uplink NAS transport
initiatingMessage: { procedureCode id-UplinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E00572D10C21818AC3E4270A0F45635182D8D1F50'H }, { id id-UserLocationInformation, criticality ignore, value userLocationInformationNR: { nR-CGI { pLMNIdentity '00F110'H, nRCellIdentity '001234501'H }, tAI { pLMNIdentity '00F110'H, tAC '000001'H } } } } } }
[16] Downlink NAS transport
Message: 192.168.100.32:38412 Downlink NAS transport
initiatingMessage: { procedureCode id-DownlinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E03D75F3707007E005D020002E0E0E1360102'H } } } }
[17] Security mode command
Message: Security mode command
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x3 (Integrity protected with new 5G NAS security context) Auth code = 0xd75f3707 Sequence number = 0x00 Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x5d (Security mode command) Selected NAS security algorithms = 0x02 (5G-EA0, 5G-IA2) ngKSI: TSC = 0 NAS key set identifier = 0 Replayed UE security capabilities: 0xe0 (5G-EA0=1, 128-5G-EA1=1, 128-5G-EA2=1, 128-5G-EA3=0, 5G-EA4=0, 5G-EA5=0, 5G-EA6=0, 5G-EA7=0) 0xe0 (5G-IA0=1, 128-5G-IA1=1, 128-5G-IA2=1, 128-5G-IA3=0, 5G-IA4=0, 5G-IA5=0, 5G-IA6=0, 5G-IA7=0) IMEISV request = 1 Additional 5G security information = 0x02 (RINMR=1, HDP=0)
[20] Security mode complete
Message: Security mode complete
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x4 (Integrity protected and ciphered with new 5G NAS security context) Auth code = 0x4aea8713 Sequence number = 0x00 Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x5e (Security mode complete) IMEISV: IMEISV = 0123456700000101 NAS message container: Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x41 (Registration request) 5GS registration type: Follow-on request bit = 1 Value = 1 (initial registration) ngKSI: TSC = 0 NAS key set identifier = 7 5GS mobile identity: SUCI SUPI format = 0 (IMSI) MCC = 001 MNC = 01 Routing indicator = 0 Protection sheme id = 0 (Null scheme) Home network public key identifier = 0 MSIN = 0000000001 5GMM capability: 0x00 (SGC=0, 5G-IPHC-CP CIoT=0, N3 data=0, 5G-CP CIoT=0, RestrictEC=0, LPP=0, HO attach=0, S1 mode=0) UE security capability: 0xe0 (5G-EA0=1, 128-5G-EA1=1, 128-5G-EA2=1, 128-5G-EA3=0, 5G-EA4=0, 5G-EA5=0, 5G-EA6=0, 5G-EA7=0) 0xe0 (5G-IA0=1, 128-5G-IA1=1, 128-5G-IA2=1, 128-5G-IA3=0, 5G-IA4=0, 5G-IA5=0, 5G-IA6=0, 5G-IA7=0) Requested NSSAI: S-NSSAI Length of S-NSSAI contents = 1 (SST) SST = 0x01 UE's usage setting = 0x01 (Data centric) Network slicing indication = 0x02 (DCNI=1, NSSCI=0) 5GS update type = 0x01 (EPS-PNB-CIoT=no additional information, 5GS-PNB-CIoT=no additional information, NG-RAN-RCU=0, SMS requested=1)
[21] Uplink NAS transport
Message: 192.168.100.32:38412 Uplink NAS transport
initiatingMessage: { procedureCode id-UplinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E044AEA8713007E005E77000905....'H }, { id id-UserLocationInformation, criticality ignore, value userLocationInformationNR: { nR-CGI { pLMNIdentity '00F110'H, nRCellIdentity '001234501'H }, tAI { pLMNIdentity '00F110'H, tAC '000001'H } } } } } }
[22] Initial context setup request
Message: 192.168.100.32:38412 Initial context setup request
initiatingMessage: { procedureCode id-InitialContextSetup, criticality reject, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-GUAMI, criticality reject, value { pLMNIdentity '00F110'H, aMFRegionID '02'H, aMFSetID '0000000001'B, aMFPointer '000000'B } }, { id id-AllowedNSSAI, criticality reject, value { { s-NSSAI { sST '01'H } } } }, { id id-UESecurityCapabilities, criticality reject, value { nRencryptionAlgorithms 'C000'H, nRintegrityProtectionAlgorithms 'C000'H, eUTRAencryptionAlgorithms '0000'H, eUTRAintegrityProtectionAlgorithms '0000'H } }, { id id-SecurityKey, criticality reject, value 'FD06FF77AB6125020A26EE271B...'H }, { id id-MaskedIMEISV, criticality ignore, value '0123456700FFFF01'H }, { id id-NAS-PDU, criticality ignore, value '7E02A7FA305F017E004201017700...'H } } } }
[23] Security mode command
Message: Security mode command .. { message c1: securityModeCommand: { rrc-TransactionIdentifier 0, criticalExtensions securityModeCommand: { securityConfigSMC { securityAlgorithmConfig { cipheringAlgorithm nea0, integrityProtAlgorithm nia0 } } } } }
[24] Security mode complete
Message: Security mode complete
{ message c1: securityModeComplete: { rrc-TransactionIdentifier 0, criticalExtensions securityModeComplete: { } } }
[28] UE radio capability info indication
Message: 192.168.100.32:38412 UE radio capability info indication
initiatingMessage: { procedureCode id-UERadioCapabilityInfoIndication, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-UERadioCapability, criticality ignore, value '0330864C1A033A047465A025F80008...'H } } } }
[29] Registration accept
Message: Registration accept
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x2 (Integrity protected and ciphered) Auth code = 0xa7fa305f Sequence number = 0x01 Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x42 (Registration accept) 5GS registration result = 0x01 (Emergency registered=0, NSSAA to be performed=0, SMS allowed=0, 3GPP access) 5G-GUTI: 5G-GUTI MCC = 001 MNC = 01 AMF Region ID = 2 AMF Set ID = 1 AMF Pointer = 0 5G-TMSI = 0xf400683d TAI list: Length = 7 Data = 20 00 f1 10 00 00 01 Allowed NSSAI: S-NSSAI Length of S-NSSAI contents = 1 (SST) SST = 0x01 5GS network feature support: 0x01 (MPSI=0, IWK N26=0, EMF=not supported, EMC=not supported, IMS-VoPS-N3GPP=0, IMS-VoPS-3GPP=1) 0x00 (5G-UP CIoT=0, 5G-IPHC-CP CIoT=0, N3 data=0, 5G-CP CIoT=0, RestrictEC=both CE mode A and CE mode B are not restricted, MCSI=0, EMCN3=0) T3512 value: Value = 9 Unit = 1 (1 hour)
[32] Initial context setup response
Message: 192.168.100.32:38412 Initial context setup response
successfulOutcome: { procedureCode id-InitialContextSetup, criticality reject, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality ignore, value 1 }, { id id-RAN-UE-NGAP-ID, criticality ignore, value 1 } } } }
[34] Registration complete
Message: Registration complete
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x2 (Integrity protected and ciphered) Auth code = 0x19aec243 Sequence number = 0x01 Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x43 (Registration complete)
[35] Uplink NAS transport
Message: 192.168.100.32:38412 Uplink NAS transport ..... initiatingMessage: { procedureCode id-UplinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E0219AEC243017E0043'H }, { id id-UserLocationInformation, criticality ignore, value userLocationInformationNR: { nR-CGI { pLMNIdentity '00F110'H, nRCellIdentity '001234501'H }, tAI { pLMNIdentity '00F110'H, tAC '000001'H } } } } } }
[37] UL NAS transport
Message: UL NAS transport
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x2 (Integrity protected and ciphered) Auth code = 0x9ce43c34 Sequence number = 0x02 Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x67 (UL NAS transport) Payload container type = 1 (N1 SM information) Payload container: Protocol discriminator = 0x2e (5GS Session Management) PDU session identity = 1 Procedure transaction identity = 1 Message type = 0xc1 (PDU session establishment request) Integrity protection maximum data data: Maximum data rate per UE for user-plane integrity protection for uplink = 0xff (Full data rate) Maximum data rate per UE for user-plane integrity protection for downlink = 0xff (Full data rate) PDU session type = 0x1 (IPv4) Always-on PDU session requested = 1 Extended protocol configuration options: Ext = 1 Configuration protocol = 0 Protocol ID = 0x8021 (IPCP) Data = 01 00 00 10 81 06 00 00 00 00 83 06 00 00 00 00 Protocol ID = 0x000a (IP address allocation via NAS signalling) Data = Protocol ID = 0x000c (P-CSCF IPv4 Address Request) Data = Protocol ID = 0x000d (DNS Server IPv4 Address Request) Data = Protocol ID = 0x0011 (MS support of Local address in TFT indicator) Data = PDU session ID = 1 Request type = 0x1 (initial request) S-NSSAI: Length of S-NSSAI contents = 1 (SST) SST = 0x01 DNN = "internet"
[38] Uplink NAS transport
Message: 192.168.100.32:38412 Uplink NAS transport .... initiatingMessage: { procedureCode id-UplinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E029CE43C34027E006701002B2E0101C1FFFF91B17B...'H }, { id id-UserLocationInformation, criticality ignore, value userLocationInformationNR: { nR-CGI { pLMNIdentity '00F110'H, nRCellIdentity '001234501'H }, tAI { pLMNIdentity '00F110'H, tAC '000001'H } } } } } }
[39] Downlink NAS transport
Message: 192.168.100.32:38412 Downlink NAS transport
initiatingMessage: { procedureCode id-DownlinkNASTransport, criticality ignore, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-NAS-PDU, criticality reject, value '7E0208847037027E0054430F10004F00700065006E...'H } } } }
[40] Configuration update command
Message: Configuration update command
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x2 (Integrity protected and ciphered) Auth code = 0x08847037 Sequence number = 0x02 Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x0 (Plain 5GS NAS message, not security protected) Message type = 0x54 (Configuration update command) Full name for network: Length = 15 Data = 10 00 4f 00 70 00 65 00 6e 00 35 00 47 00 53 Local time zone = 0 Universal time and local time zone: Data = 22 40 21 02 03 92 00 Network daylight saving time: Length = 1 Data = 00
[42] PDU session resource setup request
Message: 192.168.100.32:38412 PDU session resource setup request
initiatingMessage: { procedureCode id-PDUSessionResourceSetup, criticality reject, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality reject, value 1 }, { id id-RAN-UE-NGAP-ID, criticality reject, value 1 }, { id id-PDUSessionResourceSetupListSUReq, criticality reject, value { { pDUSessionID 1, pDUSessionNAS-PDU '7E020624D7A0037E006801005A2E0101...'H, s-NSSAI { sST '01'H }, pDUSessionResourceSetupRequestTransfer { protocolIEs { { id id-PDUSessionAggregateMaximumBitRate, criticality reject, value { pDUSessionAggregateMaximumBitRateDL 1073741824, pDUSessionAggregateMaximumBitRateUL 1073741824 } }, { id id-UL-NGU-UP-TNLInformation, criticality reject, value gTPTunnel: { transportLayerAddress 'C0A86420'H, gTP-TEID '00000002'H } }, { id id-PDUSessionType, criticality reject, value ipv4 }, { id id-QosFlowSetupRequestList, criticality reject, value { { qosFlowIdentifier 1, qosFlowLevelQosParameters { qosCharacteristics nonDynamic5QI: { fiveQI 9 }, allocationAndRetentionPriority { priorityLevelARP 8, pre-emptionCapability shall-not-trigger-pre-emption, pre-emptionVulnerability not-pre-emptable } } } } } } } } } }, { id id-UEAggregateMaximumBitRate, criticality ignore, value { uEAggregateMaximumBitRateDL 1073741824, uEAggregateMaximumBitRateUL 1073741824 } } } } }
[43] DL NAS transport
Message: DL NAS transport
Protocol discriminator = 0x7e (5GS Mobility Management) Security header = 0x2 (Integrity protected and ciphered) Auth code = 0x0624d7a0 Sequence number = 0x03 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 = 1 (N1 SM information) Payload container: Protocol discriminator = 0x2e (5GS Session Management) PDU session identity = 1 Procedure transaction identity = 1 Message type = 0xc2 (PDU session establishment accept) Selected PDU session type = 0x1 (IPv4) Selected SSC mode = 0x1 (1) Authorized QoS rules: QoS rule 1: QoS rule identifier = 1 Rule operation code = 1 (create new QoS rule) DQR = 1 (the QoS rule is the default QoS rule) Number of packet filters = 1 Packet filter identifier = 1 Packet filter direction = 3 (bidirectional) Match-all QoS rule precedence = 255 QFI = 1 Session AMBR: Session-AMBR for downlink = 1 Gbps Session-AMBR for uplink = 1 Gbps PDU address: SI6LLA = 0 PDU session type = 1 (IPv4) IPv4 = 10.45.0.3 S-NSSAI: Length of S-NSSAI contents = 1 (SST) SST = 0x01 Authorized QoS flow descriptions: QoS flow description 1: QFI = 1 Operation code = 1 (create new QoS flow description) E = 1 (parameters list is included) Number of parameters = 1 5QI = 9 Extended protocol configuration options: Ext = 1 Configuration protocol = 0 Protocol ID = 0x8021 (IPCP) Data = 02 00 00 10 81 06 08 08 08 08 83 06 08 08 04 04 Protocol ID = 0x000d (DNS Server IPv4 Address) Data = 8.8.8.8 Protocol ID = 0x000d (DNS Server IPv4 Address) Data = 8.8.4.4 DNN = "internet" PDU session ID = 1
[46] PDU session resource setup response
Message: 192.168.100.32:38412 PDU session resource setup response
successfulOutcome: { procedureCode id-PDUSessionResourceSetup, criticality reject, value { protocolIEs { { id id-AMF-UE-NGAP-ID, criticality ignore, value 1 }, { id id-RAN-UE-NGAP-ID, criticality ignore, value 1 }, { id id-PDUSessionResourceSetupListSURes, criticality ignore, value { { pDUSessionID 1, pDUSessionResourceSetupResponseTransfer { dLQosFlowPerTNLInformation { uPTransportLayerInformation gTPTunnel: { transportLayerAddress 'C0A86411'H, gTP-TEID '5D1FC28B'H }, associatedQosFlowList { { qosFlowIdentifier 1 } } } } } } } } } }
|
||||||