Indoor/Sandbox Over-the-Air OpenAirInterface5g Experiment using USRPs

Platform: Universal Software Radio Peripheral (USRP)

Resources needed: One USRP X310 or B210 for the gNB, one USRP B210 for the nrUE, associated host computers, and resources needed for the core network (only if required).

Note

For OAI experiments, you have two options for the core network:

  1. Use the ARA-provided core network: In this case you can use the core network provided by ARA.

  2. Deploy your own core network: Here, you need to reserve another node specifically for the core network and deploy the core network using specific container.

Short Description: The experiment demonstrates establishing a 5G BS-UE link using OpenAirInterface5g and USRPs. The setup includes an OpenAirInterface (OAI) gNB, nrUE, and the 5G Core Network.

Detailed Description: This experiment features a 5G network deployment using containerized 5G software components of OpenAirInterface5g, i.e., a containerized gNB, a containerized UE, and containerized core network deployed on Intel x86 servers. The gNB and nrUE containers run on general purpose Intel x86 servers. The gNB host connects to a USRP X310 over 10GbE interface or to a USRP B210 over a USB 3.0 cable, while the nrUE host connects to a USRP B210 over a USB 3.0 cable. The gNB is connected to a 5G core network via a high-speed backhaul link. The following figure shows the 5G BS-UE link created from the experiment.

../../_images/Experiment_5.png

Detailed Steps for the Experiment

  1. Login to ARA portal with your credentials.

  2. Create three reservations using the Project -> Reservations -> Leases tab from the dashboard.

    1. gNB

      • Site: Sandbox

      • Resource Type: AraRAN

      • Device Type: Host

      • Device ID: 026 (X310) or any available Sandbox host (B210)

      Note

      For an X310-based gNB, use Sandbox Device IDs 026, 027, or 028. If you are using a B210 for the gNB, any available Sandbox host can be reserved.

      Note

      For the current location and distribution of X310s and B210s in the Sandbox, see ARA Sandbox Service.

    2. nrUE

      • Site: Sandbox

      • Resource Type: AraRAN

      • Device Type: Host

      • Device ID: 001

    3. 5G_Core (Only if you are using Option 2 on the core network above, i.e., if you are creating your own core network.)

      Ideally, the core network can be deployed on any node (such as DataCenter-Compute-000 or DataCenter-Compute-001). For this example, we deploy the core network on the Sandbox-Host-004.

      • Site: Sandbox

      • Resource Type: AraRAN

      • Device Type: Host

      • Device ID: 004 (or any available node)

  3. Create the following two (or three) containers on the respective nodes using the corresponding reservation IDs. For the containers, the Docker images can be used as follows:

    1. gNB

      • Container Image: arawirelesshub/openairinterface5g:oai_gnb

      • CPU: 8

      • Memory: 8192

      • Network: ARA_Shared_Net

    2. nrUE

      • Container Image: arawirelesshub/openairinterface5g:oai_nrue

      • CPU: 8

      • Memory: 6000

      • Network: ARA_Shared_Net

    3. 5G_Core

      • Container Image: arawirelesshub/openairinterface5g:cn

      • CPU: 4

      • Memory: 4096

      • Network: ARA_Shared_Net

  4. Once the containers are launched, take a note on their floating IPs. The containers can be accessed via the console tab of the respective containers in the Project -> Containers tab from the dashboard or using SSH via the jumpbox server. Visit ARA Jumpbox for more information on accessing containers via jumpbox.

  5. In both gNB and nrUE containers, run the following command to check the radios connected to the host.

    # uhd_find_devices
    

    The output of the above command looks like the following image. You may see an X310 or B210 on the gNB host and one or more B210s on the nrUE host.

    ../../_images/UHD_Find_Devices.png
  6. [Optional: Execute this step only if you are running your own 5G core network. If you are using ARA-provided core network, skip this step.] In the 5G_Core container, run the following commands to start OAI 5G Core.

    # cd oai-cn5g
    # docker compose up -d
    # iptables -P FORWARD ACCEPT
    

    Note the IP address of the interface eth0 in the container by executing the command.

    # ifconfig eth0
    

    For this experiment, we assume that the IP address of the core network container is 10.0.4.100.

  7. To make the gNB connected to your core network, you need to attach the gNB to the AMF of the core network. First note down the IP address of the interface eth0 of the gNB container by executing the following command in the terminal.

    # ifconfig eth0
    

    For this experiment, we assume that the IP address is 10.0.4.44.

  8. Open the gNB configuration file with the following command.

    # nano ~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
    

    Make the necessary changes as shown in the figure below. Note that in the following image, provide the IP address you obtained in Step 7. Use /24 subnet mask while specifying the IP address, i.e., 10.0.4.44/24

    ../../_images/Network_Interface.png

    Further, specify the X310 IP address by changing the line starting with sdr_addrs to sdr_addrs = "addr=192.168.50.2"; as shown below:

    ../../_images/x310_address.png

    Note

    If you are using a B210 for the gNB instead, use the same configuration file and set the B210 serial number in sdr_addrs. For example, update the line to sdr_addrs = "serial=8000167";.

    ../../_images/SDR_Address.png

    Once the modification is complete, save (Press Ctrl+O) and exit (Press Ctrl+X) the nano editor.

  9. Add a route to the core network from the gNB container with the following command at the gNB container.

    Case 1: If you are using ARA-provided 5G core network: Use the following command.

    # ip route add 192.168.70.128/26 via 10.0.4.4 dev eth0
    

    Case 2: If you are using your own core network: Use the IP address obtained from Step 6 (in this example it is 10.0.4.100) in the command as follows.

    # ip route add 192.168.70.128/26 via 10.0.4.100 dev eth0
    
  10. To test the reachability of the 5G Core from the gNB container, run a ping in the gNB container toward the AMF of the core network.

    # ping 192.168.70.132
    
  11. In the gNB container, run the OAI gNB using the following commands.

    # cd ~/openairinterface5g
    # source oaienv
    # cd cmake_targets/ran_build/build
    # ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --sa -E --continuous-tx
    
  12. An important parameter that users want to change is the center frequency. Even though it is advisable to keep it default, the center frequency can be modified using the following two parameters.

    1. absoluteFrequencySSB

    2. dl_absoluteFrequencyPointA

    The parameters above take NR ARFCN values for the specific center frequency. You can use the online 5G NR ARFCN Calculator to get the absoluteFrequencySSB in case if you are not familiar with the low-level calculation. To obtain the corresponding dl_absoluteFrequencyPointA, subtract 1272 from the absoluteFrequencySSB value.

  13. In the nrUE container, run the OAI nrUE using the following commands.

    # cd ~/openairinterface5g
    # source oaienv
    # cd cmake_targets/ran_build/build
    # ./nr-uesoftmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf -r 106 --numerology 1 --band 78 -C 3604800000 --ue-fo-compensation --sa -E --ue-txgain 0 --usrp-args "serial=8000170" --nokrnmod 1
    

    Console Traces

    On establishing a successful connection, the commands provide the following output.

    gNB Console Trace

    ../../_images/gNB_Console.png

    nrUE Console Trace

    ../../_images/UE_Console.png

    Note

    When the connection is established, we can observe a new interface oaitun_ue1 in nrUE with an IP address assigned by the SMF of the core network. In order to find the IP address, open (or SSH into) another terminal for nrUE container and run the command ifconfig. For this experiment, we assume that the IP obtained is 10.0.0.2.

    In this experiment, the interface name assigned to the nrUE by the SMF is given as oaitun_ue1, which is used in the commands provided in the steps below.

  14. Ping test to the Core Network: On the nrUE container, run the following command to ping the core network to ensure stable connection.

    # ping -I oaitun_ue1 192.168.70.135
    

    An example output of the ping command is shown below.

    ../../_images/sandbox_ping.png

    For recording the ping output to a text file (say ping_output.txt), we can use the following command.

    # ping -I oaitun_ue1 192.168.70.135 | tee ping_output.txt
    

Throughput Test

Note

The throughput test is enabled only for the cases when you run your own core network, i.e., Case-2.

  1. Downlink Throughput: For measuring the throughput, we use the tool iperf. For the downlink throughput, follow the steps below.

    1. Run the iperf server in the nrUE container using the following command. Remember to use the ip address of the oaitun_ue1 interface. In what follows, we assume the IP to be 10.0.0.2.

      # iperf -s -i 1 -u -B 10.0.0.2
      
    2. Run the iperf client in the 5G core container. Remember to use the IP address of the oaitun_ue1 interface in nrUE after the -c flag. In what follows, we assume the UE IP to be 10.0.0.2.

      # docker exec -it oai-ext-dn iperf -c 10.0.0.2 -u -b 10M --bind 192.168.70.135
      

      An example iperf trace at nrUE

      ../../_images/Downlink_Throughput_at_nrUE.png
  2. Uplink Throughput: For the uplink, we need to run the iperf server at the 5G core and iperf client at the nrUE.

    1. For the uplink throughput, first, run the iperf server at the 5G core network.:

      # docker exec -it oai-ext-dn iperf -s -i 1 -u -B 192.168.70.135
      
    2. Run iperf client in the nrUE container. Remember to use the IP address of the oaitun_ue1 interface at nrUE after the --bind flag. In what follows, we assume the UE IP to be 10.0.0.2.

      # iperf -c 192.168.70.135 -u -b 2M --bind 10.0.0.2
      

      An example iperf trace at 5G Core

      ../../_images/Uplink_Throughput_at_Core.png