My first 5G Core: Open5Gs and UERANSIM

Note: As this space develops so quickly I’ve refreshed the original post from November 2021 in March 2021 with updated instructions.

While 5G SA devices are still in their early stages, and 5G RAN hardware / gNodeBs are hard to come by, so today we’ll cover using UERANSIM to simulate UEs and 5G RAN, to put test calls through our 5GC.

Bringing your 5G Core Online

We’ll use Open5Gs for all the 5GC components, and install on any recent Ubuntu distribution.

Installation is nice and easy;

$ sudo apt update 
$ sudo apt install software-properties-common 
$ sudo add-apt-repository ppa:open5gs/latest 
$ sudo apt update 
$ sudo apt install open5gs

The first point of contact we’ll need to talk about is the AMF,

The AMF – the Access and Mobility Function is reached by the gNodeB over the N2 interface. The AMF handles our 5G NAS messaging, which is the messaging used by the UEs / Devices to request data services, manage handovers between gNodeBs when moving around the network, and authenticate to the network.

By default the AMF binds to a loopback IP, which is fine if everything is running on the same box, but becomes an issue for real gNodeBs or if we’re running UERANSIM on a different machine.

This means we’ll need to configure our AMF to bind to the IP of the machine it’s running on, by configuring the AMF in /etc/open5gs/amf.yaml, so we’ll change the ngap addr to bind the AMF to the machine’s IP, for me this is,

  - addr:

In the amf.conf there’s a number of things we can change and configure; such as the PLMN and network name, the NRF parameters, however for now we’ll keep it simple and leave everything else as default.

To allow the changes to take effect, we’ll restart the Open5GS AMF service to make our changes take effect;

$ sudo systemcl restart open5gs-amfd

Setting up the Simulator

We’re using UERANSIM as our UE & RAN Simulator, so we’ll need to get it installed. I’m doing this on an Ubuntu system as we’re using Snaps.

$ sudo apt update 
$ sudo apt upgrade 
$ sudo apt install make g++ libsctp-dev lksctp-tools 
$ iproute2 sudo snap install cmake --classic

With all the prerequisites installed we’ll clone the Git repository and make everything from source;

We’ll clone the Github repository, move into it and make from source.

$ git clone
$ make

Now we wait for everything to compile,

XKCD – Compiling

Once we’ve got the software installed we’ll need to put together the basic settings.

You should see these files in the /build/ directory and they should be executable.

Running the Simulator (UERANSIM)

UERANSIM has two key parts, like any RAN,

The first is the gNodeB, that connects to our AMF and handles subscriber traffic over our (simulated) radio link,

The other is our subscribers themselves – the UEs.

Both are defined and setup through config files in the config/ directory,

Configuring & Starting the gNodeB

While we’re not actually going to bring anything “on air” in the RF sense, we’ll still need to configure and start our gNodeB.

All the parameters for our gNodeB are set in the config/open5gs-gnb.yaml file,

Inside here we’ll need to set the the parameters of our simulated gNodeB, for us this means (unless you’ve changed the PLMN etc) just changing the Link IPs that the gNodeB binds to, and the IP of the AMFs (for me it’s – you’ll need to substitute these IPs with your own of course.

Now we should be able to start the gNodeB service and see the connection, let’s take a look,

We’ll start the gNodeB service from the UERANSIM directory by running the nr-gnb service with the config file we just configured in config/open5gs-gnb.yaml

$ build/nr-gnb -c config/open5gs-gnb.yaml

All going well you’ll see something like:

[2021-03-08 12:33:46.433] [ngap] [info] NG Setup procedure is successful

And if you’re running Wireshark you should see the NG-AP (N2) traffic as well;

If we tail the logs on the Open5GS AMF we should also see the connection too:

Configuring the UE Simulator

So with our gNodeB “On the air” next up we’ll connect a simulated UE to our simulated gNodeB.

We’ll leave the nr-gnb service running and open up a new terminal to start the UE with:

$ build/nr-gnb -c config/open5gs-gnb.yaml

But if you run it now, you’ll just see errors regarding the PLMN search failing,

So why is this? We need to tell our UE the IP of the gNodeB (In reality the UE would scan the bands to find a gNB to serve it, but we’re simulating hre).

So let’s correct this by updating the config file to point to the IP of our gNodeB, and trying again,

So better but not working, we see the RRC was released with error “FIVEG_SERVICES_NOT_ALLOWED”, so why is this?

A quick look at the logs on Open5Gs provides the answer,

Of course, we haven’t configured the subscriber in Open5Gs’s UDM/UDR.

So we’ll browse to the web interface for Open5GS HSS/UDR and add a subscriber,

We’ll enter the IMSI, K key and OP key (make sure you’ve selected OPc and not OP), and save. You may notice the values match the defaults in the Open5GS Web UI, just without the spaces.

Running the UE Simulator

So now we’ve got all this configured we can run the UE simulator again, this time as Sudo, and we should get a very different ouput;

$ build/nr-gnb -c config/open5gs-gnb.yaml

Now when we run it we should see the session come up, and a new NIC is present on the machine, uesimtun0,

We can now run commands like Ping and Curl and by specifying our special uesimtun0 interface, and the traffic will be encapsulated in GTP and pop out the other end.

Supporting UERANSIM

More advanced functionality is in the works though, so keep an eye on the UERANSIM GitHub page and contribute code if you can, and consider supporting them on Patreon if you can’t, they’re doing great work.

70 thoughts on “My first 5G Core: Open5Gs and UERANSIM

  1. Hi Nick,

    Thank you for the guide that you have provided. I have installed Open5gs and the simulator in a single Linux box and I managed to start all the services correctly. However, when I try to start the simulator, I got the following message;

    WARNING: All global logs are written to: logs/global.log
    WARNING: All logs of UEs and gNBs are written to their own log files: logs/*
    WARNING: All load testing logs are written to: logs/loadtest.log
    INFO: Selected profile: “open5gs”
    [2020-11-18 13:09:15.419] [INFO] [CONNECTION] [air] TUN Bridge has been started.
    [2020-11-18 13:09:15.523] [INFO] [CONNECTION] [gnb-1] Trying to establish SCTP connection… (
    [2020-11-18 13:09:15.539] [INFO] [CONNECTION] [gnb-1] SCTP connection established
    Exception in thread “main” tr.havelsan.ueransim.mts.MtsException: no constructor found for given parameter names for type UeConfig
    at tr.havelsan.ueransim.mts.MtsConstruct.construct(
    at tr.havelsan.ueransim.mts.MtsConstruct.construct(
    [2020-11-18 13:09:16.606] [SUCCESS] [PROCEDURE_RESULT] [gnb-1] NGSetup procedure is successful

    So I am not getting the prompt for “list of possible test”. May I know if you happened to have such an issue?


    1. Hi Luke,
      I haven’t had the issue, UERANSIM is evolving quickly, many commits per day, so maybe best to try the latest version today, or go back to a commit from a few weeks ago and see if you have the same issue.

      I’m also binding the AMF IP, I haven’t tried all on the same machine,but may be worth binding the AMF IP to the IP of the machine it’s running on incase there’s some issues with using Loopbacks.

      If that doesn’t work just open an issue on the UERANSIM Github issues page,


  2. Hi Nick,
    Thanks for your guidances which totally helps me a lot.But after following all your steps from the article,sadly the SCTP connections couldn’t established.I got the following message:

    WARNING: All global logs are written to: logs/global.log

    WARNING: All logs of UEs and gNBs are written to their own log files: logs/*

    WARNING: All load testing logs are written to: logs/loadtest.log

    INFO: Selected profile: “open5gs”

    [2020-11-19 15:22:47.403] [INFO] [CONNECTION] [air] TUN Bridge has been started.

    [2020-11-19 15:22:47.490] [INFO] [CONNECTION] [gnb-1] Trying to establish SCTP connection… (

    [2020-11-19 15:28:28.901] [ERROR] [CONNECTION] [gnb-1] SCTP connection could not established:connetion time out.

    I built OPEN5Gs and UERANSIM on two different virtual machines.Have you met the same issue?
    Thanks a lot.

  3. Hi Nick…good instructive. I deployed UESIM on one machine and 5GC on the other. I changed the ngap_server to my interfaces IP and the log reflects that:

    11/19 20:47:45.533: [app] INFO: Configuration: ‘/etc/open5gs/amf.yaml’ (../src/main.c:54)
    11/19 20:47:45.533: [app] INFO: File Logging: ‘/var/log/open5gs/amf.log’ (../src/main.c:57)
    11/19 20:47:45.535: [app] INFO: AMF initialize…done (../src/amf/app.c:33)
    11/19 20:47:45.535: [sbi] INFO: sbi_server() []:7777 (../lib/sbi/server.c:297)
    11/19 20:47:45.536: [amf] INFO: ngap_server() []:38412 (../src/amf/ngap-sctp.c:55)

    However SCTP keeps failing with an ABORT from UESIM. Any idea what could cause that?
    21:17:40.137207 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68) > chia1848TB.38412: sctp
    1) [INIT] [init tag: 1322236571] [rwnd: 106496] [OS: 10] [MIS: 65535] [init TSN: 4088205810]
    21:17:40.137288 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
    chia1848TB.38412 > sctp
    1) [INIT ACK] [init tag: 2281304756] [rwnd: 106496] [OS: 30] [MIS: 10] [init TSN: 3721079048]
    21:17:40.137591 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36) > chia1848TB.38412: sctp
    1) [ABORT]

    1. Hi Carlos,
      I’m not sure if UERANSIM uses a user-plane SCTP stack, but if so it could be that the kernel SCTP stack is interfering. To be sure, use the following IPTABLES command to stop this:
      iptables -t filter -I OUTPUT -p sctp –chunk-types any ABORT -j DROP

  4. Hi Nick,thanks for your guidance.I have done all the steps in your article,but I can’t establish SCTP connection.There is the response I got: root@apt:~/UERANSIM# ./
    WARNING: All global logs are written to: logs/global.log
    WARNING: All logs of UEs and gNBs are written to their own log files: logs/*
    WARNING: All load testing logs are written to: logs/loadtest.log
    INFO: Selected profile: “open5gs”
    [2020-11-20 12:11:18.805] [INFO] [CONNECTION] [air] TUN Bridge has been started.
    [2020-11-20 12:11:18.886] [INFO] [CONNECTION] [gnb-1] Trying to establish SCTP connection… (
    [2020-11-20 12:16:59.951] [ERROR] [CONNECTION] [gnb-1] SCTP connection could not established: 连接超时. I notice that in your article’s picture there is no Tun Bridge while running UERANSIM and I wonder does the Tun Bridge make the error happen.Any help will be grateful.

  5. For those having issues with connection timeout do a basic check that you have communication between the 2 machines. I had opn5gs and EURANSIM running on different VMs and the issue was down to connectivity between the two. If you are using VMs for this, ensure internal network is set in networks settings (virtualbox).

  6. Worth noting that in the setup described in this blog post, to get the payload to work (the google ping), the gtpu address needs to point to the 5GC VM, e.g. edit /etc/open5gs/upf.yaml:

    – addr:

    Now the transportLayerAddress in the PDUSessionResourceSetupRequest message from the AMF will be correct.

  7. is not present UERANSIM folder. Please let me know where to get this file

  8. Is it actually possible to run both open5GS and UERANSIM in the same host/VM? Or do they need to be in separate VMs?

    1. Hi Prad,
      It’s possible to run both, but splitting them across to VMs makes it a bit clearer which Network Function is doing what,

      1. I have setup both on the same VM, but when I did Ping to Google through uesimtun0, it does not work.

  9. Dear Experts,
    I could not find the “” nor “” file in the UERANSIM folder downloaded?
    Would you please help?

  10. Thanks Nick.
    I got 2 other issues.

    1. If I use 2 VMs: 1 for 5GS and 1 for UERANSIM
    I could not run the “nr-gnb”: properly.
    Error message is: “Trying to establish SCTP connection… (

    PS: The IP Address is the IP Add of my 5GS VM which is set in the “amfConfigs” of the “/config/open5gs-gnb.yaml” file

    2. If I use both 5GS and UERANSIM in the same VM:
    I still got this error Message:
    [nas] [error] Initial Registration failed FIVEG_SERVICES_NOT_ALLOWED]

    Even though I add the IMSI at the UDR/ HSS already

    Could you comment/ advise on those errors?

    Thanks alot

    Brs// KGH

    1. Hi Nick

      Point number 2 is fixed already.
      Only number 1 is pending now

      Thank you

      1. Hi Khong Gioi Han,
        Take a look in your Open5GS logs (/var/log/open5gs/*.log) when you try and register, that will tell you why the FIVEG_SERVICES_NOT_ALLOWED message was seen,

        1. Thanks Nick

          Yes, these logfiles helped as they give me the clues on why/ how “5G Service is not allowed”. From that, I fixed the Point Number2.

          Hoping I can find the way to fix the Point Number 1 too 🙂


          1. I think I fixed this Point Number 1 too.
            Route Cause: the “sd: 1” under “s_nssai” in the “amf.yaml” and under “slices” in “open5gs-gnb.yaml” files.

            We can either use or remove this, but make sure that the same setting are done in both “amf.yaml” and “open5gs-gnb.yaml” configure files above. Then it will work

            Hope this will help anybody who face this issue

      2. Hi Khong Gioi Han,

        I am having exactly the same problem of 2 (PLMN searched failed…) though I have added the IMSI to the UDR. Could you please help me to sort it out?

  11. Hello,

    no matter which slicing config i use (SST 1 or SST1 and SD 1), i always get this error on NSSF:
    03/20 01:53:55.570: [nssf] ERROR: Cannot find NSI by S-NSSAI[SST:1 SD:0xffffff] (../src/nssf/nnssf-handler.c:89)
    i did not alter any configs, just removed the SD from the UE, so all UE, GNb, AMF and Mongo use only SST 1.
    Any hints on what to check or change are much appreciated.

  12. He Daniel,

    Iwas having the same problem. But, I commented the SD from both UE (n.b. you have to remove/comment it 3 times from ue file) and gNB and it was successful. Now, I am having the issue of pinging google.

  13. Hello Nick,

    Why is the AMF IP different form the gNodeB IP? Are you running on two separate VMs?

    Best Regards,

  14. Hi Nick and Team,
    I tried the Virtualized versions of Open5gs and UERANSIM as your instruction, and it works
    I just also try the Containerized versions of Open5gs EPC/5gc + that of srs-RAN for eNB and UE on the Kubernetes cluster. It’s also OK.
    I recorded some results on my Youtube for the latter option so if anyone is interested on the Native cloudification of the Telecom CNF, please join. Its quite fun too.

    Thank you!

  15. Hi Nick,
    I am testing Open5GS with real gNB and 5G UE. I assume that I need to bind both the IP addresses of ngar (AMF) and gtpu (UPF) to the IP of Open5GS machine that has only one NIC. Is this correct?

    Can having separate NIC cards for AMF and UPF increase system throughput? The gNB has separate ports for AMF and UPF.


    Vincent Chu

    1. Hi Vincent,
      That’s right, same process for physical gNB,
      Because the AMF only handles signling you won’t get much additional throughput by putting that on a dedicated NIC, currently Open5Gs doens’t support DPDK or SR-IOV, so you won’t get quite line speed but with a powerful box should be able to crack 1Gbps.

      Be curious to know which gNB vendor you’re using, Nokia Airscale and Huawei 5900 has been tested using Open5Gs.

  16. Hi Nick,

    Thanks for the awesome instructions! They are really helpful 🙂
    When I tried to test my 5g Core, uesimtun0 cannot ping to google and no error messages pop up. I was wondering how you test your network.
    Really grateful if you could reply me.


      1. Yes, I meet the same problem as Wendy. I installed the open5gs on a Ubuntu Server PC. Will you show the NAT config on the open5gs PC/VM?

        1. The Nat Network make sure you applied it to each VM in the virtual box settings. (Pretty self explanatory, lots of clips online too for general Nat Network) I thought this was my issues too, but check your IPV4 forwarding settings. This was the main issue why I wasn’t able to ping google from the simulator.

          1. Why Destination or Source port in NGAP are not always same in each and every messages?
            Either Source port is 38412 not the destination port in that message or
            Destination port is 38412 not the source port .

          2. The loopback IP range ( can use any IPs in it, and that’s what’s happening here.
            That’s why you see the same port being used, it’s a different loopback IP being used at each end however.

          3. Hi
            I am also not able to ping the google from UERANSIM VM. I have two separate VMs for UERAMSIM and Open5Gs. Please share how did you troubleshoot.

            Thanks in advance!

          4. Hi,
            I am also not able to ping the google from UERANSIM VM. I have two separate VMs for UERAMSIM and Open5Gs. Please share how did you troubleshoot.
            Thanks in advance!

  17. UE and AMF Yaml files please as i’m unable to establish connection between Core and UE, the communication between core and RAN is good

  18. Hi Nick.
    my gnb located on VM1 and Open5Gs is on VM2. when i run gnb, sctp connection with AMF established but gtp getting this error:
    [error] GTP/UDP task could not be created. Socket bind failed: Address already in use.


  19. hi I am runing 2 VMs on AWS , both are in same VPC both are in same subnet , able to ping each other also can reach on port .. but stiil

    ubuntu@UeRANSIM002-213:~/UERANSIM/config$ ../build/nr-gnb -c open5gs-gnb.yaml
    UERANSIM v3.2.4
    [2021-11-25 21:03:21.816] [sctp] [info] Trying to establish SCTP connection… (

    i am geeting this error .. not sure where to check .. please help

    Cubuntu@UeRANSIM002-213:~/UERANSIM/config$ ping
    PING ( 56(84) bytes of data.
    64 bytes from icmp_seq=1 ttl=64 time=0.140 ms
    64 bytes from icmp_seq=2 ttl=64 time=0.175 ms
    — ping statistics —
    2 packets transmitted, 2 received, 0% packet loss, time 1030ms
    rtt min/avg/max/mdev = 0.140/0.157/0.175/0.017 ms

  20. ov 25 20:39:35 Open5Gs002-139 systemd[1]: Started Open5GS AMF Daemon.
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: Open5GS daemon v2.3.6
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: 11/25 20:39:35.607: [app] INFO: Configuration: ‘/etc/open5gs/amf.yaml’ (../lib/app/ogs-init.c:129)
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: 11/25 20:39:35.607: [app] INFO: File Logging: ‘/var/log/open5gs/amf.log’ (../lib/app/ogs-init.c:132)
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: 11/25 20:39:35.609: [sbi] INFO: nghttp2_server() []:7777 (../lib/sbi/nghttp2-server.c:144)
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: 11/25 20:39:35.609: [amf] INFO: ngap_server() []:38412 (../src/amf/ngap-sctp.c:53)
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: 11/25 20:39:35.609: [sctp] INFO: AMF initialize…done (../src/amf/app.c:33)
    Nov 25 20:39:35 Open5Gs002-139 open5gs-amfd[18934]: 11/25 20:39:35.610: [amf] INFO: [cd476fce-4e2f-41ec-a977-3b7c36886fa6] NF registred [Heartbeat:10s] (../src/amf/nf-sm.c:198)

  21. Dear Experts,
    My set up has been successful but i am not able to capture any of the traffic. Is there any changes that has to be done in wireshark to capture the traffic. what i could be doing wrong. Is there anything that needs to be changed in the wireshark settings to capture this traffic.

  22. Hello, i installed open5gs in containers.. working good . i installed UERANSIM on other VM , GNb is working good

    buntu@ip-10-10-10-54:~/UERANSIM/config$ ../build/nr-gnb -c open5gs-gnb.yaml
    UERANSIM v3.2.4
    [2021-12-03 01:04:38.876] [sctp] [info] Trying to establish SCTP connection… (
    [2021-12-03 01:04:38.879] [sctp] [info] SCTP connection established (
    [2021-12-03 01:04:38.881] [sctp] [debug] SCTP association setup ascId[6]
    [2021-12-03 01:04:38.881] [ngap] [debug] Sending NG Setup Request
    [2021-12-03 01:04:38.881] [ngap] [debug] NG Setup Response received
    [2021-12-03 01:04:38.882] [ngap] [info] NG Setup procedure is successful

    on same machine , i am trying to bring up UE .. but i facing plmn selection issues
    [2021-12-03 01:18:22.354] [nas] [info] UE switches to state [MM-DEREGISTERED/PLMN-SEARCH]
    [2021-12-03 01:18:24.556] [nas] [error] PLMN selection failure, no cells in coverage
    [2021-12-03 01:18:26.758] [nas] [error] PLMN selection failure, no cells in coverage
    [2021-12-03 01:18:27.356] [rrc] [warning] Acceptable cell selection failed, no cell is in coverage
    [2021-12-03 01:18:27.356] [rrc] [error] Cell selection failure, no suitable or acceptable cell found
    [2021-12-03 01:18:27.859] [nas] [info] UE switches to state [MM-DEREGISTERED/NO-CELL-AVAILABLE]
    [2021-12-03 01:18:57.368] [rrc] [warning] Acceptable cell selection failed, no cell is in coverage
    [2021-12-03 01:18:57.368] [rrc] [error] Cell selection failure, no suitable or acceptable cell found
    [2021-12-03 01:18:57.586] [nas] [error] PLMN selection failure, no cells in coverage
    [2021-12-03 01:19:27.380] [rrc] [warning] Acceptable cell selection failed, no cell is in coverage
    [2021-12-03 01:19:27.380] [rrc] [error] Cell selection failure, no suitable or acceptable cell found
    [2021-12-03 01:19:28.414] [nas] [error] PLMN selection failure, no cells in coverage

    I have added gnb i correctly .. in ue config file

    Gnb / UE VM nic

    ns5: flags=4163 mtu 9001
    inet netmask broadcast
    inet6 fe80::1:f2ff:fefb:7334 prefixlen 64 scopeid 0x20
    ether 02:01:f2:fb:73:34 txqueuelen 1000 (Ethernet)
    RX packets 10899 bytes 8003338 (8.0 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 7509 bytes 1047220 (1.0 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    —UE config file
    # IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)
    supi: ‘imsi-999700000000001’
    # Mobile Country Code value of HPLMN
    mcc: ‘999’
    # Mobile Network Code value of HPLMN (2 or 3 digits)
    mnc: ’70’

    # Permanent subscription key
    key: ‘465B5CE8B199B49FAA5F0A2EE238A6BC’
    # Operator code (OP or OPC) of the UE
    op: ‘E8ED289DEBA952E4283B54E88E6183CA’
    # This value specifies the OP type and it can be either ‘OP’ or ‘OPC’
    opType: ‘OPC’
    # Authentication Management Field (AMF) value
    amf: ‘8000’
    # IMEI number of the device. It is used if no SUPI is provided
    imei: ‘356938035643803’
    # IMEISV number of the device. It is used if no SUPI and IMEI is provided
    imeiSv: ‘4370816125816151’

    # List of gNB IP addresses for Radio Link Simulation

    # UAC Access Identities Configuration
    mps: false
    mcs: false

    # UAC Access Control Class
    normalClass: 0
    class11: false
    class12: false
    class13: false
    class14: false
    class15: false

    # Initial PDU sessions to be established
    – type: ‘IPv4’

    not sure what is missing …

  23. i have configured 5G core using open5gs and UERANSIM. but I am not getting expected throughput. I used iperf3 load generator.I am getting arround 300Mbits/sec from UE to another Virtual machine via iperf3. How can i get the maximum data rate (UDP ~1Gbps). What might be the reason for this?
    I have implemented my environment in ubuntu(18.04) virtual machines.

    1. Hi,
      UERANSIM is not optimized for high throughput, and the UPF in Open5GS is not either.
      Increasing the resources should improve performance, but that’s to be expected.

  24. Hi Nick

    Happy New Year to everyone

    Thanks for the guide, i have followed and it all seems to be working (2nd VM running UERANSIM), but then i come to your comment about opening the GUI… but i cant locate it!

    On other guides on Open5GS (the Open5GS install guide) there is a webui folder but i don’t seem to be able to find it via your install.

    Linux installs is not my background so it is possible that i have missed something. I am using Ubuntu 20.04.3 LTS

    A second request, where are you running Wireshark from in your Guide, i can’t seem to capture anything. I am running Wireshark directly on the Windows Host. If i ping from the VM to the IP Address of the Windows Host then this is captured fine.


  25. Hi Nick,

    I am getting the below error when starting open5GS WEB UI.

    ubuntu@5g-simulator:/software/open5gs$ cd webui/
    ubuntu@5g-simulator:/software/open5gs/webui$ ls
    package-lock.json package.json pages server src static
    ubuntu@5g-simulator:/software/open5gs/webui$ npm run dev –host

    > [email protected] dev /software/open5gs/webui
    > node server/index.js “”

    throw err;

    Error: Cannot find module ‘co’
    Require stack:
    – /software/open5gs/webui/server/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object. (/software/open5gs/webui/server/index.js:6:12)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [ ‘/software/open5gs/webui/server/index.js’ ]
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] dev: `node server/index.js “”`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?

    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/ubuntu/.npm/_logs/2022-02-04T13_48_27_993Z-debug.log

    Can you please help to to shortout this…

  26. Everything worked for me except ping command. Can anyone help me with it. The command used for ping is → $ ping -I uesimtun0

  27. can we configure sctp multi-homing in
    /UERANSIM# build/nr-gnb -c config/open5gs-gnb.yaml for NGAP local address?
    if i add as above it is not really using first address.

    And other thing is, can we configure source port gor gNB, i ways want to send NGSetupRequest from same source port and address

  28. Hi ,

    Thanks alot for showing the setup , it really works well .
    I wanted to Onboard these individual components ( UE, RAN, Uplane,Cplane) on my tool which support device discovery .
    Can you please suggest how can i do it .

    also if i want to SSH from UE to RAN server then can i do it ? in my current setup bot machine ping each other but cant ssh/telnet

  29. Hi,
    i want to test this demo with multiple UEs. can anyone help me what steps i need to add ?

  30. Did a recent apt update and apt upgrade on the open5gs core. /var/log/apt/history shows a lot of 2.5.8 to 2.6.0 updates.
    Looks like a lot of explicit ‘no_tls=true’ variable settings in the yaml files.

    During the upgrade process, I told apt not to install new config files. I have since went in and renamed ans reconfigured those .yaml.dist files to the proper config files (renaming old ones to .yaml.old)

    Now, open5gs doesn’t start.
    localadmin@open-5gs:~$ sudo systemctl restart open5gs*
    localadmin@open-5gs:~$ sudo systemctl status open5gs*
    ● open5gs-scpd.service – Open5GS NRF Daemon
    Loaded: loaded (/lib/systemd/system/open5gs-scpd.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2023-03-15 08:37:11 MDT; 4s ago
    Main PID: 3187 (open5gs-scpd)
    Tasks: 2 (limit: 38431)
    Memory: 5.0M
    CGroup: /system.slice/open5gs-scpd.service
    └─3187 /usr/bin/open5gs-scpd -c /etc/open5gs/scp.yaml

    Mar 15 08:37:11 open-5gs systemd[1]: Started Open5GS NRF Daemon.
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: Open5GS daemon v2.6.0
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: 03/15 08:37:11.993: [app] INFO: Configuration: ‘/etc/open5gs/scp.yaml’ (../lib/app/ogs-init.c:126)
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: 03/15 08:37:11.993: [app] INFO: File Logging: ‘/var/log/open5gs/scp.log’ (../lib/app/ogs-init.c:129)
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: 03/15 08:37:11.995: [sbi] INFO: nghttp2_server() []:7777 (../lib/sbi/nghttp2-server.c:395)
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: 03/15 08:37:11.995: [app] INFO: SCP initialize…done (../src/scp/app.c:31)
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: 03/15 08:37:11.995: [sbi] WARNING: [7] Failed to connect to ::1 port 7777: Connection refused (../lib/sbi/client.c:626)
    Mar 15 08:37:11 open-5gs open5gs-scpd[3187]: 03/15 08:37:11.995: [sbi] WARNING: ogs_sbi_client_handler() failed [-1] (../lib/sbi/path.c:59)

    localadmin@open-5gs:/var/log/open5gs$ ps aux | grep open5gs
    open5gs 3187 0.0 0.0 147064 14428 ? Ssl 08:37 0:00 /usr/bin/open5gs-scpd -c /etc/open5gs/scp.yaml
    localad+ 3195 0.0 0.0 9040 716 pts/1 S+ 08:38 0:00 grep –color=auto open5gs

    /var/log/apt/history.log (partial)
    Start-Date: 2023-03-06 11:38:50
    Commandline: apt-get upgrade
    Requested-By: localadmin (1005)
    Upgrade: python3-software-properties:amd64 (,, update-notifier-common:amd64 (,, open5gs-common:amd64 (2.5.8~focal, 2.6.0~focal), tcpdump:amd64 (4.9.3-4ubuntu0.1, 4.9.3-4ubuntu0.2), ubuntu-advantage-tools:amd64 (27.13.2~20.04.1, 27.13.6~20.04.1), open5gs-ausf:amd64 (2.5.8~focal, 2.6.0~focal), nodejs:amd64 (14.21.2-deb-1nodesource1, 14.21.3-deb-1nodesource1), open5gs-amf:amd64 (2.5.8~focal, 2.6.0~focal),

  31. Hello, I encountered an error connecting to AMF after configuring UE, which is displayed as this: 04/19 00:09:09.192: [gmm] WARNING: [suci-0-999-70-0000-0-0-0000000001] Cannotind SUCI [404] (../src/amf/gmm-sm.c:1472)04/19 00:09:09.192: [amf] WARNING: [suci-0-999-70-0000-0-0-0000000001] Registration reject [11] (../src/amf/nas-path.c:219)
    I would like to know how SUCI needs to be configured, thank you

  32. Hello, nice tutorial, I managed to make them both run. Just two questions, if I want to simulate 10 UEs, do I need to also add 10 subscribers in open5GS’ web interface? For the IMSI, I think we can just increment it by 1, then what about the K key and OP key? Which values should be added there?


  33. **** “ping -I uesimtun0” issue ******
    For those who had problems with “ping -I uesimtun0”, the issue is the gNB and the 5GSCore should not be running on the same machine. You should set the open5gs-gnb in VM1, for example, and open5GCore in VM2. And remember that when you do this, you should modify:

    1) in file open5gs-gnb.yaml following lines with the IPs that your gnb will use to set up N2 and N3 interfaces, I mean 127.0.0.x, should be changed for your outside IP for the gnb.

    ————BEFORE————————————- ——————-
    linkIp: # gNB’s local IP address for Radio Link Simulation
    ngapIp: # gNB’s local IP address for N2 Interface
    gtpIp: # gNB’s local IP address for N3 Interface

    ———DESPUES DE—————————————- ———————-
    linkIp: # gNB’s local IP address for Radio Link Simulation…
    ngapIp: # gNB’s local IP address for N2 Interface…
    gtpIp: # gNB’s local IP address for N3 Interface…

    ————————————————– ——————————-

    2) and in the open5GS core you should change the IPs on AMF and UPF files, those where they will be listening to the same interfaces (N2 and N3) . And if you decide to run 4G, you should do the same for MME, and SGW files (S1-MME and S1U).

    Please, let me know if this was helful for you.
    Have a nice day!.

    1. Hello Julian,

      As a network engineer with a focus on cloud and data center technologies, my experience in the telco domain is somewhat limited. However, I recently embarked on a project that involves implementing a solution similar to what you’ve mentioned, utilizing Azure Virtual Machines.

      Your comment caught my attention, as it shed some light on the telco-specific aspects that I need to consider. However, I’m still piecing together how it all fits in a cloud-based environment, specifically on Azure Linux VMs.

      I was wondering if you could provide a more detailed breakdown of how the components and concepts you discussed can be applied when using Linux virtual machines hosted on Azure. Any insights into best practices, configuration considerations, or tools that are particularly beneficial in this context would be greatly appreciated.

      Your expertise in the telco field could really help bridge the gap between what I know and what I need to understand to make this project a success.

      Thank you in advance for your help!

      Warm regards,

  34. Hello Nick,
    Very useful and nice post by you for as I am new into this world. I tried all in one VM and SCTP connections was established. but i can’t see Sccp in wireshark and unable to login web interface for Open5GS HSS/UDR. are you used 2 vms? appreciated

Leave a Reply

Your email address will not be published. Required fields are marked *