Commit 1cdfdcb4 authored by arora's avatar arora 🎤
Browse files

Demo editing

parent f5ad7fe1
......@@ -166,10 +166,14 @@ services:
ipv4_address: 192.168.70.135
networks:
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"
external:
name: demo-oai-public-net
# Incase the user wants docker-compose to create a bridge rather than creating the bridge manually then uncomment the below lines
# 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"
......@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.70.131
oai-amf:
container_name: "oai-amf"
image: oai-amf:multi-pdu
image: oai-amf:develop
environment:
- TZ=Europe/paris
- INSTANCE=0
......@@ -189,8 +189,11 @@ networks:
external:
name: demo-oai-public-net
# Incase the user wants docker-compose to create a bridge rather than creating the bridge manually then uncomment the below lines
# ipam:
# config:
# - subnet: 192.168.70.128/26
# driver_opts:
# com.docker.network.bridge.name: "demo-oai"
# 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"
FROM ubuntu:bionic
RUN apt update
RUN apt install -y iptables iproute2 iputils-ping
......@@ -14,16 +14,12 @@
# 1. Retrieve the correct network function branches #
* TODO Limited attach
* TODO4G SPGW-U as UPF
**CNF Name** | **Branch Name** | **Commit at time of writing** | Ubuntu 18.04 | RHEL8 |
------------ | -----------------------|--------------------------------------------| -------------| -------------- |
AMF | `develop` | `fb06701a29a964d9c9822d0eda3792208194519d` | X | Releasing Soon |
SMF | `develop` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | Releasing Soon |
NRF | `develop` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | Releasing Soon |
SPGW-U-TINY | `gtp_extension_header` | `f13f4a5e2807355d23f136119f85fbf48ed569ea` | X | Releasing Soon |
| CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 |
| ----------- |:----------------------- | ------------------------------------------ | ------------ | ---------------|
| AMF | `develop` | `82ca64fe8d79dbadbb1a495124ee26352f81bd7a` | X | Releasing soon |
| SMF | `develop` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | Releasing soon |
| NRF | `develop` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | Releasing soon |
| SPGW-U-TINY | `gtp_extension_header` | `f13f4a5e2807355d23f136119f85fbf48ed569ea` | X | Releasing soon |
```bash
$ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git
......
......@@ -15,24 +15,126 @@
**TABLE OF CONTENTS**
1. [Networking](#1-create-a-docker-bridged-network)
1. [Configure](#1-configure-the-containers)
2. [Deploy](#2-deploy-the-containers)
3. [Configure](#3-configure-the-containers)
3. [Networking](#3-networking)
# 1. Create a Docker Bridge Network #
# 1. Configure the containers #
- **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.**
```bash
$ docker network create --attachable --subnet 192.168.61.0/26 --ip-range 192.168.61.0/26 prod-oai-public-net
```
| File Name | Repository | Location |
|:----------- |:-------------------------------------------- |:--------------- |
| amf.conf | (Gitlab) cn5g/oai-cn5g-amf | [etc/amf.conf](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf/-/blob/develop/etc/amf.conf) |
| smf.conf | (Gitlab) cn5g/oai-cn5g-smf | [etc/smf.conf](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-smf/-/blob/develop/etc/smf.conf) |
| nrf.conf | (Gilab) cn5g/oai-cn5g-nrf | [etc/nrf.conf](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf/-/blob/develop/etc/nrf.conf) |
| spgw_u.conf | (Github) OPENAIRINTERFACE/openair-spgwu-tiny | [etc/spgw_u.conf](https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny/blob/gtp_extension_header/etc/spgw_u.conf) |
Once again we chose an **IDLE** IP range in our network. **Please change to proper value in your environment.**
- The PLMN, TAC, Operator Key should be properly configured in amf.conf according to gNB and UE
- In case of a COTS UE by default there are two PDN sessions so check the smf.conf to configure the right names for the IMS. Currently some parameters can not be configured via docker-compose.yaml. We recommend you directly configure them in the conf file and mount the file in the docker during run time.
```
## Configure here
DNN_LIST = (
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
{DNN_NI = <name-1>; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1},
{DNN_NI = <name-2>; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
{DNN_NI = <name-3>; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1}
);
## Configure here
LOCAL_CONFIGURATION :
{
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
{ NSSAI_SST = 222, NSSAI_SD = "123", DNN = "<name-1>", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"},
{ NSSAI_SST = 111; NSSAI_SD = "124", DNN = "<name-2>", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 7, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "10Mbps", SESSION_AMBR_DL = "11Mbps"}
);
};
```
- Incase NRF is not needed then it can be disabled in amf.conf,smf.conf and spgw_u.conf.
```
#smf.conf
REGISTER_NRF = "no"; # Set to yes if SMF resgisters to an NRF
DISCOVER_UPF = "no"; # Set to yes to enable UPF discovery and selection
#amf.conf
NF_REGISTRATION = "no"; # Set to yes if AMF resgisters to an NRF
SMF_SELECTION = "no"; # Set to yes to enable SMF discovery and selection
#spgw_u.conf
REGISTER_NRF = "no";
```
- An new user subscription information should present in mysql database before trying to connect the UE . This can be done by adding the UE information in the oai_db.sql file
```
replace the values with your values
INSERT INTO users VALUES
(imsi,msisdn,imei,NULL,'PURGED',50,40000000,100000000,47,0000000000,1,key,0,0,0x40,'ebd07771ace8677a',opc);
```
- **Optional**: Incase, the user subscription entry is missing from oai_db.sql file then it can be added at run time using below commands,
```bash
#Login to mysql container once the container is running
(docker-compose-host)$ docker exec -it mysql /bin/bash
(mysql-container)$ mysql -uroot -plinux -D oai_db
mysql> INSERT INTO users VALUES
(imsi,msisdn,imei,NULL,'PURGED',50,40000000,100000000,47,0000000000,1,key,0,0,0x40,'ebd07771ace8677a',opc);
```
# 2. Deploy the containers #
Container deployment has to follow a strict order if the `NRF` is used for `SMF` and `UPF` registration
mysql --> oai-nrf --> oai-amf --> oai-smf --> oai-upf
- Container deployment has to follow a strict order if the `NRF` is used for `SMF` and `UPF` registration
```
mysql --> oai-nrf --> oai-amf --> oai-smf --> oai-upf
```
- If no nrf then
```
mysql --> oai-amf --> oai-smf --> oai-upf
```
# 3. Networking #
- The [docker-compose.yaml](../docker-compose/docker-compose.yaml) can create the network automatically, currently in the file automatic network creation is disabled. It can be enabled by uncommenting the lines.
```bash
networks:
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"
```
- In user wants to create manual network then below is the command
# 3. Configure the containers #
components. To capture initial message exchange between smf<-->nrf<-->upf.
**TODO**
```bash
(docker-compose-host)$ docker network create \
--driver=bridge \
--subnet=192.168.70.128/26 \
-o "com.docker.network.bridge.name"="demo-oai" \
demo-oai-public-net
455631b3749ccd6f10a366cd1c49d5a66cf976d176884252d5d88a1e54049bc5
(docker-compose-host)$ ifconfig demo-oai
demo-oai: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.70.129 netmask 255.255.255.192 broadcast 192.168.70.191
ether 02:42:9c:0a:23:44 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
(docker-compose-host)$ docker network ls
NETWORK ID NAME DRIVER SCOPE
d2d34e05bb2d bridge bridge local
455631b3749c demo-oai-public-net bridge local
```
......@@ -12,16 +12,10 @@
</tr>
</table>
# Document Revision History
| Last Edited | Editor | Last Reviewed | Reviewer |
| ----------- | ----------- | ------------- | -------- |
| 2021/03/22 | Sagar Arora | -- | -- |
**Table of Contents**
1. [Pre-requisites](./DEPLOY_PRE_REQUESITES.md)
2. [Building the Docker Images](./BUILD_IMAGES.md)
3. [Configuring the Containers](./CONFIGURE_CONTAINERS.md)
4. [Running the Network Functions](./RUN_CNF.md)
5. [5G Core Network Standlone Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md)
\ No newline at end of file
4. [5G Core Network Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md)
\ No newline at end of file
......@@ -7,13 +7,13 @@
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OpenAirInterface 5G Core Network Standlone Deployment and Testing with dsTest</font></b>
<b><font size = "5">OpenAirInterface 5G Core Network Deployment and Testing with dsTest</font></b>
</td>
</tr>
</table>
![SA dsTest Demo](./images/5gCN.png)
![SA dsTest Demo](./images/5gCN.jpg)
**TABLE OF CONTENTS**
......@@ -26,6 +26,7 @@
7. [Executing dsTest Scenario](#7-executing-the-dstest-scenario)
8. [Analysing Scenario Results](#8-analysing-the-scenario-results)
9. [Demo Video](#9-demo-video)
10. [Note](#10-note)
## 1. Pre-requisites ##
......@@ -52,14 +53,14 @@ The new version of `wireshark` may not be available in the ubuntu repository so
| CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 |
| ----------- |:----------------------- | ------------------------------------------ | ------------ | ---------------|
| AMF | `multiple-pdu-sessions` | `3c59c6977ac8ecd943c3e77579cda84d4bb396e7` | X | Releasing soon |
| AMF | `develop` | `82ca64fe8d79dbadbb1a495124ee26352f81bd7a` | X | Releasing soon |
| SMF | `develop` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | Releasing soon |
| NRF | `develop` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | Releasing soon |
| SPGW-U-TINY | `gtp_extension_header` | `f13f4a5e2807355d23f136119f85fbf48ed569ea` | X | Releasing soon |
## 3. Configuring Host Machines ##
- The `docker-compose-host` machine needs to be configured with `demo-oai-public-net` bridge before deploying core network components. To capture initial message exchange between smf<-->nrf<-->upf. Though the bridge can be automatically created using docker-compose file if there is no need to capture initial packets.
- The `docker-compose-host` machine needs to be configured with `demo-oai-public-net` bridge before deploying core network components. To capture initial message exchange between smf<-->nrf<-->upf.
```bash
(docker-compose-host)$ docker network create \
......@@ -81,6 +82,21 @@ The new version of `wireshark` may not be available in the ubuntu repository so
d2d34e05bb2d bridge bridge local
455631b3749c demo-oai-public-net bridge local
```
- Optional, Though the bridge can be automatically created using docker-compose file if there is no need to capture initial packets. Uncomment the last lines of the [docker-compose.yaml](../docker-compose/docker-compose.yaml) or docker-compose-no-nrf.yaml. Else replace with below section
```
networks:
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"
```
- Optional, if the `docker-compose-host` machine is not configured with packet forwarding then it can be done using below command,
```bash
......@@ -113,14 +129,14 @@ The new version of `wireshark` may not be available in the ubuntu repository so
## 4. Configuring the OAI-5G Core Network Functions ##
- **Core Network Configuration**: The docker-compose file has configuration parameters of each core network component. The file is pre-configured with parameters related to this scenario. 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.
- **Core Network Configuration**: The docker-compose file has configuration parameters of each core network component. The file is pre-configured with parameters related to this scenario. 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 |
|:----------- |:-------------------------------------------- |:--------------- |
| amf.conf | (Gitlab) cn5g/oai-cn5g-amf | etc/amf.conf |
| smf.conf | (Gitlab) cn5g/oai-cn5g-smf | etc/smf.conf |
| nrf.conf | (Gilab) cn5g/oai-cn5g-nrf | etc/nrf.conf |
| spgw_u.conf | (Github) OPENAIRINTERFACE/openair-spgwu-tiny | etc/spgw_u.conf |
| amf.conf | (Gitlab) cn5g/oai-cn5g-amf | [etc/amf.conf](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf/-/blob/develop/etc/amf.conf) |
| smf.conf | (Gitlab) cn5g/oai-cn5g-smf | [etc/smf.conf](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-smf/-/blob/develop/etc/smf.conf) |
| nrf.conf | (Gilab) cn5g/oai-cn5g-nrf | [etc/nrf.conf](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf/-/blob/develop/etc/nrf.conf) |
| spgw_u.conf | (Github) OPENAIRINTERFACE/openair-spgwu-tiny | [etc/spgw_u.conf](https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny/blob/gtp_extension_header/etc/spgw_u.conf) |
- **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.
......@@ -171,9 +187,9 @@ The new version of `wireshark` may not be available in the ubuntu repository so
## 6. Deploying OAI 5g Core Network ##
- The core network is deployed using a bash script which is a wrapper around `docker-compose` and `docker` command.
- The core network is deployed using a [bash script](../docker-compose/core-network.sh) which is a wrapper around `docker-compose` and `docker` command.
- The script informs the user when the core-network is correctly configured by checking health status of containers and connectivity between different core network components.
- If the script is executed without any arguments then its usage can be seen
- If the script is executed without any arguments then the helper menu is visible
```bash
(docker-compose-host)$ pwd
......@@ -280,14 +296,14 @@ This section is subdivided in two parts the first part for analysing the message
| Pcap/log files |
| -------------------- |
| 5gcn-deployment.pcap |
| dsTestscenario.pcap |
| amf.log |
| smf.log |
| nrf.log |
| spgwu.log |
| Pcap/log files |
|:----------------------------------------------------------------- |
| [5gcn-deployment.pcap](./results/pcap/5gcn-deployment.pcap) |
| [scenario-execution.pcap](./results/pcap/scenario-execution.pcap) |
| [amf.log](./results/logs/amf.log) |
| [smf.log](./results/logs/smf.log) |
| [nrf.log](./results/logs/nrf.log) |
| [spgwu.log](./results/logs/spgwu.log) |
### Analysing initial message exchange
......@@ -306,7 +322,7 @@ Using wireshark open 5gcn-deployment.pcap use the filter http || pfcp
### Analysing scenario execution
Using wireshark open scenario.pcap use the filter ngap || http || pfcp || gtp
Using wireshark open scenario-execution.pcap use the filter ngap || http || pfcp || gtp
- NG Setup request reponse: Packet 19,21
- Initial UE Message registration request: Packet 23
......@@ -328,7 +344,14 @@ Using wireshark open scenario.pcap use the filter ngap || http || pfcp || gtp
![Scenario execution 2](./images/scenario-2.png)
## 9. Demo Video ##
- Releasing soon on OAI youtube channel, don't miss it
## 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.
- 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 script you can directly deploy using `docker-compose` command
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment