free5gc / free5gc

Open source 5G core network based on 3GPP R15
https://free5gc.org
Apache License 2.0
1.9k stars 623 forks source link

issue [ ue connect to the first smf that register to the nrf in multiple slice (multiple smf config) #410

Closed ayoub-tl closed 1 year ago

ayoub-tl commented 1 year ago

i am trying to do a multiple slices scenario with different upf and smf, the ue can connect to the first slice, but the second ue when trying to connect to the second slice , it end up connecting to the first one , and when I checked the messages it turn out that the nrf is actually responding to the amf in the nssi selection with the smf of the first slice can someone help,

ue config:

IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 or 16 digits) supi: 'imsi-208930000000004'

Mobile Country Code value

mcc: '208'
# Mobile Network Code value (2 or 3 digits)
mnc: '93'

# Permanent subscription key
key: '8baf473f2f8fd09487cccbd7097c6862'
# Operator code (OP or OPC) of the UE
op: '8e27b6af0e692e750f32667a3b14605d'
# This value specifies the OP type and it can be either 'OP' or 'OPC'
opType: 'OPC'
# Authentication Management Field (AMF) value
amf: '8000'
# IMEI number of the device. It is used if no SUPI is provided
imei: '356938035643803'
# IMEISV number of the device. It is used if no SUPI and IMEI is provided
imeiSv: '4370816125816151'

# List of gNB IP addresses for Radio Link Simulation
gnbSearchList:
  - 192.168.2.18

# Initial PDU sessions to be established
sessions:
  - type: 'IPv4'
    apn: 'internet'
    slice:
      sst: 0x01
      sd: 0x010204

# List of requested S-NSSAIs by this UE
slices:
  - sst: 0x01
    sd: 0x010204

# Supported encryption and integrity algorithms by this UE
integrity:
  IA1: true
  IA2: true
  IA3: true
ciphering:
  EA1: true
  EA2: true
  EA3: true

==============================================================

nssf config: info: version: 1.0.0 description: NSSF initial local configuration

configuration:
  nssfName: NSSF
  sbi:
    scheme: http
    registerIPv4: 192.168.2.166 # IP used to register to NRF
    bindingIPv4: 192.168.2.166  # IP used to bind the service
    port: 29531
  serviceNameList:
    - nnssf-nsselection
    - nnssf-nssaiavailability
  nrfUri: http://192.168.2.165:29510
  supportedPlmnList:
    - mcc: 208
      mnc: 93
  supportedNssaiInPlmnList:
    - plmnId:
        mcc: 208
        mnc: 93
      supportedSnssaiList:
        - sst: 1
          sd: 010203
        - sst: 1
          sd: 010204
        - sst: 1
          sd: 3
        - sst: 2
          sd: 1
        - sst: 2
          sd: 2
  nsiList:
    - snssai:
        sst: 1
      nsiInformationList:
        - nrfId: http://192.168.2.165:29510
          nsiId: 10
    - snssai:
        sst: 1
        sd: 010204
      nsiInformationList:
        - nrfId: http://192.168.2.165:29510/nnrf-disc/v1/nf-instances
          nsiId: 11
    - snssai:
        sst: 1
        sd: 2
      nsiInformationList:
        - nrfId: http://localhost:29510/nnrf-nfm/v1/nf-instances
          nsiId: 12
        - nrfId: http://localhost:29510/nnrf-nfm/v1/nf-instances
          nsiId: 12
    - snssai:
        sst: 1
        sd: 3
      nsiInformationList:
        - nrfId: http://localhost:29510/nnrf-nfm/v1/nf-instances
          nsiId: 13
    - snssai:
        sst: 2
      nsiInformationList:
        - nrfId: http://localhost:29510/nnrf-nfm/v1/nf-instances
          nsiId: 20
    - snssai:
        sst: 2
        sd: 1
      nsiInformationList:
        - nrfId: http://localhost:29510/nnrf-nfm/v1/nf-instances
          nsiId: 21
    - snssai:
        sst: 1
        sd: 010203
      nsiInformationList:
        - nrfId: http://192.168.2.165:29510/nnrf-nfm/v1/nf-instances
          nsiId: 22
  amfSetList:
    - amfSetId: 1
      amfList:
        - ffa2e8d7-3275-49c7-8631-6af1df1d9d26
        - 0e8831c3-6286-4689-ab27-1e2161e15cb1
        - a1fba9ba-2e39-4e22-9c74-f749da571d0d
      nrfAmfSet: http://localhost:8081/nnrf-nfm/v1/nf-instances
      supportedNssaiAvailabilityData:
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33456
          supportedSnssaiList:
            - sst: 1
              sd: 1
            - sst: 1
              sd: 2
            - sst: 2
              sd: 1
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33457
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 1
              sd: 2
    - amfSetId: 2
      nrfAmfSet: http://localhost:8084/nnrf-nfm/v1/nf-instances
      supportedNssaiAvailabilityData:
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33456
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 1
              sd: 3
            - sst: 2
              sd: 1
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33458
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 2
  amfList:
    - nfId: 469de254-2fe5-4ca0-8381-af3f500af77c
      supportedNssaiAvailabilityData:
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33456
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 2
            - sst: 2
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33457
          supportedSnssaiList:
            - sst: 1
              sd: 1
            - sst: 1
              sd: 2
    - nfId: fbe604a8-27b2-417e-bd7c-8a7be2691f8d
      supportedNssaiAvailabilityData:
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33458
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 1
              sd: 3
            - sst: 2
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33459
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 2
            - sst: 2
              sd: 1
    - nfId: b9e6e2cb-5ce8-4cb6-9173-a266dd9a2f0c
      supportedNssaiAvailabilityData:
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33456
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 1
              sd: 2
            - sst: 2
        - tai:
            plmnId:
              mcc: 466
              mnc: 92
            tac: 33458
          supportedSnssaiList:
            - sst: 1
            - sst: 1
              sd: 1
            - sst: 2
            - sst: 2
              sd: 1
  taList:
    - tai:
        plmnId:
          mcc: 466
          mnc: 92
        tac: 33456
      accessType: 3GPP_ACCESS
      supportedSnssaiList:
        - sst: 1
        - sst: 1
          sd: 1
        - sst: 1
          sd: 2
        - sst: 2
    - tai:
        plmnId:
          mcc: 466
          mnc: 92
        tac: 33457
      accessType: 3GPP_ACCESS
      supportedSnssaiList:
        - sst: 1
        - sst: 1
          sd: 1
        - sst: 1
          sd: 2
        - sst: 2
    - tai:
        plmnId:
          mcc: 466
          mnc: 92
        tac: 33458
      accessType: 3GPP_ACCESS
      supportedSnssaiList:
        - sst: 1
        - sst: 1
          sd: 1
        - sst: 1
          sd: 3
        - sst: 2
      restrictedSnssaiList:
        - homePlmnId:
            mcc: 310
            mnc: 560
          sNssaiList:
            - sst: 1
              sd: 3
    - tai:
        plmnId:
          mcc: 466
          mnc: 92
        tac: 33459
      accessType: 3GPP_ACCESS
      supportedSnssaiList:
        - sst: 1
        - sst: 1
          sd: 1
        - sst: 2
        - sst: 2
          sd: 1
      restrictedSnssaiList:
        - homePlmnId:
            mcc: 310
            mnc: 560
          sNssaiList:
            - sst: 2
              sd: 1
  mappingListFromPlmn:
    - operatorName: NTT Docomo
      homePlmnId:
        mcc: 440
        mnc: 10
      mappingOfSnssai:
        - servingSnssai:
            sst: 1
            sd: 1
          homeSnssai:
            sst: 1
            sd: 1
        - servingSnssai:
            sst: 1
            sd: 2
          homeSnssai:
            sst: 1
            sd: 3
        - servingSnssai:
            sst: 1
            sd: 3
          homeSnssai:
            sst: 1
            sd: 4
        - servingSnssai:
            sst: 2
            sd: 1
          homeSnssai:
            sst: 2
            sd: 2
    - operatorName: AT&T Mobility
      homePlmnId:
        mcc: 310
        mnc: 560
      mappingOfSnssai:
        - servingSnssai:
            sst: 1
            sd: 1
          homeSnssai:
            sst: 1
            sd: 2
        - servingSnssai:
            sst: 1
            sd: 2
          homeSnssai:
            sst: 1
            sd: 3

============================================================ first smf:

info: version: 1.0.0 description: initial local configuration

configuration:

 smfName: SMF

sbi: scheme: http registerIPv4: 192.168.2.163 # IP used to register to NRF bindingIPv4: 192.168.2.163 # IP used to bind the service port: 29502 tls: key: free5gc/support/TLS/smf.key pem: free5gc/support/TLS/smf.pem serviceNameList:

configuration:

 smfName: SMF

sbi: scheme: http registerIPv4: 192.168.2.183 # IP used to register to NRF bindingIPv4: 192.168.2.183 # IP used to bind the service port: 29502 tls: key: free5gc/support/TLS/smf.key pem: free5gc/support/TLS/smf.pem serviceNameList:

iamelisahi commented 1 year ago

Hi, there may be some errors in your SMFs config. Two SMFs should not be set up with the same registerIPv4. You may find the following YouTube video helpful: https://youtu.be/AEMrjKRWarw?t=665. It starts at 11:04 and provides useful information related to your issue. Additionally, you can consider updating to the latest version of free5gc, which is v3.3.0. This update may also assist you in resolving the problem.