4. Creating and Configuring a UE RAN Simulator - anhtien17/free5GC GitHub Wiki

The aims of this guide are:

  • Cloning an existing VM to install ueransim
  • Installing and testing the ueransim simulator
  • Configuring ueransim simulator.

A. Create A ueransim VM

Refer to the instruction in Creating and Configuring a free5GC VM with a name of ueransim and a IP address, e.g., 192.168.31.102.

B. Install & Test ueransim Simulator

1. Install ueransim

  • Search “ueransim” on the web, and get the github.

  • In the github page, find the Installationpage.

  • Download UERANSIM:

       cd ~
       git clone https://github.com/aligungr/UERANSIM
       cd UERANSIM
       git checkout v3.1.0
    
  • Install required tools:

       sudo apt install make
       sudo apt install g++
       sudo apt install libsctp-dev lksctp-tools
       sudo apt install iproute2
       sudo snap install cmake --classic
    
  • Build UERANSIM:

       cd ~/UERANSIM
       make
    

2. Setting parameters for ueransim simulator

In the ueransim VM, there are two files related to free5GC

  * ~/UERANSIM/config/free5gc-gnb.yaml
  * ~/UERANSIM/config/free5gc-ue.yaml
  • Edit the file free5gc-gnb.yaml in the path ~/UERANSIM/config/free5gc-gnb.yaml, and change the ngapIp IP and gtpIp IP, from 127.0.0.1 to the IP address of the ueransim VM, e.g., 192.168.31.102,and also change the IP in amfConfigs into the IP address of the free5gc VM, e.g., 192.168.31.101:

       ...
          ngapIp: 192.168.31.102  # 127.0.0.1   # gNB's local IP address for N2 Interface (Usually same with local IP)
          gtpIp: 192.168.31.102  # 127.0.0.1    # gNB's local IP address for N3 Interface (Usually same with local IP)
    
          # List of AMF address information
          amfConfigs:
            - address: 192.168.31.101  # 127.0.0.1
    
  • Next, we examine the file free5gc-ue.yaml in the path ~/UERANSIM/config/free5gc-ue.yaml,and see if the settings are consistent with those of the Subscriber in the free5GC (via WebConsole).