oai-5gcn-smf prototype testbed

本文详细介绍了如何从源代码构建并运行5G核心网的多个关键组件,包括SMF、UDM、UPF和AMF。通过一系列的git clone、checkout、reset和make命令,读者可以了解到部署这些组件的具体步骤。此外,还提供了使用Go客户端进行测试的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Deployment Scenario

在这里插入图片描述

Repository Of SMF

git clone https://gitlab.eurecom.fr/oai/oai-cn5g-smf.git

SMF -> build & run

cd oai-cn5g-smf
git checkout develop
cd build/scripts
./build_smf -I -f
./build_smf -c -V -b Debug -j
./smf_conf.sh
sudo smf -c /usr/local/etc/oai/smf.conf -o

UDM -> build & run

cd oai-cn5g-smf
git reset --hard fb47b34e
cd src/test/udm
mkdir build
cmake ..
make -j4
./udm-api-server

UPF -> build & run

cd oai-cn5g-smf
git reset --hard fb47b34e
cd build/scripts
./build_spgwu -I -f
./build_spgwu -c -V -b Debug -j
./spgwu_conf.sh
sudo spgwu -c /usr/local/etc/oai/spgw_u.conf -o

AMF -> build & run

cd oai-cn5g-smf
git checkout develop
cd src/test/amf
mkdir build
cd build
cmake ..
make -j4
./amf-api-server

AMF http client

git clone http://forwards@gitlab.opensource5G.org:8888/forwards/HttpClient.git
cd HttpClient
git checkout go-http-client
git reset --hard a4a9a0832b99f8ac228654cae5c03a352e995fa6
cd smf/client
./main -server "http://127.0.0.1:8080/nsmf-pdusession/v1/sm-contexts" -txtfile "/home/smf/oai-cn5g-smf/sm_encode_establishment_request.txt"

test results

在这里插入图片描述

Annex: Go-client-with-libnas

(1) download repository
git clone http://forwards@gitlab.opensource5G.org:8888/forwards/HttpClient.git
cd HttpClient
git checkout go-http-client-with-libnas
(2) install golang
wget https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz
sudo tar -zxvf go1.12.4.linux-amd64.tar.gz -C /opt
(3) environment setting
sudo vim /etc/profile
export GOROOT=/opt/go
export GOPATH=/home/ubuntu/HttpClient (ubuntu change to your username, mine is /home/smf/HttpClient)
export GOPROXY=https://goproxy.io
export GOARCH=amd64
export GOOS=linux
export GOTOOLS=$GOROOT/pkg/tool
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
alias go="/opt/go/bin/go"
source /etc/profile
(4) check go version
go version
(5) link libnaslib.so to /usr/lib
sudo ln -s ~/HttpClient/src/HttpClient/libnas/lib/libnaslib.so /usr/lib
(6) compile libnas to libnaslib.so
cd ~/HttpClient/src/HttpClient/libnas
make
(7) compile the whole go-http-client
go build ~/HttpClient/src/HttpClient/main.go
(8) location to modify nas message
vim ~/HttpClient/src/HttpClient/libnas/src/nas/test/nas_sm_encode_to_json.c
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值