Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get error when UE starts up #3

Open
sing1020 opened this issue Oct 31, 2022 · 15 comments
Open

Get error when UE starts up #3

sing1020 opened this issue Oct 31, 2022 · 15 comments

Comments

@sing1020
Copy link

Hi, @s5uishida
I tried to create the One SMF, Multiple UPFs and DNNs of your Sample Configurations and followed the steps.
When I tried to run the free5GC U-Plan1, I got the error.
image

Have you ever had the same problem?
Any suggestions or helps are appreciated:)

Linux version: ubuntu-20.04.5-live-server-amd64
free5GC version: v3.2.1

Thanks.

Best Regards
Hsin

@s5uishida
Copy link
Owner

Hi @sing1020

In my environment, it works as follows.

root@free5gc12:~/free5gc# bin/upf 
2022-10-31T13:01:33+09:00 [INFO][UPF][Main] UPF version:  
        free5GC version: v3.2.1-13-ge104d46
        build time:      2022-10-17T01:23:52Z
        commit hash:     e05c3433
        commit time:     2022-09-02T01:58:48Z
        go version:      go1.14.4 linux/amd64
2022-10-31T13:01:33+09:00 [INFO][UPF][Cfg] Read config from [./config/upfcfg.yaml]
2022-10-31T13:01:33+09:00 [INFO][UPF][Cfg] ==================================================
2022-10-31T13:01:33+09:00 [INFO][UPF][Cfg] (*factory.Config)(0xc000342780)({
        Version: (string) (len=5) "1.0.3",
        Description: (string) (len=31) "UPF initial local configuration",
        Pfcp: (*factory.Pfcp)(0xc000354fc0)({
                Addr: (string) (len=14) "192.168.66.142",
                NodeID: (string) (len=14) "192.168.66.142",
                RetransTimeout: (time.Duration) 1s,
                MaxRetrans: (uint8) 3
        }),
        Gtpu: (*factory.Gtpu)(0xc000355170)({
                Forwarder: (string) (len=5) "gtp5g",
                IfList: ([]factory.IfInfo) (len=1 cap=1) {
                        (factory.IfInfo) {
                                Addr: (string) (len=14) "192.168.66.142",
                                Type: (string) (len=2) "N3",
                                Name: (string) "",
                                IfName: (string) "",
                                MTU: (uint32) 0
                        }
                }
        }),
        DnnList: ([]factory.DnnList) (len=2 cap=2) {
                (factory.DnnList) {
                        Dnn: (string) (len=8) "internet",
                        Cidr: (string) (len=12) "10.60.0.0/16",
                        NatIfName: (string) ""
                },
                (factory.DnnList) {
                        Dnn: (string) (len=9) "internet2",
                        Cidr: (string) (len=12) "10.61.0.0/16",
                        NatIfName: (string) ""
                }
        },
        Logger: (*factory.Logger)(0xc0002dfac0)({
                Enable: (bool) true,
                Level: (string) (len=4) "info",
                ReportCaller: (bool) false
        })
})
2022-10-31T13:01:33+09:00 [INFO][UPF][Cfg] ==================================================
2022-10-31T13:01:33+09:00 [INFO][UPF][Main] Log level is set to [info] level
2022-10-31T13:01:33+09:00 [INFO][UPF][Main] starting Gtpu Forwarder [gtp5g]
2022-10-31T13:01:33+09:00 [INFO][UPF][Main] GTP Address: "192.168.66.142:2152"
2022-10-31T13:01:33+09:00 [INFO][UPF][Buff] buff server started
2022-10-31T13:01:33+09:00 [INFO][UPF][Pfcp][192.168.66.142:8805] starting pfcp server
2022-10-31T13:01:33+09:00 [INFO][UPF][Pfcp][192.168.66.142:8805] pfcp server started
2022-10-31T13:01:33+09:00 [INFO][UPF][Main] UPF started

@sing1020
Copy link
Author

sing1020 commented Oct 31, 2022

Hi, @s5uishida

Sorry I gave the worng information that my free5GC version is v3.2.0,
and I found that our go version is different.
Is it possible that error is cased by the versions not support or other reasion?
Thanks.

image

@s5uishida
Copy link
Owner

Hi @sing1020

I was able to get the latest versions of free5GC and gtp5g installed and working by following the steps below.

https://github.com/free5gc/free5gc/wiki/Installation

For earlier versions, I think it probably works, but I'm not sure.

@sing1020
Copy link
Author

Hi @s5uishida

OK, I'll try it.
If it works due to the different versions, I would let you know:)

Thanks.

@sing1020
Copy link
Author

Hi @s5uishida

It works in my environment.
image

And I found the reason for the error is that I stupidly gave the wrong IP address of the DNN...
I'm going to create rest of it, thanks.

@s5uishida
Copy link
Owner

Hi @sing1020

I don't understand why you set the CIDR as that way for DNN=internet and internet2.

For your reference, my upfcfg.yaml is as follows.

~/free5gc/config/upfcfg.yaml

version: 1.0.3
description: UPF initial local configuration

# The listen IP and nodeID of the N4 interface on this UPF (Can't set to 0.0.0.0)
pfcp:
  addr: 192.168.66.142   # IP addr for listening
  nodeID: 192.168.66.142 # External IP or FQDN can be reached
  retransTimeout: 1s # retransmission timeout
  maxRetrans: 3 # the max number of retransmission

gtpu:
  forwarder: gtp5g
  # The IP list of the N3/N9 interfaces on this UPF
  # If there are multiple connection, set addr to 0.0.0.0 or list all the addresses
  ifList:
    - addr: 192.168.66.142
      type: N3
      # name: upf.5gc.nctu.me
      # ifname: gtpif

# The DNN list supported by UPF
dnnList:
  - dnn: internet # Data Network Name
    cidr: 10.60.0.0/16 # Classless Inter-Domain Routing for assigned IPv4 pool of UE
    # natifname: eth0
  - dnn: internet2
    cidr: 10.61.0.0/16

logger: # log output setting
  enable: true # true or false
  level: info # how detailed to output, value: trace, debug, info, warn, error, fatal, panic
  reportCaller: false # enable the caller report or not, value: true or false

@sing1020
Copy link
Author

sing1020 commented Oct 31, 2022

Hi @s5uishida

I set the NIC as NAT in VM so that the CIDR can access to internet(DN).
image
image
image

If I set NIC as other options, it can't access to internet(DN).

If it's not correct, what should I do...?
Now I got the same error in U-Plane2...
image

Thanks

@s5uishida
Copy link
Owner

Hi @sing1020

I use bridged mode for my VM's networking, but you can also select NAT networking.
(In a way that works for you.)

However, the DN's network must be a different network than the VM's private network.

As for the network, I think you may configure it according to each environment.

@sing1020
Copy link
Author

Hi @s5uishida

Ok, I'll try it.
Thanks for your advice~:)

@sing1020 sing1020 changed the title error of U-Plane1 Get error when UE starts up Nov 2, 2022
@sing1020
Copy link
Author

sing1020 commented Nov 2, 2022

Hi @s5uishida

Sorry to bother you again...
I changed to use bridged mode for VM's networking, and the UPF1, UPF2, gNB were working well.
But I got errors when start up C-Plane, it seem to affect subsequent UE startup errors.

C-Plane's error when start up
image

gNB start up and the reaction of C-Plane
gNB:
image
C-Plane:
image

UE start up and the reaction of C-Plane
UE:
image
C-Plane:
image

I had check the smfcfg.yaml that seem correct and I set the network setting of U-Plan1 and U-Plane2 before startup.
Do you think this error is caused by my smfcfg.yaml file is not set properly or there are other reasons?
Below link is my smfcfg.yaml file.
Any suggestions or helps are appreciated:)
Thanks.

smfcfg.yaml

@s5uishida
Copy link
Owner

Hi @sing1020

As shown in the error log on the first screen, the following lines in smfcfg.yaml contain tabs.

	- dnn: ims
	  dns:
	    ipv4: 8.8.8.8

@sing1020
Copy link
Author

sing1020 commented Nov 2, 2022

Hi @s5uishida

OK... I'll fix it and keep creating.
Thanks. :)

@sing1020
Copy link
Author

sing1020 commented Nov 3, 2022

Hi @s5uishida

I did creat uesimtun0~2 as below with bridge mode.
image
uesimtun0 -> internet
uesimtun1 -> internet2
uesimtun2 -> ims

But the uesimtun0~2 can't ping to goole.com due to my bridge mode can't access to internet...
When I changed it to NAT mode which can access to internet, the C-Plane would show "[FATA][SMF][Init] overlap cidr value between UPFs", then UE failed to connect.

I still don't understand how to make the IP addresses(or CIDR) correct that can access to internet and make uesimtun ping to google.com...

Could you show the network setting of /etc/netplan/00-installer-config.yaml or give informations that can help me to figure it out?

Thanks.

@xiongruoting
Copy link

Have you registered UEs in core network in webconsole? also, set the "Data Network Name" as "ims"?

@xiongruoting
Copy link

I have problem... connecting to goole.com as well....
All the things set up well, core network, two UPFs, gNB and UEs.
Besides, in two UPFs VM, set iptables.
However, when I type "ping -I ueransim0 google.com" , it does not work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants