-**Core Network Configuration**: The [docker-compose](../docker-compose/docker-compose.yaml) file has configuration parameters of all the core network components. The file is pre-configured with parameters related to an [example scenario](./DEPLOY_SA5G_WITH_DS_TESTER.md). The table contains the location of the configuration files. These files contains allowed configurable parameters. **Keep checking this file it is possible that we will add new parameters for new features.**
| File Name | Repository | Location |
...
...
@@ -99,6 +100,82 @@
# 3. Networking #
- The [docker-compose.yaml](../docker-compose/docker-compose.yaml) will create the network automatically.
## 3.1. Automatic docker network deployment. ##
The [docker-compose.yaml](../docker-compose/docker-compose.yaml) will create the network automatically. The bottom section of the file SHALL look like this:
```bash
networks:
# public_net:
# external:
# name: demo-oai-public-net
public_net:
driver: bridge
name: demo-oai-public-net
ipam:
config:
- subnet: 192.168.70.128/26
driver_opts:
com.docker.network.bridge.name: "demo-oai"
```
## 3.2. Manual docker network deployment. ##
At the deployment, if you want to capture initial transactions between the CN5G components, you will have to manually create the network.
First edit [docker-compose.yaml](../docker-compose/docker-compose.yaml) to look like this:
Welcome to the tutorial home page of OAI 5g Core project. Here you can find lot of tutorials and help manuals. We regularly update these documents depending on the new feature set.
**2021/07/27 Update: you have now the choice to either pull images or build your-self.**
**Table of Contents**
1.[Pre-requisites](./DEPLOY_PRE_REQUESITES.md)
2.[Building the Container Images](./BUILD_IMAGES.md)
2. Getting the images
1.[Retrieving the Container Images](./RETRIEVE_OFFICIAL_IMAGES.md)
2.[Building the Container Images](./BUILD_IMAGES.md)
3.[Configuring the Containers](./CONFIGURE_CONTAINERS.md)
4.[Tutorial: 5G Core Network Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md)
5.[Tutorial: 5G Core Network Deployment using Helm Charts](./DEPLOY_SA5G_HC.md)
This tutorial will help in understanding how to deploy OAI core network using docker-compose. In this tutorial we have used [dsTest](https://www.developingsolutions.com/products/dstest-5g-core-network-testing/) a commercial paid gNB emulator. Though instead of this readers can also use gNBsim (an opensource gNB emulator), you can follow another tutorial for [this](./DEPLOY_SA5G_WITH_GNBSIM.md). Please follow the tutorial step by step to create a stable working testbed.
**Reading time: ~20mins**
**Tutorial replication time: ~1hr**
Note: In case readers are interested in deploying debuggers/developers core network environment with more logs please follow [this tutorial](./DEBUG_5G_CORE.md)
@@ -45,44 +55,122 @@ The requried softwares and their respected versions are listed below. To replica
| tshark | 3.4.4 (Git commit c33f6306cbb2) |
| wireshark | 3.4.4 (Git commit c33f6306cbb2) |
The new version of `wireshark` may not be available in the ubuntu repository so it is better to build it from source.
The new version of `wireshark` may not be available in the ubuntu repository so it is better to build it from source.
Most of the times the `docker-compose-host` machine is not configured with packet forwarding then it can be done using below command (if you have already done it in any other section then don't repeat).
To know how to configure the machine with the above requirements vist [pre-requisites](./DEPLOY_PRE_REQUESITES.md) page.
**This is the most important step towards end-to-end connectivity.**
- In this demo the image tags and commits which were used are listed below, follow the [Building images](./BUILD_IMAGES.md) to build images with below tags.
To know how to configure the machine with the above requirements vist [pre-requisites](./DEPLOY_PRE_REQUESITES.md) page.
| CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 |
- In this demo the network function branch and tags which were used are listed below, follow the [Retrieving images](./RETRIEVE_OFFICIAL_IMAGES.md) or the [Building images](./BUILD_IMAGES.md) to build images with below tags.
| CNF Name | Branch Name | Tag | Ubuntu 18.04 | RHEL8 (UBI8) |
- In case readers are interested in making images using different branch then **they have to build images from scratch they can't use the docker-hub images**.
## 3. Configuring Host Machines ##
- The `docker-compose-host` machine will be configured with `demo-oai-public-net` bridge automatically using [docker-compose.yaml](../docker-compose/docker-compose.yaml) at the time of deploying core network components. And also for each component it will start capturing `pcap` messages and stores it on the `/tmp/` location of that container. Use the below command as shown as an example.
All the network functions are connected using `demo-oai` bridge.
There are two ways to create this bridge either manually or automatically using docker-compose.
* The manual version will allow packet capturing while network functions are getting deployed. So the initial tested setup packets can be captured for debugging purposes or checking if network functions registered properly to NRF.
* The second option of automatic deployment is good when initial packet capture is not important.
**NOTE** This tutorial needs that the bridge is created manually to analyse NRF packet exchange.
### 3.1 Creating bridge manually
- The bottom section of [docker-compose file](../docker-compose/docker-compose.yaml) SHALL look like this:
```
networks:
public_net:
external:
name: demo-oai-public-net
# public_net:
# driver: bridge
# name: demo-oai-public-net
# ipam:
# config:
# - subnet: 192.168.70.128/26
# driver_opts:
# com.docker.network.bridge.name: "demo-oai"
```
- The `docker-compose-host` machine needs to be configured with `demo-oai` bridge before deploying core network components. To capture initial message exchange between smf<-->nrf<-->upf.
- The `dsTest-host` needs to configured with a route to reach `docker-compose-host`. Assuming `dsTest-host` physical interface which is connected with `docker-compose-host` is NIC1 and the ip-address of this interface is IP_ADDR_NIC1 then,
```bash
(dsTest-host)$ sudo ip route add route \
192.168.70.128/26 via IP_ADDR_NIC1\
dev NIC1_NAME
(dsTest-host)$ sudo ip route add route 192.168.70.128/26 \
via IP_ADDR_NIC1\
dev NIC1_NAME
```
- To verify ping the ip-address of the `docker-compose-host` interface connected to demo-oai-public-net bridge,
- To verify ping the ip-address of the `docker-compose-host` interface connected to demo-oai bridge, if possible also ping amf from the dsTest-host machine.
```bash
(dsTest-host)$ ping 192.168.70.129
...
...
@@ -110,7 +198,7 @@ To know how to configure the machine with the above requirements vist [pre-requi
-**User Subscprition Profile**: The dsTest UE which will request for a PDU session will have this user profile. Verify that this entry is present in the oai_db.sql file located in docker-compose/oai-db.sql.
-**User Subscprition Profile**: The dsTest UE which will request for a PDU session will have this user profile. Verify that this entry is present in the oai_db.sql file located in [docker-compose/oai-db.sql](../docker-compose/oai_db.sql).
```
IMSI - 208950000000031
...
...
@@ -166,7 +254,7 @@ To know how to configure the machine with the above requirements vist [pre-requi
@@ -335,10 +421,11 @@ Using wireshark open scenario-execution.pcap use the filter ngap || http || pfcp
## 10. Notes ##
- The `oai-ext-dn` container is optional and is only required if the user wants to ping the dsTest UE. In general this container is not required except for testing purposes.
- There is a possibility to perform the same test or setup the core network without nrf by using `docker-compose/docker-compose-no-nrf.yaml`. Check the configuration before using the compose file.
- There is a possibility to perform the same test or setup the core network without nrf by using `docker-compose/docker-compose-no-nrf.yaml`[file](../docker-compose/docker-compose-no-nrf.yaml). Check the configuration before using the compose file.
- This tutorial can be taken as reference to test the OAI 5G core with a COTS UE. The configuration files has to be changed according to the gNB and COTS UE information should be present in the mysql database.
- Generally, in a COTS UE two PDN sessions are created by default so configure the IMS in SMF properly. Currently some parameters can not be configured via [docker-compose.yaml](../docker-compose/docker-compose.yaml). We recommend you directly configure them in the conf file and mount the file in the docker during run time.
- Its not necessary to use [core-network.sh](../docker-compose/core-network.sh) bash script, it is possible to directly deploy using `docker-compose` command
- In case you want to deploy debuggers/developers core network environment with more logs please follow [this tutorial](./DEBUG_5G_CORE.md)
Note: In case readers are interested in deploying debuggers/developers core network environment with more logs please follow [this tutorial](./DEBUG_5G_CORE.md)
**CAUTION: the vpp-upf repository is stil not public.**

**Reading time: ~ 30mins**
**Tutorial replication time: ~ 1h30mins**
Note: In case readers are interested in deploying debuggers/developers core network environment with more logs please follow [this tutorial](./DEBUG_5G_CORE.md)