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:
Use the ARA-provided core network: In this case you can use the core network provided by ARA.
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.
Detailed Steps for the Experiment
Login to ARA portal with your credentials.
Create three reservations using the Project -> Reservations -> Leases tab from the dashboard.
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.
nrUE
Site: Sandbox
Resource Type: AraRAN
Device Type: Host
Device ID: 001
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)
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:
gNB
Container Image:
arawirelesshub/openairinterface5g:oai_gnbCPU: 8
Memory: 8192
Network: ARA_Shared_Net
nrUE
Container Image:
arawirelesshub/openairinterface5g:oai_nrueCPU: 8
Memory: 6000
Network: ARA_Shared_Net
5G_Core
Container Image:
arawirelesshub/openairinterface5g:cnCPU: 4
Memory: 4096
Network: ARA_Shared_Net
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.
In both gNB and nrUE containers, run the following command to check the radios connected to the host.
# uhd_find_devicesThe 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.
[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
eth0in the container by executing the command.# ifconfig eth0For this experiment, we assume that the IP address of the core network container is 10.0.4.100.
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
eth0of the gNB container by executing the following command in the terminal.# ifconfig eth0For this experiment, we assume that the IP address is 10.0.4.44.
Open the gNB configuration file with the following command.
# nano ~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.confMake 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
Further, specify the X310 IP address by changing the line starting with
sdr_addrstosdr_addrs = "addr=192.168.50.2";as shown below:
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 tosdr_addrs = "serial=8000167";.
Once the modification is complete, save (Press Ctrl+O) and exit (Press Ctrl+X) the nano editor.
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 eth0Case 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 eth0To test the reachability of the 5G Core from the gNB container, run a ping in the gNB container toward the
AMFof the core network.# ping 192.168.70.132In 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
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.absoluteFrequencySSBdl_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
absoluteFrequencySSBin case if you are not familiar with the low-level calculation. To obtain the correspondingdl_absoluteFrequencyPointA, subtract1272from theabsoluteFrequencySSBvalue.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
nrUE Console Trace
Note
When the connection is established, we can observe a new interface
oaitun_ue1in 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 commandifconfig. For this experiment, we assume that the IP obtained is10.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.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.135An example output of the ping command is shown below.
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.
Downlink Throughput: For measuring the throughput, we use the tool iperf. For the downlink throughput, follow the steps below.
Run the iperf server in the nrUE container using the following command. Remember to use the ip address of the
oaitun_ue1interface. In what follows, we assume the IP to be10.0.0.2.# iperf -s -i 1 -u -B 10.0.0.2Run the iperf client in the 5G core container. Remember to use the IP address of the
oaitun_ue1interface in nrUE after the-cflag. In what follows, we assume the UE IP to be10.0.0.2.# docker exec -it oai-ext-dn iperf -c 10.0.0.2 -u -b 10M --bind 192.168.70.135An example iperf trace at nrUE
Uplink Throughput: For the uplink, we need to run the iperf server at the 5G core and iperf client at the nrUE.
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.135Run iperf client in the nrUE container. Remember to use the IP address of the
oaitun_ue1interface at nrUE after the--bindflag. In what follows, we assume the UE IP to be10.0.0.2.# iperf -c 192.168.70.135 -u -b 2M --bind 10.0.0.2An example iperf trace at 5G Core