Open RAN  - open5GS  

 

 

 

 

 

On Google Cloud

 

In this note, I will talk about setting up openGS test environment on an Ubuntu virtual machine on Google Cloud. But I will not explain about the installation process because it is almost same as the installation on the local virtual machine. I would focus on items which are specifically related to Google Cloud setup in this note.

 

 

 

TestSetup

 

The test setup that I used is as shown below. I used Amari callbox as gNB connecting to open5GS (For now, I am using Amarisoft UE simulator as a DUT(UE). Main reason for it is that I don't have any USIM that support milinage algorithm and don't have any commercial UE that allows to configure network slice parameters. With Amarisoft UE simulator, I can configure all those parameters just by modifying a configuration file).

 

 

If you are not familiar with setup a virtual machine on Google Cloud, you may check some YouTube video tutorials and my note here.

 

Following is the OS related information of the virtual machine on the cloud. (NOTE : I have tried with Ubuntu 22.04 LTS as well but the installation didn't go through as of Jun 2022. This may be resolved in the future).

 

Once you setup a virtual machine, the installation process went in the same way I did for the installation on local virtual machine shown in this note.

 

The IP setup created right after the installation of open5GS is as shown below.

 

 

 

 

 

Firewall setup on Virtual machine on Cloud

 

Once your installation is complete and confirmed that all the services of open5gs is running, you would need to add some additional settings on Firewall.

The firewall rules that I added to the VM on Google Cloud are those underlined in red. sctp is for initial sctp connection between gNB and open5gs and open5gs-webui is to allow open5gs webUI access from a remote PC. open5gs-data is to allow ping between UE and the open5gs.

NOTE : I set 'all' for Protocols/ports for some rules which may not be a good idea in terms of security, but I set it 'all' as a lazy way just for my test setup.

 

 

After defining the firewall rules, apply the configured rules to the specific virtual machine where open5gs is installed as shown below.

 

 

 

 

Basic Configurations

 

Now you have to change all the necessary configuration files according to your test setup. At the initial test, I need to change only two files amf.yaml and upf.amf file, but you may need to change more files as your test gets more complicated.

 

 

 

Following is the contents of amf.yaml and upf.yaml and the red part is what I have changed from the original configuration. It is import to get not only plmn but aslo tac to match between gNB(Amari Callbox) and open5gs configuration.

 

amf.yaml

amf:

    sbi:

      - addr: 127.0.0.5

        port: 7777

    ngap:

      - addr: 10.188.0.4    # This is IP address of the PC where open5gs is installed

    guami:

      - plmn_id:

          mcc: 001      #  Changed PLMN according to PLMN configuration of gNB

          mnc: 01

        amf_id:

          region: 2

          set: 1

    tai:

      - plmn_id:

          mcc: 001

          mnc: 01

        tac: 1          #  Changed tac according to tac configuration of gNB

    plmn_support:

      - plmn_id:

          mcc: 001

          mnc: 01

        s_nssai:

          - sst: 1      #  use this value as default and changed gNB nssai to match this. I have tried to add

                           #  sd field, but it didn't work. open5gs rejects Setup Request from gNB.

    security:

        integrity_order : [ NIA2, NIA1, NIA0 ]

        ciphering_order : [ NEA0, NEA1, NEA2 ]

    network_name:

        full: Open5GS

    amf_name: open5gs-amf0

parameter:

 

max:

 

usrsctp:

 

time:

 

Following is the configuration changes in upf

upf.yaml

upf:

    pfcp:

      - addr: 127.0.0.7

    gtpu:

      - addr: 10.188.0.4       # This is IP address of the PC where open5gs is installed

    subnet:

      - addr: 10.45.0.1/16           # These are IP address of the virtual interface to be created by open5gs

      - addr: 2001:db8:cafe::1/48

 

Once you completed the change of configuration files, you need to restart the services which are using the changed configuration files as shown below.

 

$ sudo systemctl restart open5gs-amfd

$ sudo systemctl restart open5gs-sgwud

 

 

 

First Trial

 

First trial is just to check the initial connection between gNB at my home (Amarisoft callbox) and open5gs on Google Cloud. At this moment, I don't need any UE. Just confirm that open5gs (especially amf service) is running and restart gNB (Amaricallbox). If you see the log as shown below.. meaning you see NGAP connection (SCTP connection) and NG Setup Request/Response. It mean the initial connection between gNB and open5gs is properly established. You may check the log from open5gs log, but I mostly rely on Amarisoft log since I personally more familiar with Amarisoft product and it provides GUI tool to check the log as shown below.

I would not explain the details of this connection process since they would be separate topics which requres long explanation. If you are interested, check out this note for SCTP connection and this note for NGAP protocol.

 

 

 

Next Step :  Naturally the next step should be to try with UE and check out how far it goes.

 

 

 

2nd Trial

 

It is obvious on what to do at 2nd trial. Now I want to power on UE and see if the signaling message is flowing from UE to core network and in vice versa. At this point,  I know it would not complete the full registration since I didn't configure any UE information to open5gs user DB (mongo DB) but I just wanted to check if at least a few signaling message goes through and the result is as shown below. You see the registration got rejected.. but the fact that UE got the registration reject NAS message mean that the registration request message reaches the core network (amf) and processed by it.

Registration rejection itself is expected because I haven't registered my UE to open5gs mongo DB.

 

 

Next Step :  Next step is to add UE information to open5gs mongo DB so that the full registration procedure go through. The biggest hurdle was to get access to the open5gs mongo DB (on Google Cloud) from the remote PC (at my home). This hurdle hadn't been overcome for a while for me, but with the help of key open5gs developer Sukchan as explained in this note.

 

 

 

3rd Trial

 

After adding a proper UE information to the open5gs mongo DB and run the test again with UE connected. And full registration procedure through the end up to PDU setup procedure. I would not talk about the details of each message since they are almost same as explained in this note.

 

 

 

Next Step :  At this point, signaling side reaches to the point that I wanted to achieve. Now I want to go further and try real data traffic (at least ping). I didn't have any problem with open5gs installed in the local virtual machine as shown in this note. But in this setup (UE and gNB located at local site (i.e, my home) but open5gs located in Google cloud), it doesn't seem to be that simple. The first problem that I see is 'The core IP (open5gs ogstun ip) and the UE ip (the ip assigned to UE) are in the same subnet, but they are physically located in different network. 'How to solve this issue' is the problem that I face now (I want to solve this problem without relying on setting up VPN, but no idea on how to do it as of now).