How to register and generate traffic with an UE


I’ve installed 5GC properly and the tests work just fine. Now I have to start working on my master thesis, for which, essentially, I have to register one (or more) UE in the core and then generate traffic to Internet of different kinds, like pings or even video packages.

I’ve been looking through all the forum and searching in some other places and I can’t seem to find the information on how to do it. I would appreciate if you could answer the next questions because I feel like I’m completely stuck:

-Do I need an emulator for the UE so I can generate the traffic? If so, which one do you recommend?

-Is it mandatory to have a RAN simulator or is there any way around it to connect the UE directly to the core (RAN is not an area of interest in my thesis)?

In the RegistrationTest code I’ve seen some lines referring to the registration of an UE and making a ping from there, so I was wondering if in order to achieve my goal I’ll have to make a .go script that initializes the UE and then generates the traffic. So far I don’t see any other ways of doing this, but I would really appreciate some insight.

Regards and thank you in advance

The following repo may be referenced.

I’ve tried with gnbsim but it doesn’t have the capability of accessing Internet the way I want to.
I was wondering if you could recommend me a specific simulator in which I can do something similar as what you show in the video in which you make pings and show how shutting down the core makes the pings fail.
I’ve also tried changing the ip address pinged in registration test to but there’s no response for the ping

The simulator in our video is now used for internal test and demo. We have no plan to release it yet.

You should check if your RAN can connect to CN, then if the UE can get into RAN. After that, check if the UE can connect into the CN. Finally, you can check if the UE can connect to the Internet. In the last step, there is a common mis-configure for NAT setting. So you can check for it as well.

Would you mind giving some more information about the mis-configure NAT setting?

There is some experience on the forum and some offline problem we have met.

Maybe you can provide the pcap file on your free5GC and we can check it.

This is my result after running TestRegistration. The network configuration I followed are the steps that you can see in koh’s pdf (from the post of pinging google). I also attach koh’s pdf just in case.
I’ve been doing some tests and Wireshark only captures traffic in the interface “loopback”, and not in the interfaces I’ve created for each NF.
In this case the ping is directed to my NAT (, Virtual Machine), and it’s the same result as if I try to ping google. However, I get exactly the same result if I try pinging, which is the UPF address. It’s weird though because, as you can see in the pcap filtering by ICMP packets, is actually involved in the process since it answers with a ICMP packet to the address of gNB saying that the destination is unreachable.
Captura Test Registration (1).pcapng (3.6 MB) koh.pdf (1.0 MB)


The pcap file has no pfcp message and when it comes to gtp’s message, return destination unreachable. Can you ping from

BTW, you can use any interface as the interface to capture all packet on host for wireshark or tcpdump.