Skip to content

zbh888/free5gc-compose

Repository files navigation

free5GC compose

From Bohan:

The base file (free5gc) is included in this repo.

To compile after changing the base file, one can simply call ./compile.sh

Then running the testbed only requires ./run.sh and the logs will be saved.

ENV Setup:

python: (As we use python interface to act as UDM to deploy contract, transactions, some lib is required in python)

pip install web3

pip install eth-account

golang: You don't need to worry about this, the required module is included in this repo.

Some valid blockchain key paris

0xA2911d7Af5b6277DDE54c89A5D94B793Ddf5c606: 90ab495f84b564dd52a5e3e30ec3164cee3938de5846fcd76b165445d5928ad9

0x1dff2866663a164cb9f9458c20bb16cee477e00a63d659c88d6ef697c05362b422953d1fef36c631640cf07504976e21bfcc662578e7ad8175562638f9135d7800 (signature of "hello", bad one)

0xDd115D0d6fb0D1b68CA3B0C993c40a62d65610b8: 611e07e0e2b27905b5e8442da7d604a2f71c1f1158cc6a68d2e268443d5454d3

0xd7d452ab38141df051699a54096f9b98c8f247af5028bba5fb226d67bc229b7c4fb0ea0cd5d901f9c4f085fa77b491c21b95e3e8af2ee0fce727ed00a74ade7900 (signature of "hello", good one)

How to run:

From free5GC team

This repository is a docker compose version of free5GC for stage 3. It's inspired by free5gc-docker-compose and also reference to docker-free5gc.

You can setup your own config in config folder and docker-compose.yaml

Prerequisites

Start free5gc

Because we need to create tunnel interface, we need to use privileged container with root permission.

Pull docker images from Docker Hub

docker compose pull

[Optional] Build docker images from local sources

# Clone the project
git clone https://github.com/free5gc/free5gc-compose.git
cd free5gc-compose

# clone free5gc sources
cd base
git clone --recursive -j `nproc` https://github.com/free5gc/free5gc.git
cd ..

# Build the images
make all
docker compose -f docker-compose-build.yaml build

# Alternatively you can build specific NF image e.g.:
make amf
docker compose -f docker-compose-build.yaml build free5gc-amf

Note:

Dangling images may be created during the build process. It is advised to remove them from time to time to free up disk space.

docker rmi $(docker images -f "dangling=true" -q)

Run free5GC

You can create free5GC containers based on local images or docker hub images:

# use local images
docker compose -f docker-compose-build.yaml up
# use images from docker hub
docker compose up # add -d to run in background mode

Destroy the established container resource after testing:

# Remove established containers (local images)
docker compose -f docker-compose-build.yaml rm
# Remove established containers (remote images)
docker compose rm

Troubleshooting

Sometimes, you need to drop data from DB:

docker exec -it mongodb mongo
> use free5gc
> db.dropDatabase()
> exit # (Or Ctrl-D)

You can see logs for each service using docker logs command. For example, to access the logs of the SMF you can use:

docker logs smf

Please refer to the wiki for more troubleshooting information.

Integration with external gNB/UE simulators

The integration with the UERANSIM eNB/UE simulator is documented here.

You can also refer to this issue to find out how you can configure the UPF to forward traffic between the UERANSIM to the DN (eg. internet) in a docker environment.

This issue provides detailed steps that might be useful.

Integration of WebUI with Nginx reverse proxy

Here you can find helpful guidelines on the integration of Nginx reverse proxy to set it in front of the WebUI: free5gc/free5gc-compose#55 (comment)

Vagrant Box Option

For Linux kernel version below 5.4 you can setup a working environment using a vagrant box: https://github.com/abousselmi/vagrant-free5gc Please refer to GTP5G kernel module for more information.

ULCL Configuration

You can check the following informations below:

Reference

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published