Skip to content

Commit

Permalink
doc: update readme of open5gs sample deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog-spb authored and pirog-spb committed Jan 31, 2025
1 parent 8101095 commit 54ed069
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 97 deletions.
75 changes: 24 additions & 51 deletions docs/deployments/open5gs-compose/README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,38 @@
# open5gs-compose

# install docker, docker-compose
This deployment starts Open5gs 5G mobile core with eUPF and UERANSIM using docker-compose.

https://docs.docker.com/engine/install/

# configure docker daemon for disable iptables

https://docs.docker.com/network/packet-filtering-firewalls/#prevent-docker-from-manipulating-iptables

# create network for containers

```
docker network create \
--driver=bridge \
--subnet=172.20.0.0/24 \
--gateway=172.20.0.1 \
-o "com.docker.network.bridge.name"="br-open5gs-main" \
open5gs-main
sudo ethtool -K br-open5gs-main tx off
```

<details><summary><i> Here we turn off tx offload to avoid TCP checksum error in internal packets for iperf tests.</summary>
<p>

Apparently, checksum offloading is enabled by default and the kernel postpones csum calculation until the last moment, expecting csum to be calculated in the driver when the packet is sent. But we have a virtual environment and the packet eventually goes to the GTP tunnel on UPF. Obviously, this is the reason why csum is not calculated correctly.

However, if we disable offloading, the checksum is calculated immediately on iperf and everything works.
</p>
</details>
## 1. Install docker, docker-compose

<!---
# configure firewall
`bash fw.sh`
--><br>
# To run multiple iperf servers, use this command

`sudo apt install iperf3`

`for i in $(seq 5201 5208); do (iperf3 -s -p $i &) ; done`

# start Open5GS

1. pull all docker images
https://docs.docker.com/engine/install/

docker-compose pull
## 2. Start services

2. start services
Run `docker-compose up -d`

docker-compose up -d
## 3. Verify environment up and running

# run iperf tests
Run `docker-compose logs ue` and check UE logs.

1. run iperf test in every UERANSim containers
If UE have successfully connected you'll see message like below:

`make test`
```
[2025-01-31 15:09:30.550] [app] [info] Connection setup for PDU session[1] is successful, TUN interface[uesimtun0, 10.46.0.2] is up.
```

when test ended, you can see reports in directory `.deploy/docker/local-data/iperf`
## 4. Test UE connectivity

# stop and remove all containers
Fall into UE container `docker-compose exec ue bash`.

`make clean`
And use `uesimtun0` interface to send packets via it:

`docker network rm open5gs-main`
```
# ping -I uesimtun0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.46.0.2 uesimtun0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=15.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=15.2 ms
...
curl --interface uesimtun0 -vv http://google.com
...
```
46 changes: 0 additions & 46 deletions docs/deployments/open5gs-compose/fw.sh

This file was deleted.

0 comments on commit 54ed069

Please sign in to comment.