Borjis131 / docker-open5gs

Open5GS 5G Core Docker images and Docker compose deployments
GNU Affero General Public License v3.0
30 stars 15 forks source link

Unable to properly register the User in database for UERANSIM and Packetrusher to work. #14

Closed sandhyabagadi closed 2 weeks ago

sandhyabagadi commented 2 weeks ago

Dear @Borjis131,

I am trying to use your compose files for open5GS with UERANSIM and Packetrusher deployment.

Everything seems to work well, except the part when i try to add the user data to the database, the UE shows error.

CONTAINER ID   IMAGE                          COMMAND                  CREATED         STATUS         PORTS                      NAMES
c8ea7ba27184   ghcr.io/borjis131/ue:v3.2.6    "/UERANSIM/nr-ue -c …"   8 minutes ago   Up 7 minutes                              ue3
36ca18d418ed   ghcr.io/borjis131/ue:v3.2.6    "/UERANSIM/nr-ue -c …"   8 minutes ago   Up 8 minutes                              ue
68361d24ad30   ghcr.io/borjis131/gnb:v3.2.6   "/UERANSIM/nr-gnb -c…"   8 minutes ago   Up 8 minutes                              gnb
de1d774c3501   amf:v2.7.2                     "entrypoint.sh -c /e…"   8 minutes ago   Up 8 minutes                              amf
f4ca56124d2f   smf:v2.7.2                     "open5gs-smfd -c /et…"   8 minutes ago   Up 8 minutes                              smf
40ad5266769d   pcf:v2.7.2                     "open5gs-pcfd -c /et…"   8 minutes ago   Up 8 minutes                              pcf
9db63520e0e5   ausf:v2.7.2                    "open5gs-ausfd -c /e…"   8 minutes ago   Up 8 minutes                              ausf
bfa7ba28e595   nssf:v2.7.2                    "open5gs-nssfd -c /e…"   8 minutes ago   Up 8 minutes                              nssf
4d7023c8dab9   udr:v2.7.2                     "open5gs-udrd -c /et…"   8 minutes ago   Up 8 minutes                              udr
941d0ab4eff2   bsf:v2.7.2                     "open5gs-bsfd -c /et…"   8 minutes ago   Up 8 minutes                              bsf
7fead1237ff6   udm:v2.7.2                     "open5gs-udmd -c /et…"   8 minutes ago   Up 8 minutes                              udm
dbc30dfee5d7   upf:v2.7.2                     "entrypoint.sh -c /e…"   8 minutes ago   Up 8 minutes                              upf
dfb3eedca27f   nrf:v2.7.2                     "open5gs-nrfd -c /et…"   8 minutes ago   Up 8 minutes                              nrf
1647937d1527   mongo:6.0                      "docker-entrypoint.s…"   8 minutes ago   Up 8 minutes   0.0.0.0:27017->27017/tcp   db

UEś Error

i2024-10-20 20:44:27.487| inas| idebug| Selected integrityi2| cipheringi0|
i2024-10-20 20:44:27.488| irrc| idebug| RRC Release received
i2024-10-20 20:44:27.488| inas| ierror| Initial Registration failed i?|
i2024-10-20 20:44:27.488| inas| idebug| Handling Registration Reject abnormal case
i2024-10-20 20:44:27.488| inas| iinfo| UE switches to state iMM-DEREGISTERED/ATTEMPTING-REGISTRATION|
i2024-10-20 20:44:27.488| inas| iinfo| UE switches to state iCM-IDLE|
i2024-10-20 20:44:38.488| inas| idebug| NAS timeri3511| expired i1|
i2024-10-20 20:44:38.488| inas| idebug| Initial registration required due to iT3511-EXPIRY-IN-ATT-REG|
i2024-10-20 20:44:38.488| inas| idebug| UAC access attempt is allowed for identityi0|, categoryiMO_sig|
i2024-10-20 20:44:38.488| inas| idebug| Sending Initial Registration
i2024-10-20 20:44:38.488| inas| idebug| Deleting NAS security context
i2024-10-20 20:44:38.488| inas| iinfo| UE switches to state iMM-REGISTER-INITIATED|
i2024-10-20 20:44:38.488| irrc| idebug| Sending RRC Setup Request
i2024-10-20 20:44:38.488| irrc| iinfo| RRC connection established
i2024-10-20 20:44:38.488| irrc| iinfo| UE switches to state iRRC-CONNECTED|
i2024-10-20 20:44:38.488| inas| iinfo| UE switches to state iCM-CONNECTED|
i2024-10-20 20:44:38.492| inas| idebug| Authentication Request received
i2024-10-20 20:44:38.496| inas| idebug| Security Mode Command received
i2024-10-20 20:44:38.496| inas| idebug| Selected integrityi2| cipheringi0|
i2024-10-20 20:44:38.496| irrc| idebug| RRC Release received
i2024-10-20 20:44:38.496| inas| ierror| Initial Registration failed i?|
i2024-10-20 20:44:38.496| inas| idebug| Handling Registration Reject abnormal case
i2024-10-20 20:44:38.497| inas| iinfo| UE switches to state i5U2-NOT-UPDATED|
i2024-10-20 20:44:38.497| inas| iinfo| UE switches to state iMM-DEREGISTERED/ATTEMPTING-REGISTRATION|
i2024-10-20 20:44:38.497| inas| iinfo| UE switches to state iCM-IDLE|
  [
  {
    _id: ObjectId('67156b67f8f8a1b2acfe6911'),
    schema_version: 1,
    imsi: '001011234567893',
    msisdn: [],
    imeisv: [],
    mme_host: [],
    mm_realm: [],
    purge_flag: [],
    slice: [
      {
        sst: 1,
        default_indicator: true,
        session: [
          {
            name: 'internet',
            type: 3,
            qos: {
              index: 9,
              arp: {
                priority_level: 8,
                pre_emption_capability: 1,
                pre_emption_vulnerability: 2
              }
            },
            ambr: {
              downlink: { value: 1000000000, unit: 0 },
              uplink: { value: 1000000000, unit: 0 }
            },
            pcc_rule: [],
            _id: ObjectId('67156b67f8f8a1b2acfe6912')
          }
        ],
        _id: ObjectId('67156b67f8f8a1b2acfe6913')
      }
    ],
    security: {
      k: '00000000000000000000000000000000',
      op: null,
      opc: '00000000000000000000000000000000',
      amf: '8000',
      sqn: Long('225')
    },
    ambr: {
      downlink: { value: 1000000000, unit: 0 },
      uplink: { value: 1000000000, unit: 0 }
    },
    access_restriction_data: 32,
    network_access_mode: 0,
    subscriber_status: 0,
    operator_determined_barring: 0,
    subscribed_rau_tau_timer: 12,
    __v: 0
  }
]
mongosh --version
2.3.2

This is the same even after i restart, also i did use the latest version of the open5gs-dbctl as mentioned by you in the issue number 8 reported similar issue

Please let me know if i need to test something or you need any further outputs from me to resolve!

Thankyou for your help in advance

Sandhya Bagadi

Borjis131 commented 2 weeks ago

Hi @sandhyabagadi, it would be useful if you post the UERANSIM gNB and Open5GS AMF logs too.

The only thing that I see is that seems that the registered UE does not have the sd value for the network slicing parameters.

Also the UE logs shown are telling you that the connectivity release is caused by the expiration of the T3511 timer.

sandhyabagadi commented 2 weeks ago

Hello Brojis,

Thankyou for your response !

I tried it with webUI and mentioned the ST and SD values correctly, which made it work.

I still think adding with open5gs-dbctl will not add everything, it will just add the default values set by the script. I can give the logs if you are interested. I am okay if it is working through webui as well :)

Thankyou!!!

Borjis131 commented 2 weeks ago

@sandhyabagadi if you were using open5gs-dbctl keep in mind that there is a couple of ways to add a user to the database.

Some of the options are:

add {imsi key opc}: adds a user to the database with default values
add {imsi ip key opc}: adds a user to the database with default values and a IPv4 address for the UE
static_ip {imsi ip4}: adds a static IP assignment to an already-existing user
add_ue_with_apn {imsi key opc apn}: adds a user to the database with a specific apn
add_ue_with_slice {imsi key opc apn sst sd}: adds a user to the database with a specific apn, sst and sd

You probably used the option add {imsi key opc} and that is why the slice values were left out. Use add_ue_with_slice {imsi key opc apn sst sd instead.

If you have already registered a UE with add {imsi key opc} you can use update_slice {imsi apn sst sd}: adds an slice to an existent UE to modify the slice values of an existing user.

I will close the issue of everything works fine, thanks for using the project!