aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
758 stars 316 forks source link

An error occurred in initial-registration to Open5GS #87

Closed s5uishida closed 4 years ago

s5uishida commented 4 years ago

I tried connecting UERANSIM(dev branch) to Open5GS.

initial-registration succeeded, but it continued, resulting in an error.

[2020-08-12 04:32:43.687]     [SUCCESS] [PROCEDURE_RESULT] Registration is successful
[2020-08-12 04:32:43.688]   [FUNC_OUT] 
[2020-08-12 04:32:43.688] [FUNC_OUT] 
[2020-08-12 04:32:43.695] [INFO] [EVENT] GnbEvent is handling: GnbUplinkNasEvent{ue=984f7306-c8e5-4afe-bb55-dfbb5cb69f39, nasPdu=7e02ce809290017e0043}
[2020-08-12 04:32:43.695] [FUNC_IN] Handling Uplink NAS Transport
...
...
[2020-08-12 04:32:43.881]   [DEBUG] [MESSAGING] Plain NAS PDU: 7e0054430f10004f00700065006e0035004700534702802140233400490100
[2020-08-12 04:32:43.881]   [ERROR] [MESSAGING] Unhandled message received: ConfigurationUpdateCommand

Could you know what is happened?

For reference, the changed configuration file and log are attached. 20200812-2.zip

20200812-2/
  |
  |--- open5gs/install/etc/open5gs
  |     |--- amf.yaml
  |     |--- amf.yaml.orig
  |
  |--- UERANSIM-dev/
  |     |--- app.log
  |     |--- config/
  |           |--- root.yaml
  |           |--- open5gs/
  |                 |--- general.yaml
  |                 |--- gnb.yaml
  |                 |--- mockedAmf.yaml
  |                 |--- ue.yaml
  |
  |--- open5gs.pcap

The difference of configs between free5gc and open5gs for UERANSIM is as follows.

diff -ur free5gc/gnb.yaml open5gs/gnb.yaml
--- free5gc/gnb.yaml    2020-08-12 03:14:47.021911796 +0000
+++ open5gs/gnb.yaml    2020-08-12 03:43:44.958034898 +0000
@@ -1,20 +1,20 @@
 gnbId: 1

 gnbPlmn:
-  mcc: 208
-  mnc: 93
+  mcc: 901
+  mnc: 70

 amfConfigs:
   - guami:
-      mcc: 208
-      mnc: 93
+      mcc: 901
+      mnc: 70
       amfRegionId:
         hex: '2a'
       amfSetId:
         hex: '5580'
       amfPointer:
         hex: 'a8'
-    host: 127.0.0.1
+    host: 127.0.0.2
     port: 38412
     isMocked: false
     mockingFile: mockedAmf.yaml
@@ -24,11 +24,11 @@
       hex: '000001'
     broadcastPlmns:
       - plmn:
-          mcc: 208
-          mnc: 93
+          mcc: 901
+          mnc: 70
         taiSliceSupportNssais:
           - sst:
               value: 1
             sd:
               value:
-                hex: '010203'
\ No newline at end of file
+                hex: '010203'
diff -ur free5gc/ue.yaml open5gs/ue.yaml
--- free5gc/ue.yaml     2020-08-12 03:14:47.021911796 +0000
+++ open5gs/ue.yaml     2020-08-12 03:26:15.921046675 +0000
@@ -1,9 +1,9 @@
-snn: '5G:mnc093.mcc208.3gppnetwork.org'
-key: '8baf473f2f8fd09487cccbd7097c6862'
-op: '8e27b6af0e692e750f32667a3b14605d'
+snn: '5G:mnc070.mcc901.3gppnetwork.org'
+key: '465B5CE8B199B49FAA5F0A2EE238A6BC'
+op: 'E8ED289DEBA952E4283B54E88E6183CA'
 amf: '8000'
-imei: '356938035643809'
-supi: 'imsi-208930000000003'
+imei: '356938035643803'
+supi: 'imsi-901700000000003'

 smsOverNasSupported: true
 dnn: 'internet'
@@ -17,13 +17,13 @@
 userLocationInformationNr:
   nrCgi:
     plmn:
-      mcc: 208
-      mnc: 93
+      mcc: 901
+      mnc: 70
     nrCellIdentity:
       hex: '01b2c3d4e0'
   tai:
-    mcc: 208
-    mnc: 93
+    mcc: 901
+    mnc: 70
     tac: '000001'
   timeStamp:
     hex: 5b5fa680

I used the default values of Open5GS WebUI for UE information. For IMSI that does not have a default value, I have set the following.

IMSI: 901700000000003

Also, the Stream ID of sctp was as follows.

$ tcpdump -r open5gs.pcap |grep sctp |grep SID
reading from file open5gs.pcap, link-type LINUX_SLL (Linux cooked)
04:32:37.783823 IP localhost.49000 > free5gc06.38412: sctp (1) [DATA] (B)(E) [TSN: 2145321369] [SID: 0] [SSEQ 0] [PPID 0x3c] 
04:32:37.783935 IP free5gc06.38412 > localhost.49000: sctp (1) [DATA] (B)(E) [TSN: 2080391333] [SID: 0] [SSEQ 0] [PPID 0x3c] 
04:32:43.351923 IP localhost.49000 > free5gc06.38412: sctp (1) [DATA] (B)(E) [TSN: 2145321370] [SID: 1] [SSEQ 0] [PPID 0x3c] 
04:32:43.353177 IP free5gc06.38412 > localhost.49000: sctp (1) [SACK] [cum ack 2145321370] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2080391334] [SID: 1] [SSEQ 0] [PPID 0x3c] 
04:32:43.523744 IP localhost.49000 > free5gc06.38412: sctp (1) [SACK] [cum ack 2080391334] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2145321371] [SID: 1] [SSEQ 1] [PPID 0x3c] 
04:32:43.525315 IP free5gc06.38412 > localhost.49000: sctp (1) [SACK] [cum ack 2145321371] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2080391335] [SID: 1] [SSEQ 1] [PPID 0x3c] 
04:32:43.594350 IP localhost.49000 > free5gc06.38412: sctp (1) [SACK] [cum ack 2080391335] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2145321372] [SID: 1] [SSEQ 2] [PPID 0x3c] 
04:32:43.599613 IP free5gc06.38412 > localhost.49000: sctp (1) [SACK] [cum ack 2145321372] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2080391336] [SID: 1] [SSEQ 2] [PPID 0x3c] 
04:32:43.644965 IP localhost.49000 > free5gc06.38412: sctp (1) [SACK] [cum ack 2080391336] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2145321373] [SID: 1] [SSEQ 3] [PPID 0x3c] 
04:32:43.839250 IP localhost.49000 > free5gc06.38412: sctp (1) [DATA] (B)(E) [TSN: 2145321374] [SID: 1] [SSEQ 4] [PPID 0x3c] 
04:32:43.840703 IP free5gc06.38412 > localhost.49000: sctp (1) [SACK] [cum ack 2145321374] [a_rwnd 106496] [#gap acks 0] [#dup tsns 0] , (2) [DATA] (B)(E) [TSN: 2080391337] [SID: 1] [SSEQ 3] [PPID 0x3c]
aligungr commented 4 years ago

@s5uishida thanks for reporting. This error can be silently ignored, we did not implemented ConfigurationUpdateCommand yet. I am planning to implement this today.

aligungr commented 4 years ago

Meanwhile I pushed Open5GS config files that you sent, thanks.

aligungr commented 4 years ago

ConfigurationUpdateCommand is done. Related error should be gone now.

s5uishida commented 4 years ago

I verified it! OK.

Thank you very much!!

app.log.zip open5gs.pcap.zip

s5uishida commented 4 years ago

Executing the commands in the following order, when ignoreStreamIds=false/true, a different error was output with the pdu-session-establishment command.

initial-registration --> pdu-session-establishment

aligungr commented 4 years ago

Actually there are two different errors.

I think there is a bug about SCTP stream ids in Open5GS side as well. It sends ErrorIndication with "0" value unlike other packets. I am going to investigate this and open an issue for Open5GS if necessary.

The other one is related to PDU Session Establishment and it can be considered as expected behaviour, because we did not finished implementing PDU Session Establishment yet, it's in progress now.

s5uishida commented 4 years ago

OK.

Open5GS is also in development :-)