0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

自宅5GC UERANSIM+Open5GS

Posted at

Open 5GSのQuick Startをやってみる。

参考文献

[1]Open 5GS QuickStart
[2]Open5GS 5GCとUERANSIM UE/RANによるシミュレーション携帯網
[3]UERANSIM
[4]UERANSIM+Open5GS
[5]UERANSIM instration

構成

[2]を見ると、
UE,gNB: UERANSIM 
5Gコア:Open5GS
で構築できるらしい。

準備

ubuntu 22.04をWSL2上にインストール
Windows Power Shell
'''
wsl --update
wsl --install -d Ubuntu-22.04
'''

URRANSIM

[5]UERANSIM instration

Instration

instrationすると、
~/UERANSIM/build
配下にバイナリファイルができる。

$ ls ~/UERANSIM/build
libdevbnd.so  nr-binder  nr-cli  nr-gnb  nr-ue
ファイル名 備考
nr-gnb 5Gの基地局
nr-ue 5Gの端末
nr-cli CLI for 5G基地局・端末
nr-binder ? 何かのツール
libdevbnd.so ? nr-binderかのライブラリ

Config

~/UERANSIM/config$ ls
custom-gnb.yaml  custom-ue.yaml  free5gc-gnb.yaml  free5gc-ue.yaml  open5gs-gnb.yaml  open5gs-ue.yaml

Configを少し変更

~/UERANSIM/config/open5gs-ue.yaml

項目 メモ
supi imsi-999700000000001
mcc 999
mnc 70
Routing Indicator 0000 ?
gnbSearchList 127.0.0.100 gNBアドレスは.100にしとく
type IPv4
apn internet
sst 1
sd 1

~/UERANSIM/config/open5gs-gnb.yaml

項目 メモ
mcc 999
mnc 70
linkIp 127.0.0.100 RadioLink
ngapIp 127.0.0.100 N2 基地局側
gtpIp 127.0.0.100 N3
amfConfig 127.0.0.5 :38412 N2 AMF側
sst 1

gNBとUEを起動

cd ~/UERANSIM/build
sudo ./nr-gnb -c ../config/open5gs-gnb.yaml
[rrc] [info] RRC Setup for UE[1]
・・・
UE[1] signal lost

別窓で

cd ~/UERANSIM/build
sudo  ./nr-ue -c ../config/open5gs-ue.yaml

Open 5GSをインストール

[1]Open 5GS QuickStart

Getting Mongo DB

$ sudo apt update
$ sudo apt install gnupg
$ curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
$ echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
$ sudo apt update
$ sudo apt install -y mongodb-org
$ sudo systemctl start mongod

mongo dbの起動を確認

$ ps -ef | grep mongo
mongodb     1366       1  0 16:08 ?        00:00:00 /usr/bin/mongod --config /etc/mongod.conf

install Open5GS

$ sudo add-apt-repository ppa:open5gs/latest
$ sudo apt update
$ sudo apt install open5gs

Install the WebUI of Open5GS

  • Node.js のインストール

ログ

MMEのログを見ると、HSSとのDiameterがつながっているらしい。

/var/log/open5gs/mme.log 
[diam] INFO: CONNECTED TO 'hss.localdomain' (SCTP,soc#17):

設定

コンフィグファイル

/etc/open5gs$ ls
amf.yaml   bsf.yaml  hss.yaml  nrf.yaml   pcf.yaml   scp.yaml    sepp2.yaml  sgwu.yaml  tls       udr.yaml
ausf.yaml  hnet      mme.yaml  nssf.yaml  pcrf.yaml  sepp1.yaml  sgwc.yaml   smf.yaml   udm.yaml  upf.yaml

mmeの設定を変更

/etc/open5gs/amf.yaml

項目 メモ
mnc 999
mcc 90
amf address 127.0.0.5 port 7777 SBI側
念のためMMEのconfigを再読み込み
sudo systemctl restart open5gs-mmed

Subscriberの設定

~/UERANSIM/config/open5gs-ue.yaml
のパラメタに合わせて
http://localhost:9999 のweb guiからSubscriberのパラメータを登録

項目 メモ
imsi xxx
Subscriber Key xxx
amf 8000
type op
type op

Registration

  • Wireshark
tcpdump -i any -v -w /mnt/c/tmp/20250215_SBI3.pcap
  • pcap解析
     - wiresharkの設定
     - decord as
    • port番号 46464と7777をHTTP2としてでコード
    • image.png

http2 or ngap or nas-5gs でふぃる
No 449のパケットでRegistration acceptされてるのでOKそう
image.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?