![見出し画像](https://assets.st-note.com/production/uploads/images/153819488/rectangle_large_type_2_3c67a58ef0b3c8bf43f96b8ab74ce681.png?width=1200)
【ローカル5G】 free5GCとリアルgNBでiPhone接続を試してみた。(3. free5GCコンフィグ)
※本記事は2024年9月9日時点の内容です。
この記事は私がfree5GCとリアルgNB(ローカル5G用小型基地局= Small Cell)を使ってiPhone接続を試す機会があり、その過程をまとめたものです。
free5GC config編集
環境に合わせて設定ファイルを編集する必要があります。
設定ファイルは以下ディレクトリにあります。
/root/free5gc/config
設定ファイルをviエディタで編集する必要があります。
尚、インデントを変更してしまうと設定ファイルを読み込みの際にエラーが発生するので編集時には注意が必要です。編集前にバックアップを取っておく事をお勧めします。
(最悪、エラー発生時にはどのconfigファイルのどの行に問題があるかエラー表示してくれますのでそれを手がかりに修正可能です)
1. amfcfg.yaml
(version: 1.0.9)
まずはN2インターフェースIPを「172.16.60.2」に変更しました
ご自身のネットワーク環境に合わせて変更が必要です。
ngapIpList IPを「172.16.60.2」に変更。
info:
version: 1.0.9
description: AMF initial local configuration
configuration:
amfName: AMF # the name of this AMF
ngapIpList: # the IP list of N2 interfaces on this AMF
- 172.16.60.2
ngapPort: 38412 # the SCTP port listened by NGAP
その他、以下項目を変更しました。
plmnId
mcc: 999
mnc: 002
tac (Tracking Area Code): 000001
snssaiList
sst: 1
sd: 000001
※sbi (Service-based interface)のIPは内部で使用するIPですので変更しなくて大丈夫です。
2. ausfcfg.yaml
(version: 1.0.3)
plmnIdを変更。
mcc: 999
mnc: 002
3. nrfcfg.yaml
(version: 1.0.2)
plmnIdを変更。
mcc: 999
mnc: 002
4. nssfcfg.yaml
(version: 1.0.2)
以下箇所を編集。
restrictedSnssaiList や mappingListFromPlmn 以外のplmnIdはmcc: 999, mnc: 002に変更。
sst: 1、sd: 000001に変更。
smfSetListはSetId: 1以外はコメントアウト。
複数あるtai(Tracking Area Identifier)もコメントアウト。
5. smfcfg.yaml
(version: 1.0.7)
以下箇所を編集。
plmnIdはmcc: 999, mnc: 002に変更。
sst: 1、sd: 000001に変更。
endpoints IP (N3 or N9 IP)を「172.16.60.2」に変更。
interfaces: # Interface list for this UPF
- interfaceType: N3 # the type of the interface (N3 or N9)
endpoints: # the IP address of this N3/N9 interface on this UPF
- 172.16.60.2
networkInstances: # Data Network Name (DNN)
- internet
6. udmcfg.yaml
(version: 1.0.3)
SuciProfileを編集。
※内容については別途説明。
7. upfcfg.yaml
(version: 1.0.3)
gtpu の ifListのIPを「172.16.60.2」に変更。
gtpu:
forwarder: gtp5g
# The IP list of the N3/N9 interfaces on this UPF
# If there are multiple connection, set addr to 0.0.0.0 or list all the addresses
ifList:
- addr: 172.16.60.2
type: N3
# name: upf.5gc.nctu.me
# ifname: gtpif
# mtu: 1400
その他ファイルはDefaultのままです。
次記事でSIMとSUCIプロファイルについて準備した過程を紹介します。