s5uishida / free5gc_ueransim_ulcl_2_sample_config

free5GC 5GC & UERANSIM UE / RAN Sample Configuration - ULCL with one I-UPF and two PSA-UPFs
3 stars 1 forks source link

Error in free5gc using multiupf #1

Open ishanshahnio opened 1 year ago

ishanshahnio commented 1 year ago

image

ishanshahnio commented 1 year ago

image

hi @s5uishida, could you please help me to achieve this scenario. I configured below VMs to run this scenario.

VM1 -> free5gc control plane VM2 -> I-UPF VM3 -> PSA-UPF1 VM4 -> PSA-UPF2 VM5 -> UERANSIM VM6 -> Application server - 1 VM7 -> Application server - 2

by default traffic should route from I-UPF -> PSA-UPF1.

I configured smf-ulcl.yaml and uerouting.yaml as above. let me know if i missed any in configuration.

UEROUTING configuration : image

SMF configuration : image

image

image

s5uishida commented 1 year ago

Hi @ishanshahnio

I saw your free5GC issue.

I'm not using Npcf_PolicyAuthorization, but if you don't mind, could you share some information about what you sent with the curl command? (in this issue, or the free5GC issue)

ishanshahnio commented 1 year ago

@s5uishida - sure. Even I am not able to ping application server from UERANSIM post done this above configuration. May I know where is the issue ?

I will share npcf curl command soon.

Please note that UERANSIM and application server both are separate server as per above diagram.

s5uishida commented 1 year ago

Hi @ishanshahnio

Is your SMF running correctly pointing to the config file which you created?

In my case, the SMF process is running as below.

./bin/smf -c config/smfcfg.yaml -u config/uerouting.yaml
ishanshahnio commented 1 year ago

Yes, it is working correctly and ran SMF with same command which you mentioned

ishanshahnio commented 1 year ago

Hi @s5uishida, Please find attached document with screenshots. It seems like configuration issue at your end.

My first requirement is to run free5gc with MultiUPF ULCL.

i am preparing document for second requirement and share you soon.

Free5gc_ULCL_document_1.docx

s5uishida commented 1 year ago

Hi @ishanshahnio

Thanks for the documentation. Your settings look fine.

Also, I have noticed something in my environment.

Even though I didn't change the configuration file, when I restarted 5GC (C-Plane), a similar error occurred when connecting from UE. I don't know the conditions to reproduce this error, but for example, if you restart U-Plane (UPF) too, you may be able to connect successfully.

ishanshahnio commented 1 year ago

Hi @s5uishida, that restart error gone but i have doubt on uerouting configuration.

please check my document, your uerouting configuration mentioned in github is not worked.

I changed this uerouting configuration and later it works that i am able to ping both application server.

could you please change your uerouting configuration, and test it in your lab ? later i want to achieve Traffic influence scenario

s5uishida commented 1 year ago

Hi @ishanshahnio

For the configuration below, I think the packets are being routed directly from I-UPF to the dst IP address instead of PSA-UPF1 or PSA-UPF2.

      - dest: 192.168.6.107/32
        path: [I-UPF]
      - dest: 192.168.6.114/32
        path: [I-UPF]

Please check with tcpdump.

ishanshahnio commented 1 year ago

Hi @s5uishida, that i haven't checked. let me check..

then what is the issue in below uerouting configuration. why i am not able to ping Application server from UE device tunnel using below configuration if all seems good ?

image

s5uishida commented 1 year ago

Hi @ishanshahnio

Sorry, I don't know what causes this error.

In this repository I wrote, I verified with tcpdump that packets are routed through the expected paths on PSA-UPF1 and PSA-UPF2 respectively.

Hebert007306 commented 1 year ago

Hi @s5uishida, When I reproduce your case in this article, I encounter the same problem and cannot slove it. image image

The PDU sesseion is created successfully, image

However, when the uerouting file is this, i am not able to ping 8.8.8.8, Docker1 or google.com image image When the uerouting file is this, i encountered new problems of CPF.(Like the ishanshahnio problem) image image

I thought it was a problem of my own configuration before and spent a lot of time to solve it, until today I saw the same problem. I look forward to your reply. Thank you very much.

Free5gc-ulcl-config.zip free5gc-ulcl.demo.docx

ishanshahnio commented 1 year ago

Hi @Hebert007306,

I faced same issue earlier, I am not sure will it work or not in your case but try to download free5gc from branch v3.2.1 instead of main branch for only free5gc c-plane, build it and put your configuration and run.sh as it is and start c-plane 5G functions.

s5uishida commented 1 year ago

Hi @ishanshahnio @Hebert007306

As a point to note, it seems that an error will occur unless a pattern with a large number of UPFs in the path is specified first, as shown below. (I'm not sure what the proper correspondence between free5GC configuration and behavior is, so maybe I'm misunderstanding.)

    specificPath:
      - dest: 172.17.0.0/16
        path: [I-UPF, PSA-UPF1]
      - dest: 172.18.0.0/16
        path: [I-UPF, PSA-UPF2]
      - dest: 8.8.8.8/32
        path: [I-UPF]

In my environment, but not every time, it succeeds. However, a few times I get similar errors even though I haven't changed the config file. I don't know what caused the error in SMF.

If the UE connects normally and the SMF does not error, please tcpdump on each UPF and check whether packets from the UE have arrived. If packets are arriving on UPF, then I think it's a common network problem.

Hebert007306 commented 1 year ago

Hi @ishanshahnio @s5uishida My free5gc version is v3.2.1, And I downloaded and configured it again, but it still doesn't work. Then I tried to complete and reproduce the ulcl demo 1 according to its configuration(https://github.com/s5uishida/free5gc_ueransim_ulcl_sample_config). The CPF seems no problem at this time. image

image

However, I found that I still could not ping 8.8.8.8, docker 172.17.0.2 and Google.com, but I saw the following on upf UE LOG; When PING google.com image

I-UPF image

PSA1: image

UE LOG; When PING 8.8.8.8 image

I-UPF image PSA1: image

UE LOG; When PING 172.17.0.2 image I-UPF image PSA1: image

However, my PSA1 VM can visit Google Web, is it network problem?Looking forward to your reply. Thanks.

s5uishida commented 1 year ago

Hi @Hebert007306

NAPT is not set in I-UPF and PSA-UPF, so ping is not possible?

Hebert007306 commented 1 year ago

Hi @s5uishida Sorry to bother you again, I have set NAPT on I-UPF, PSA1 and PSA2 through the following commands, but the problem has not been solved.

iptables -t nat -A POSTROUTING -s 10.60.0.0/16 ! -o upfgtp -j MASQUERADE

To find the problem easily, the following are my related configurations and pcap files. Thank you very much. image image pcap file.zip Free5gc-ulcl config.zip free5gc-ulcl.detail log.docx

s5uishida commented 1 year ago

Hi @Hebert007306

Please try specificPath in uerouting.yaml in the following order.

    specificPath:
      - dest: 172.17.0.0/16 # the destination IP address on Data Network (DN)
        # the order of UPF nodes in this path. We use the UPF's name to represent each UPF node.
        # The UPF's name should be consistent with smfcfg.yaml
        path: [I-UPF, PSA-UPF1]
      - dest: 172.18.0.0/16
        path: [I-UPF, PSA-UPF2]
      - dest: 8.8.8.8/32
        path: [I-UPF]
Hebert007306 commented 1 year ago

Hi @Hebert007306

Please try specificPath in uerouting.yaml in the following order.

    specificPath:
      - dest: 172.17.0.0/16 # the destination IP address on Data Network (DN)
        # the order of UPF nodes in this path. We use the UPF's name to represent each UPF node.
        # The UPF's name should be consistent with smfcfg.yaml
        path: [I-UPF, PSA-UPF1]
      - dest: 172.18.0.0/16
        path: [I-UPF, PSA-UPF2]
      - dest: 8.8.8.8/32
        path: [I-UPF]

Thanks a lot, my issues has been sloved.