How the simulated UE provided by free5GC can ping google.com

hi
Yes. it shall do snat convert ,so that the ip routeing behind the interface can return back to ue.
br,thornton

Hi @thornton.
I followed your instructions to set it up, but when I ping the Internet from the UE(60.60.0.1), I never get a ping response.

Is there something wrong with my configuration somewhere?
I would greatly appreciate it if you could tell me any mistakes or problems.

Here is a pdf and pcap file that describes my network configuration and the contents of my configuration file.

So many thanks.
koh.pdf (1.0 MB)
koh.pcapng.zip (982.7 KB)

hi.
It looks internal tunnel worked already,and iptables already matched the package.
Did you ping 8.8.8.8 in command line well?
Stop ufw and ip forward reactive again,it will affect the iptablesā€™s working status.

Hi @thornton
Thanks for the confirmation!
I can successfully ping 8.8.8.8 on the command line.
I stop ufw and ip forward reactive again, but I have yet to receive a ping response.

hi
sometime,8.8.8.8 will restrict the response .so you can ping a local host inside your intranet.
it shall be work.
i just do a test to 8.8.8.8,failed. but itā€™s ok to a intranet host.

Hi @thornton
So, canā€™t I use ping to verify that the UE is communicating with the external internet (ex. google.com)?

of course,itā€™s possible. you can use tcpdump on another host to capture the ip package,check whether there is response from the server. Some route/fw might restrict the icmp messages.itā€™s base on the site connectivity .anyway,5gc worked well in your case.

Hi @thornton
I was able to ping 8.8.8.8 from UE by commenting out the following command sudo ip addr add 60.60.0.1 dev lo.
Thank you so much!

Hi , according to this pdf, I canā€™t run test.sh after run.sh;
test.sh reply:
HTTP server setup failed: %+v listen tcp 127.0.0.1:29510: bind: address already in use NRF=init

could you check the bind address .
sudo netstat -tupln |grep 29510 (if the 29510 link to others,you shall check which process bind on).
tcp 0 0 127.0.0.1:29510 0.0.0.0:* LISTEN 19284/./bin/nrf

Hello,

IĀ“m having the same problem of bind address for NFR. I also do not understand how test.sh and run.sh works. I can run the core with run.sh which will initiate all NFs. However with test.sh will initiate some NFs, they will perform their tests and later swich off. My question is how test.sh and run.sh are related and what is the purpose of running, first, run.sh, and later, test.sh. That is what is giving me the error of binding address. Otherwise, test executed alone work for me well.

Hi koh, thronton,

I followed all your instructions in koh.pdf (except command sudo ip addr add 60.60.0.1 dev lo)
Registration is successful.
However PDU session is not created. No User Plane Path is available.

UPF Routes:
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/src/upf_init.c:164 UpfInit() Config: /home/user/4Feb/free5gc/src/upf/build/config/upfcfg.test.yaml UPF=Util
INFO[2021-02-04T19:35:51+05:30] Set log level: info UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/src/up/up_path.c:40 UpRouteInit() APN routes added, main routing table: UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:202 KnetPrintRoutes() DstIp Gateway Iface Priority RtProto Type UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 0.0.0.0 /0 192.168.9.2 enp4s0 100 dhcp unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 10.0.0.0 /8 0.0.0.0 enp4s0 0 kernel unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 60.60.0.0 /24 0.0.0.0 upfgtp0 0 static unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 169.254.0.0 /16 0.0.0.0 enp4s0 1000 boot unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 172.17.0.0 /16 0.0.0.0 docker0 0 kernel unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 192.168.1.0 /24 0.0.0.0 enp4s0 0 kernel unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 192.168.9.0 /24 0.0.0.0 enp4s0 100 kernel unicast UPF=Util
INFO[2021-02-04T19:35:51+05:30] /home/user/free5gc/src/upf/lib/knet/src/route.c:237 KnetPrintRoutes() 192.168.122.0 /24 0.0.0.0 virbr0 0 kernel unicast UPF=Util

Below is the error logs,

INFO[2021-02-04T19:53:18+05:30]/home/user/4Feb/free5gc/src/smf/producer/pdu_session.go:137 free5gc/src/smf/producer.HandlePDUSessionSMContextCreate() SUPI[imsi-2089300007487] has no pre-config route SMF=pdu_session
ERRO[2021-02-04T19:53:18+05:30]/home/user/4Feb/free5gc/src/smf/context/user_plane_information.go:245 free5gc/src/smf/context.(*UserPlaneInformation).GenerateDefaultPath() Canā€™t find UPF with DNN [internet] SMF=Context
ERRO[2021-02-04T19:53:18+05:30]/home/user/4Feb/free5gc/src/smf/context/user_plane_information.go:178 free5gc/src/smf/context.GenerateDataPath() invalid path SMF=Context
TRAC[2021-02-04T19:53:18+05:30]/home/user/4Feb/free5gc/src/smf/context/datapath.go:308 free5gc/src/smf/context.(*DataPath).ActivateTunnelAndPDR() In ActivateTunnelAndPDR SMF=pdu_session
TRAC[2021-02-04T19:53:18+05:30]/home/user/4Feb/free5gc/src/smf/context/datapath.go:309 free5gc/src/smf/context.(*DataPath).ActivateTunnelAndPDR() DataPath Meta Information
Activated: false
IsDefault Path: true
Has Braching Point: false
Destination IP:
Destination Port:
DataPath Routing Information SMF=pdu_session
INFO[2021-02-04T19:53:18+05:30]/home/user/4Feb/free5gc/src/smf/producer/pdu_session.go:522 free5gc/src/smf/producer.SendPFCPRule() Send PFCP Rule SMF=pdu_session

It would be great, if you could tell me any mistakes or problems.
Please help.

Thanks & Regards

Hi,

Solved this issue.
I was using a wrong folder /home/user/4Feb/free5GC
When I changed the folder to /home/user/free5GC, it started working.
Registration and PDU session establishment are successful.

Best Regards
Lakshmi

Dear @thornton,
Thank you so much for the pdf.
I am very new to this world, when i type the first command,
sudo ifconfig enp0s31f6:amf 10.100.200.3 up
I get the following error.
SIOCSIFADDR: No such device
enp0s31f6:amf: ERROR while getting interface flags: No such device
I am assuming I am missing a step of creating enp0s31f6, Am I correct? If so, how can I do that.
@thornton, @koh, @vikash , @lakshmi , please help me with this. if I am completely getting it wrong, Apologies. please let me know what to do.
Thanks so much in advance
Manoj

hi
the enp0s31f6 was laptop specific interface, you can get it by run ā€œifconfigā€ to check the wireless interface. then you replace it with yours.
br,thornton

1 Like

Hi Thronton,
Thank you. I got the setup working