diff --git a/openairinterface5g/openairinterface-install-scripts/README.md b/openairinterface5g/openairinterface-install-scripts/README.md index 7152763ff9634c5ff7c3d1e3e95a661503049ef9..db65fb64a53a3bb30a37bd73e25402dd7b125222 100644 --- a/openairinterface5g/openairinterface-install-scripts/README.md +++ b/openairinterface5g/openairinterface-install-scripts/README.md @@ -86,9 +86,7 @@ In a Linux Terminal, follow the steps below: ## 5G RAN Installation ## Objectives -- Install and configure the OAI gNB -- Deploy a gNB together a previous configured 5GC -- Inspect gNB status in 5GC Core +- Install the OAI gNB ## gNB Installation @@ -100,8 +98,6 @@ To install OAI RAN 5G, go back for /home/$your user$ and follow this tutorial. > > cd /home/$your user$ -## 5G RAN Installation - **Step 1:** Install dependencies > sudo add-apt-repository ppa:ettusresearch/uhd @@ -141,7 +137,7 @@ sudo dpkg -i --force-overwrite /var/cache/apt/archives/libuhd4.6.0_4.6.0.0-0ubun ## RIC Installation (FlexRIC) ## Objectives -- Install and configure the gNB and FlexRIC +- Install the FlexRIC To install OAI FlexRIC, go back to /home/$your user$ and follow this tutorial. @@ -188,11 +184,108 @@ To install OAI FlexRIC, go back to /home/$your user$ and follow this tutorial. > > sudo make install -## Deployment +## UE 1 Configurations + +## Objectives +- Configure the OAI UE 1 + +**Step 1:** Creating a namespace: + +> sudo ip netns add oai-ue1 + +**Step 2:** Creating a pair of virtual interfaces (veth): + +> sudo ip link add veth0 type veth peer name veth1 + +**Step 3:** Moving one interface to the created namespace: + +> sudo ip link set veth1 netns oai-ue1 + +**Step 4:** Configuring an IP address for veth0 interface: + +> sudo ip addr add 192.168.1.1/24 dev veth0 + +**Step 5:** Configuring an IP address for veth1 interface within the namespace: + +> sudo ip netns exec oai-ue1 ip addr add 192.168.1.2/24 dev veth1 + +**Step 6:** Bringing up the veth0 interface: + +> sudo ip link set veth0 up + +**Step 7:** Bringing up the veth1 interface within the namespace: + +> sudo ip netns exec oai-ue1 ip link set veth1 up + +**Step 8:** Adding a route within the namespace: + +> sudo ip netns exec oai-ue1 ip route add 192.168.70.0/24 via 192.168.1.1 dev veth1 + +**Step 9:** Enabling packet forwarding within the namespace: + +> sudo ip netns exec oai-ue1 sysctl net.ipv4.conf.all.forwarding=1 + +**Step 10:** Setting default policy for packet forwarding within the namespace to ACCEPT:: + +> sudo ip netns exec oai-ue1 iptables -P FORWARD ACCEPT + +## UE 2 Configurations + +## Objectives +- Configure the OAI UE 2 + +**Step 1:** Creating a namespace: + +> sudo ip netns add oai-ue2 + +**Step 2:** Creating a pair of virtual interfaces (veth): + +> sudo ip link add veth1 type veth peer name veth2 + +**Step 3:** Moving one interface to the created namespace: + +> sudo ip link set veth2 netns oai-ue2 + +**Step 4:** Configuring an IP address for veth1 interface: + +> sudo ip addr add 192.168.1.1/24 dev veth1 + +**Step 5:** Configuring an IP address for veth1 interface within the namespace: + +> sudo ip netns exec oai-ue2 ip addr add 192.168.1.2/24 dev veth2 + +**Step 6:** Bringing up the veth1 interface: + +> sudo ip link set veth1 up -For this task, open another terminal using crtl+Alt+T. +**Step 7:** Bringing up the veth1 interface within the namespace: -**Step 1:** Core deployment +> sudo ip netns exec oai-ue2 ip link set veth2 up + +**Step 8:** Adding a route within the namespace: + +> sudo ip netns exec oai-ue2 ip route add 192.168.70.0/24 via 192.168.1.1 dev veth2 + +**Step 9:** Enabling packet forwarding within the namespace: + +> sudo ip netns exec oai-ue2 sysctl net.ipv4.conf.all.forwarding=1 + +**Step 10:** Setting default policy for packet forwarding within the namespace to ACCEPT:: + +> sudo ip netns exec oai-ue2 iptables -P FORWARD ACCEPT + +**Step 11:** Copy the UE file: + +> cp /home/$your user$/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf /home/$your user$/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue2.conf + +## Deployments + +## Objectives +- Deploy 5GC, 5G RAN, FlexRIC and OAI UE + +Use a separate terminal for each of the following steps. + +**Step 1:** Core deployment? > cd /home/$your user$/oai-cn5g-fed/docker-compose > @@ -203,4 +296,50 @@ Expected result: After running the above command, nine containers are expected to be in the "Up (healthy)" state as shown in figure below. - \ No newline at end of file + + +**Step 2:** FlexRIC deployment: + +> cd flexric/ +> +> ./build/examples/ric/nearRT-RIC + +After running the above command the expect result is shown in figure below. + + + +**Step 3:** gNB deployment: + +**Attention:** You must have Core 5G up and running + +**Step 3.1:** gNB deploy: + +> sudo su +> +> cd /home/$your user$/openairinterface5g/cmake_targets/ran_build/build/ +> +> sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --continuous-tx + +**Step 3.2**: To check the connection of gNodeB to the Core, see AMF logs. Open a terminal and use the command below: + +> docker logs -f oai-amf + +The expected return is shown in figure below, where gNodeB shows the connected status. + + + +**Step 4:** UE 1 deployment: + +> sudo ip netns exec oai-ue1 bash +> +> cd /home/$your user$/openairinterface5g/cmake_targets/ran_build/build/ +> +> sudo RFSIMULATOR=192.168.1.2 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf + +**Step 5:** UE 2 deployment: + +> sudo ip netns exec oai-ue2 bash +> +> cd /home/$your user$/openairinterface5g/cmake_targets/ran_build/build/ +> +> sudo RFSIMULATOR=192.168.1.2 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue2.conf