free5gc / free5gc

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

[Feat] UPF selection according to connected gNB #226

Closed mariakagi closed 3 years ago

mariakagi commented 3 years ago

Issue Description

What's the version are you using

v3.0.5

Is your feature request related to a problem? Please describe.

SMF selects UPF by DNN and S-NSSAI, without considering the location of gNB.
IF UE connects to gNB in Area1, SMF should select UPF in Area1. image

Describe the solution you'd like

Preparation

  1. Locate AMF, SMF and UPF in each area.
  2. Set same "locality" to amfcfg.yaml and smfcfg.yaml in each area.

    Execution

  3. SMF registers NF Profile with the locality
  4. AMF selects SMF by Nnrf_NFDiscovery_Request including preferred-locality image

Pull Request

Pull Request for the feature.

Describe alternatives/workarounds you've considered

None

Additional context

None

s5uishida commented 3 years ago

Hi @mariakagi

I think it's very useful.

For example, is it possible to select UPF by adding the Cell_ID of gNB to the PFCP parameter instead of locality?

Best regards,

--Shigeru

mariakagi commented 3 years ago

Thank you @s5uishida.

At first, I considered the way to use "targetID" element in the CreateSMContext Request from AMF for SMF to know which gNB the UE connecting to.
For UPF selection in SMF using "targetID", change smfcfg.yaml:

free5gc-org commented 3 years ago

@mariakagi

Thanks for the PR!

s5uishida commented 3 years ago

Hi @mariakagi

I also thought that smfcfg.yaml needed to be modified to support Cell_ID.

At this time, I made a suggestion with reference to the following Open5GS smf.yaml.

https://github.com/open5gs/open5gs/blob/main/configs/open5gs/smf.yaml.in

#  <SMF Selection - 5G Core only>
...
#  o UPF selection by CellID(e_cell_id: 28bit, nr_cell_id: 36bit)
#    (either single enb_id or multiple enb_ids, HEX representation)
...

I think locality is also very useful.

Best regards,

--Shigeru