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

My ngapIpList is blow:
info:
version: 1.0.0
description: AMF initial local configuration

configuration:
amfName: free5GC-AMF
ngapIpList:
- 127.0.0.1
sbi:
scheme: http
ipv4Addr: 127.0.0.1
port: 29518
serviceNameList:
- namf-comm
- namf-evts
- namf-mt
- namf-loc
- namf-oam
servedGuamiList:
- plmnId:
mcc: 208
mnc: 93
amfId: cafe00
supportTaiList:
- plmnId:
mcc: 208
mnc: 93
tac: 1
plmnSupportList:
- plmnId:
mcc: 208
mnc: 93
snssaiList:
- sst: 1
sd: 010203
- sst: 1
sd: 112233
supportDnnList:
- internet
nrfUri: http://localhost:29510
security:
integrityOrder:
- NIA2
- NIA0
cipheringOrder:
- NEA2
- NEA0
networkName:
full: free5GC
short: free
t3502: 720
t3512: 3600
non3gppDeregistrationTimer: 3240

Can you please test again by replacing the command git.cs.nctu.edu.tw/calee/sctp to github.com/ishidawataru/sctp and check whether the issue will be resolve.

What is the error message?

if the error is similar to the one above, you can try it again by replacing this command git.cs.nctu.edu.tw/calee/sctp to github.com/ishidawataru/sctp.

I tried to replace sctp as per your instruction but still problem not got resolved.

hi,
if you are familiar with the oneinall OAI project,you can setup a local site connectivity like that.then use run.sh(do a little change),and change the connectivity data in test.sh. and modify the registration_test.go .
and add the snat use iptables. i have made it work. In real world,the 5gc shall run separate,and connect with gnb.
5gcPingbyGtp.pcap (4.6 KB)
br,thornton.

Try this solution

1 Like

Dear thornton,

Are you using RFSIMULATOR provided by OAI to set up the communication with free5GC?

hi.
i use the test script(but i didn’t use the netns),you can change the destination of ping in the registration_test.go. and the most important is the iptables(you can do it by snat, your UE ip to your Gi interface).
br,thornton.

Hi bro,
I check this topic and only find the .pcap file attached. Would you pls upload the pdf instruction again? I think what you’ve done can be a great help for newbie like me. I am quite struggle in the setup procedure. So many thanks.

hi.
here it is.
br,thornton
5g sa topo (2).pdf (92.8 KB)

Hi bro,
Thanks so much!!!

Dear @thornton
Thanks for the PDF instruction!

I don’t know what gi addres in instruction means.
Is the gi address some kind of IP address assigned to the UPF by free5GC?
How can I find the gi address?

hi
it’s the interface to connect to internet.
br,thornton.

Hi @thornton.
In other words, is the gi address the IP address associated with wlp2s0, which is set to natifname in instruction?

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)?