Skip to content
Snippets Groups Projects
Commit 97232d78 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

chore(doc): synchronizing again and adding logs from ext-dn container

parent 1dd2fad5
No related branches found
No related tags found
1 merge request!139chore(ci): merging UPF-based tutorials and documentations to develop
...@@ -218,7 +218,6 @@ smf: ...@@ -218,7 +218,6 @@ smf:
upf: upf:
support_features: support_features:
enable_bpf_datapath: yes # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off enable_bpf_datapath: yes # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off
enable_snat: yes # If "on": Source natting is done for UE, DEFAULT= off
remote_n6_gw: oai-ext-dn remote_n6_gw: oai-ext-dn
upf_info: upf_info:
sNssaiUpfInfoList: sNssaiUpfInfoList:
......
...@@ -16,6 +16,7 @@ Welcome to the tutorial home page of the OAI 5g Core project. Here you can find ...@@ -16,6 +16,7 @@ Welcome to the tutorial home page of the OAI 5g Core project. Here you can find
- [Configuring the Containers](./CONFIGURATION.md) - [Configuring the Containers](./CONFIGURATION.md)
- 5G Core Network Deployment - 5G Core Network Deployment
- [Using Docker-Compose, perform a `basic` deployment](./DEPLOY_SA5G_BASIC_DEPLOYMENT.md) - [Using Docker-Compose, perform a `basic` deployment](./DEPLOY_SA5G_BASIC_DEPLOYMENT.md)
- [Using Docker-Compose, perform a `basic` deployment with `eBPF` implementation of UPF](./DEPLOY_SA5G_WITH_UPF_EBPF.md)
- [Using Docker-Compose, perform a `basic-vpp` deployment with `VPP` implementation of UPF](./DEPLOY_SA5G_WITH_VPP_UPF.md) - [Using Docker-Compose, perform a `basic-vpp` deployment with `VPP` implementation of UPF](./DEPLOY_SA5G_WITH_VPP_UPF.md)
- [Using Docker-Compose, perform a `basic` deployment with `SD-Fabric` implementation of UPF](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-sdfabric/-/wikis/Deployment-using-Docker) - [Using Docker-Compose, perform a `basic` deployment with `SD-Fabric` implementation of UPF](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-sdfabric/-/wikis/Deployment-using-Docker)
- [Using Docker-Compose, perform a `basic` deployment with Static UE IP address allocation](./DEPLOY_SA5G_BASIC_STATIC_UE_IP.md) - [Using Docker-Compose, perform a `basic` deployment with Static UE IP address allocation](./DEPLOY_SA5G_BASIC_STATIC_UE_IP.md)
...@@ -31,6 +32,7 @@ Welcome to the tutorial home page of the OAI 5g Core project. Here you can find ...@@ -31,6 +32,7 @@ Welcome to the tutorial home page of the OAI 5g Core project. Here you can find
- [Using Docker-Compose, perform a `basic` Traffic Redirection deployment and test with `gnbsim`](./DEPLOY_SA5G_REDIRECTION.md) - [Using Docker-Compose, perform a `basic` Traffic Redirection deployment and test with `gnbsim`](./DEPLOY_SA5G_REDIRECTION.md)
- [Using Docker-Compose, perform a `basic` Traffic Steering deployment and test with `gnbsim`](./DEPLOY_SA5G_STEERING.md) - [Using Docker-Compose, perform a `basic` Traffic Steering deployment and test with `gnbsim`](./DEPLOY_SA5G_STEERING.md)
- [Using Docker-Compose, perform a `basic` UL/CL deployment and test with `gnbsim`](./DEPLOY_SA5G_ULCL.md) - [Using Docker-Compose, perform a `basic` UL/CL deployment and test with `gnbsim`](./DEPLOY_SA5G_ULCL.md)
- [Using Docker-Compose, test the 5G Network Data Analytics Function](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nwdaf/-/blob/master/docs/TUTORIAL.md)
- Connecting a real RAN to OAI 5G Core Network - Connecting a real RAN to OAI 5G Core Network
- [Network Considerations](./NETWORK_CONSIDERATIONS.md) - [Network Considerations](./NETWORK_CONSIDERATIONS.md)
- The Developers Corner - The Developers Corner
......
...@@ -113,6 +113,11 @@ For CI purposes, we are deploying with an automated PCAP capture on the docker n ...@@ -113,6 +113,11 @@ For CI purposes, we are deploying with an automated PCAP capture on the docker n
``` shell ``` shell
docker-compose-host $: python3 core-network.py --type start-basic --scenario 1 --capture /tmp/oai/static-ue-ip/static-ue-ip.pcap docker-compose-host $: python3 core-network.py --type start-basic --scenario 1 --capture /tmp/oai/static-ue-ip/static-ue-ip.pcap
```
<details>
<summary>The output will look like this:</summary>
``` console
[2023-07-13 13:04:33,447] root:DEBUG: Starting 5gcn components... Please wait.... [2023-07-13 13:04:33,447] root:DEBUG: Starting 5gcn components... Please wait....
[2023-07-13 13:04:34,163] root:DEBUG: docker-compose -f docker-compose-basic-nrf.yaml up -d mysql [2023-07-13 13:04:34,163] root:DEBUG: docker-compose -f docker-compose-basic-nrf.yaml up -d mysql
Creating network "demo-oai-public-net" with driver "bridge" Creating network "demo-oai-public-net" with driver "bridge"
...@@ -174,6 +179,7 @@ oai-upf /openair-smf/bin/oai_upf - ... Up (healthy) 2152/udp, 8080/tcp, ...@@ -174,6 +179,7 @@ oai-upf /openair-smf/bin/oai_upf - ... Up (healthy) 2152/udp, 8080/tcp,
[2023-07-13 13:07:00,865] root:DEBUG: SMF is receiving heartbeats from UPF.... [2023-07-13 13:07:00,865] root:DEBUG: SMF is receiving heartbeats from UPF....
[2023-07-13 13:07:00,866] root:DEBUG: OAI 5G Core network is configured and healthy.... [2023-07-13 13:07:00,866] root:DEBUG: OAI 5G Core network is configured and healthy....
``` ```
</details>
- Without nrf scenario - Without nrf scenario
...@@ -265,16 +271,27 @@ docker-compose-host $: docker logs gnbsim > /tmp/oai/static-ue-ip/gnbsim.log 2>& ...@@ -265,16 +271,27 @@ docker-compose-host $: docker logs gnbsim > /tmp/oai/static-ue-ip/gnbsim.log 2>&
``` shell ``` shell
docker-compose-host $: docker-compose -f docker-compose-gnbsim.yaml down -t 0 docker-compose-host $: docker-compose -f docker-compose-gnbsim.yaml down -t 0
```
<details>
<summary>The output will look like this:</summary>
``` console
Stopping gnbsim ... done Stopping gnbsim ... done
Found orphan containers (oai-nrf, oai-ausf, oai-smf, oai-udr, oai-upf, mysql, oai-amf, oai-udm, oai-ext-dn) for this project. Found orphan containers (oai-nrf, oai-ausf, oai-smf, oai-udr, oai-upf, mysql, oai-amf, oai-udm, oai-ext-dn) for this project.
Removing gnbsim ... done Removing gnbsim ... done
Network demo-oai-public-net is external, skipping Network demo-oai-public-net is external, skipping
``` ```
</details>
### 7.2. Undeploy the core network ### 7.2. Undeploy the core network
``` shell ``` shell
docker-compose-host $: python3 core-network.py --type stop-basic --scenario 1 docker-compose-host $: python3 core-network.py --type stop-basic --scenario 1
```
<details>
<summary>The output will look like this:</summary>
``` console
[2023-07-13 13:07:54,271] root:DEBUG: UnDeploying OAI 5G core components.... [2023-07-13 13:07:54,271] root:DEBUG: UnDeploying OAI 5G core components....
[2023-07-13 13:07:54,272] root:DEBUG: docker-compose -f docker-compose-basic-nrf.yaml down -t 0 [2023-07-13 13:07:54,272] root:DEBUG: docker-compose -f docker-compose-basic-nrf.yaml down -t 0
Removing oai-upf ... Removing oai-upf ...
...@@ -299,6 +316,7 @@ Removing network demo-oai-public-net ...@@ -299,6 +316,7 @@ Removing network demo-oai-public-net
[2023-07-13 13:07:55,711] root:DEBUG: OAI 5G core components are UnDeployed.... [2023-07-13 13:07:55,711] root:DEBUG: OAI 5G core components are UnDeployed....
``` ```
</details>
- If you replicate then your log files and pcap file will be present in `/tmp/oai/static-ue-ip/`. If you want to compare it with our provided logs and pcaps, then follow the next section - If you replicate then your log files and pcap file will be present in `/tmp/oai/static-ue-ip/`. If you want to compare it with our provided logs and pcaps, then follow the next section
......
...@@ -341,20 +341,25 @@ nfs: ...@@ -341,20 +341,25 @@ nfs:
port: 38412 port: 38412
``` ```
We have used the values 505 & 01, and 0x0a000 for respectively mnc & mcc, and gNB tracking area code (tac) We have used the values 208 & 01, and 0x0a000 for respectively mnc & mcc, and gNB tracking area code (tac)
```console ```console
$ cat conf/basic_nrf_config_ebpf.yaml $ cat conf/basic_nrf_config_ebpf.yaml
amf: amf:
served_guami_list: served_guami_list:
- mcc: 505 - mcc: 208
mnc: 95
amf_region_id: 01
amf_set_id: 001
amf_pointer: 01
- mcc: 001
mnc: 01 mnc: 01
amf_region_id: 80 amf_region_id: 01
amf_set_id: 001 amf_set_id: 001
amf_pointer: 01 amf_pointer: 01
plmn_support_list: plmn_support_list:
- mcc: 505 - mcc: 208
mnc: 01 mnc: 95
tac: 0xa000 tac: 0xa000
nssai: nssai:
- *embb_slice1 - *embb_slice1
...@@ -365,7 +370,7 @@ amf: ...@@ -365,7 +370,7 @@ amf:
### iii. UPF ### iii. UPF
__Note:__ in case you are deploying the UPF as Docker container, please update the reference points `N3` and `N6` accordingly. __Note:__ in case you are deploying the UPF as Docker container, please update the reference points `N3` and `N6` accordingly.
In this tutorial, the UPF is deployed as a standalone application on a bare-metal machine dedicated for this usage. There will be a docker version for the UPF and this tutorial will be updated. In this tutorial, the UPF is deployed as a standalone application on a bare-metal machine dedicated for this usage. But you can also deploy it in a docker container (but in host-mode).
...@@ -376,6 +381,8 @@ In this context, we need at least two eBPF programs, one for N3 and another for ...@@ -376,6 +381,8 @@ In this context, we need at least two eBPF programs, one for N3 and another for
On the other hand, disntinguishing the network interface used for the N4 traffic from the N3 and N6 interfaces is also needed. Indeed, N3 and N6 interfaces are linked to XDP programs that filter all traffic according to specific PDR rules. Additionally, it's worth noting that PFCP traffic does not match these PDR rules, hence if this kind of traffic goes throw network interface handeling N3 or N6 traffic, it will be droped. On the other hand, disntinguishing the network interface used for the N4 traffic from the N3 and N6 interfaces is also needed. Indeed, N3 and N6 interfaces are linked to XDP programs that filter all traffic according to specific PDR rules. Additionally, it's worth noting that PFCP traffic does not match these PDR rules, hence if this kind of traffic goes throw network interface handeling N3 or N6 traffic, it will be droped.
#### If you are deploying on bare-metal: the configuration file should look this with `enx00e04c6808f6` and `enx00e04c680455` being 2 physical network interfaces on your server: ####
```console ```console
$ cat conf/basic_nrf_config_ebpf.yaml $ cat conf/basic_nrf_config_ebpf.yaml
nfs: nfs:
...@@ -390,6 +397,22 @@ nfs: ...@@ -390,6 +397,22 @@ nfs:
interface_name: enx00e04c680455 interface_name: enx00e04c680455
``` ```
#### If you are deploying in a container in host-mode (as in the documentated version in git) : the configuration file should look this: ####
```console
$ cat conf/basic_nrf_config_ebpf.yaml
nfs:
upf:
n3:
interface_name: demo-n3
port: 2152
n4:
interface_name: demo-oai
port: 8805
n6:
interface_name: demo-n6
```
```console ```console
$ cat conf/basic_nrf_config_ebpf.yaml $ cat conf/basic_nrf_config_ebpf.yaml
upf: upf:
...@@ -397,12 +420,6 @@ upf: ...@@ -397,12 +420,6 @@ upf:
enable_bpf_datapath: yes # If "on": eBPF is used as datapath enable_bpf_datapath: yes # If "on": eBPF is used as datapath
# else simpleswitch is used, # else simpleswitch is used,
# DEFAULT= off # DEFAULT= off
enable_snat: no # If "on": Source natting is done for UE,
# DEFAULT= off,
# NB: "on" is not yet implemented withing the UPF,
# However, we use the external gateway for SNAT.
remote_n6_gw: oai-ext-dn # Dummy host used for bridging and snating remote_n6_gw: oai-ext-dn # Dummy host used for bridging and snating
upf_info: upf_info:
sNssaiUpfInfoList: sNssaiUpfInfoList:
...@@ -424,7 +441,6 @@ For the first release of the UPF-eBPF we are using a gateway that has two roles: ...@@ -424,7 +441,6 @@ For the first release of the UPF-eBPF we are using a gateway that has two roles:
upf: upf:
support_features: support_features:
enable_bpf_datapath: yes # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off enable_bpf_datapath: yes # If "on": BPF is used as datapath else simpleswitch is used, DEFAULT= off
enable_snat: no # If "on": Source natting is done for UE, DEFAULT= off
remote_n6_gw: oai-ext-dn remote_n6_gw: oai-ext-dn
``` ```
...@@ -451,6 +467,66 @@ For the first release of the UPF-eBPF we are using a gateway that has two roles: ...@@ -451,6 +467,66 @@ For the first release of the UPF-eBPF we are using a gateway that has two roles:
docker-compose-host $: sudo iptables -t nat -A POSTROUTING -o enp53s0 -s 12.1.1.0/24 -j SNAT --to 172.21.19.56 docker-compose-host $: sudo iptables -t nat -A POSTROUTING -o enp53s0 -s 12.1.1.0/24 -j SNAT --to 172.21.19.56
``` ```
If you look at the `host-mode` example, do the following command after you've deployed (after section 6.1):
``` console
$ docker logs oai-ext-dn
1. Disable TCP Checksum on N6 interface (eth1):
Actual changes:
tx-checksumming: off
tx-checksum-ip-generic: off
tx-checksum-sctp: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-ecn-segmentation: off [requested on]
tx-tcp-mangleid-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]
2. Setup MTU (1460) on N6 interface (eth1):
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 192.168.72.135 netmask 255.255.255.192 broadcast 192.168.72.191
ether 02:42:c0:a8:48:87 txqueuelen 0 (Ethernet)
RX packets 4 bytes 396 (396.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
3. Add a route to UE subnet (12.1.1.0/24) via UPF N6 interface (192.168.72.129):
4. Disable the useless N3 interface (eth0):
5. Update the default route:
Delete the default route: default
RTNETLINK answers: No such process
Sgi interface is eth2
default via 192.168.70.129 dev eth2
12.1.1.0/24 via 192.168.72.129 dev eth1
192.168.70.128/26 dev eth2 proto kernel scope link src 192.168.70.135
192.168.72.128/26 dev eth1 proto kernel scope link src 192.168.72.135
6. Add SNAT rule to allow UE traffic to reach the internet:
Done setting the configuration
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Gateway Has the following configuration :
+---------------+
| |
(UPF)----------| OAI-EXT-GW |----------- (Internet)
N6 | | Sgi
+---------------+
GW N6 Interface ----------------: (Ifname, IPv4, MTU) = (eth1, 192.168.72.135, 1460)
GW Sgi Interface ---------------: (Ifname, IPv4, MTU) = (eth2, 192.168.70.135, 1500)
GW Default Route ---------------: default via 192.168.70.129 dev eth2
Route to UE --------------------: 12.1.1.0/24 via 192.168.72.129 dev eth1
Iptables Postrouting -----------: SNAT all -- 12.1.1.0/24 anywhere to:192.168.70.135
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
```
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment