Add support for 5G roaming scenario

This commit is contained in:
herlesupreeth
2023-10-29 15:54:49 +01:00
parent 3b78063663
commit 75bb5d1b21
36 changed files with 381 additions and 241 deletions

3
.env
View File

@@ -127,6 +127,9 @@ METRICS_IP=172.22.0.36
# SRSRAN GNB
SRS_GNB_IP=172.22.0.37
# SEPP
SEPP_IP=172.22.0.38
# UE IPv4 Subnet Range for APN=internet
UE_IPV4_INTERNET=192.168.100.0/24

View File

@@ -37,7 +37,7 @@ RF simulated setups:
```
# Build docker images for open5gs EPC/5GC components
git clone https://github.com/herlesupreeth/docker_open5gs
cd docker_open5gs/base
cd docker_open5gs/base && git checkout roaming
docker build --no-cache --force-rm -t docker_open5gs .
# Build docker images for kamailio IMS components

View File

@@ -11,10 +11,17 @@ parameter:
amf:
sbi:
- addr: AMF_IP
port: 7777
server:
- address: AMF_IP
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777
ngap:
- addr: AMF_IP
server:
- address: AMF_IP
guami:
- plmn_id:
mcc: MCC
@@ -40,20 +47,9 @@ amf:
full: Open5GS
amf_name: open5gs-amf0
metrics:
- addr: AMF_IP
port: 9091
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: AMF_IP
port: 9091
time:
t3512:

View File

@@ -26,12 +26,14 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/amf/amf.yaml install/etc/open5gs
sed -i 's|AMF_IP|'$AMF_IP'|g' install/etc/open5gs/amf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/amf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/amf.yaml
sed -i 's|MNC|'$MNC'|g' install/etc/open5gs/amf.yaml
sed -i 's|MCC|'$MCC'|g' install/etc/open5gs/amf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/amf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -11,17 +11,11 @@ parameter:
ausf:
sbi:
- addr: AUSF_IP
port: 7777
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: ausf.FIVEGC_DOMAIN
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777

View File

@@ -26,10 +26,11 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/ausf/ausf.yaml install/etc/open5gs
sed -i 's|AUSF_IP|'$AUSF_IP'|g' install/etc/open5gs/ausf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/ausf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/ausf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/ausf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -68,7 +68,7 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -
# Get open5gs code and install
RUN git clone --recursive https://github.com/open5gs/open5gs && cd open5gs && \
git checkout tags/v2.6.6 && meson build --prefix=`pwd`/install && \
git checkout roaming-tier3 && meson build --prefix=`pwd`/install && \
ninja -C build && cd build && ninja install && \
mkdir -p /open5gs/install/include

View File

@@ -94,6 +94,10 @@ elif [[ "$COMPONENT_NAME" =~ ^(upf-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
/mnt/upf/upf_init.sh && \
cd install/bin && ./open5gs-upfd
elif [[ "$COMPONENT_NAME" =~ ^(sepp-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
/mnt/sepp/sepp_init.sh && \
cd install/bin && ./open5gs-seppd
elif [[ "$COMPONENT_NAME" =~ ^(webui) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
sleep 10 && /mnt/webui/webui_init.sh

View File

@@ -13,17 +13,11 @@ parameter:
bsf:
sbi:
- addr: BSF_IP
port: 7777
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: BSF_IP
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777

View File

@@ -28,11 +28,14 @@
export DB_URI="mongodb://${MONGO_IP}/open5gs"
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/bsf/bsf.yaml install/etc/open5gs
sed -i 's|BSF_IP|'$BSF_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/bsf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

16
dns/5gc_zone Normal file
View File

@@ -0,0 +1,16 @@
$ORIGIN FIVEGC_DOMAIN.
$TTL 1W
@ 1D IN SOA localhost. root.localhost. (
1 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS 5gcns
5gcns 1D IN A DNS_IP
nrf 1D IN A NRF_IP
ausf 1D IN A AUSF_IP
udm 1D IN A UDM_IP
sepp 1D IN A SEPP_IP

View File

@@ -27,12 +27,14 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cp /mnt/dns/epc_zone /etc/bind
cp /mnt/dns/5gc_zone /etc/bind
cp /mnt/dns/ims_zone /etc/bind
cp /mnt/dns/pub_3gpp_zone /etc/bind
cp /mnt/dns/e164.arpa /etc/bind
cp /mnt/dns/named.conf /etc/bind
[ ${#MNC} == 3 ] && EPC_DOMAIN="epc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || EPC_DOMAIN="epc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
[ ${#MNC} == 3 ] && IMS_DOMAIN="ims.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || IMS_DOMAIN="ims.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
[ ${#MNC} == 3 ] && PUB_3GPP_DOMAIN="mnc${MNC}.mcc${MCC}.pub.3gppnetwork.org" || PUB_3GPP_DOMAIN="mnc0${MNC}.mcc${MCC}.pub.3gppnetwork.org"
@@ -40,6 +42,13 @@ sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' /etc/bind/epc_zone
sed -i 's|DNS_IP|'$DNS_IP'|g' /etc/bind/epc_zone
[ -z "$PCRF_PUB_IP" ] && sed -i 's|PCRF_IP|'$PCRF_IP'|g' /etc/bind/epc_zone || sed -i 's|PCRF_IP|'$PCRF_PUB_IP'|g' /etc/bind/epc_zone
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' /etc/bind/5gc_zone
sed -i 's|DNS_IP|'$DNS_IP'|g' /etc/bind/5gc_zone
sed -i 's|NRF_IP|'$NRF_IP'|g' /etc/bind/5gc_zone
sed -i 's|AUSF_IP|'$AUSF_IP'|g' /etc/bind/5gc_zone
sed -i 's|UDM_IP|'$UDM_IP'|g' /etc/bind/5gc_zone
sed -i 's|SEPP_IP|'$SEPP_IP'|g' /etc/bind/5gc_zone
sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' /etc/bind/ims_zone
sed -i 's|DNS_IP|'$DNS_IP'|g' /etc/bind/ims_zone
sed -i 's|PCSCF_IP|'$PCSCF_IP'|g' /etc/bind/ims_zone
@@ -56,6 +65,7 @@ sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' /etc/bind/e164.arpa
sed -i 's|DNS_IP|'$DNS_IP'|g' /etc/bind/e164.arpa
sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' /etc/bind/named.conf
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' /etc/bind/named.conf
sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' /etc/bind/named.conf
sed -i 's|PUB_3GPP_DOMAIN|'$PUB_3GPP_DOMAIN'|g' /etc/bind/named.conf

View File

@@ -51,3 +51,8 @@ zone "e164.arpa" {
type master;
file "/etc/bind/e164.arpa";
};
zone "FIVEGC_DOMAIN" {
type master;
file "/etc/bind/5gc_zone";
};

View File

@@ -6,22 +6,30 @@ parameter:
mme:
freeDiameter: /open5gs/install/etc/freeDiameter/mme.conf
s1ap:
dev: MME_IF
server:
- address: MME_IP
gtpc:
dev: MME_IF
server:
- address: MME_IP
client:
sgwc:
- address: SGWC_IP
smf:
- address: SMF_IP
sgsap:
addr: OSMOMSC_IP
map:
tai:
plmn_id:
mcc: MCC
mnc: MNC
tac: 1
lai:
plmn_id:
mcc: MCC
mnc: MNC
lac: 1
server:
- address: OSMOMSC_IP
map:
tai:
plmn_id:
mcc: MCC
mnc: MNC
tac: 1
lai:
plmn_id:
mcc: MCC
mnc: MNC
lac: 1
gummei:
plmn_id:
mcc: MCC
@@ -40,17 +48,9 @@ mme:
full: Open5GS
mme_name: open5gs-mme0
metrics:
- addr: MME_IP
port: 9091
sgwc:
gtpc:
addr: SGWC_IP
smf:
gtpc:
- addr:
- SMF_IP
server:
- address: MME_IP
port: 9091
time:
t3412:

View File

@@ -10,13 +10,11 @@ sbi:
parameter:
nrf:
serving: # 5G roaming requires PLMN in NRF
- plmn_id:
mcc: MCC
mnc: MNC
sbi:
addr:
- NRF_IP
port: 7777
scp:
sbi:
addr:
- SCP_IP
port: 7777
server:
- address: nrf.FIVEGC_DOMAIN
port: 7777

View File

@@ -26,9 +26,12 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/nrf/nrf.yaml install/etc/open5gs
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/nrf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/nrf.yaml
sed -i 's|MCC|'$MCC'|g' install/etc/open5gs/nrf.yaml
sed -i 's|MNC|'$MNC'|g' install/etc/open5gs/nrf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/nrf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -11,22 +11,15 @@ parameter:
nssf:
sbi:
- addr: NSSF_IP
port: 7777
nsi:
- addr: NRF_IP
port: 7777
s_nssai:
sst: 1
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: NSSF_IP
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777
nsi:
- uri: http://nrf.FIVEGC_DOMAIN:7777
s_nssai:
sst: 1

View File

@@ -26,11 +26,12 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/nssf/nssf.yaml install/etc/open5gs
sed -i 's|NSSF_IP|'$NSSF_IP'|g' install/etc/open5gs/nssf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/nssf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/nssf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/nssf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/nssf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -13,20 +13,15 @@ parameter:
pcf:
sbi:
- addr: PCF_IP
port: 7777
server:
- address: PCF_IP
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777
metrics:
- addr: PCF_IP
port: 9091
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: PCF_IP
port: 9091

View File

@@ -28,11 +28,13 @@
export DB_URI="mongodb://${MONGO_IP}/open5gs"
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/pcf/pcf.yaml install/etc/open5gs
sed -i 's|PCF_IP|'$PCF_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/pcf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -17,6 +17,21 @@ services:
networks:
default:
ipv4_address: ${MONGO_IP}
dns:
build: ./dns
image: docker_dns
container_name: dns
env_file:
- .env
volumes:
- ./dns:/mnt/dns
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "53/udp"
networks:
default:
ipv4_address: ${DNS_IP}
webui:
image: docker_open5gs
container_name: webui
@@ -40,6 +55,9 @@ services:
nrf:
image: docker_open5gs
container_name: nrf
dns: ${DNS_IP}
depends_on:
- dns
env_file:
- .env
environment:
@@ -57,6 +75,9 @@ services:
scp:
image: docker_open5gs
container_name: scp
dns: ${DNS_IP}
depends_on:
- dns
env_file:
- .env
environment:
@@ -76,7 +97,9 @@ services:
depends_on:
- nrf
- scp
- dns
container_name: ausf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -97,7 +120,9 @@ services:
- nrf
- scp
- mongo
- dns
container_name: udr
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -117,7 +142,9 @@ services:
depends_on:
- nrf
- scp
- dns
container_name: udm
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -138,7 +165,9 @@ services:
- nrf
- scp
- amf
- dns
container_name: smf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -169,7 +198,9 @@ services:
- nrf
- scp
- smf
- dns
container_name: upf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -204,7 +235,9 @@ services:
- udr
- pcf
- bsf
- dns
container_name: amf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -229,7 +262,9 @@ services:
- nrf
- scp
- mongo
- dns
container_name: pcf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -251,7 +286,9 @@ services:
- nrf
- scp
- mongo
- dns
container_name: bsf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -272,7 +309,9 @@ services:
- nrf
- scp
- mongo
- dns
container_name: nssf
dns: ${DNS_IP}
env_file:
- .env
environment:
@@ -287,6 +326,33 @@ services:
networks:
default:
ipv4_address: ${NSSF_IP}
sepp:
image: docker_open5gs
depends_on:
- nrf
- scp
- dns
container_name: sepp
dns: ${DNS_IP}
env_file:
- .env
environment:
- COMPONENT_NAME=sepp-1
volumes:
- ./sepp:/mnt/sepp
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
- "7779/tcp"
- "7780/tcp"
# ports:
# - "7779:7779/tcp"
# - "7780:7780/tcp"
networks:
default:
ipv4_address: ${SEPP_IP}
metrics:
build: ./metrics
image: docker_metrics

View File

@@ -11,12 +11,9 @@ parameter:
scp:
sbi:
addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: SCP_IP
port: 7777
client:
nrf:
- uri: http://nrf.FIVEGC_DOMAIN:7777

View File

@@ -26,9 +26,11 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/scp/scp.yaml install/etc/open5gs
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/scp.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/scp.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/scp.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

25
sepp/sepp.yaml Normal file
View File

@@ -0,0 +1,25 @@
logger:
file: /open5gs/install/var/log/open5gs/sepp.log
sepp:
sbi:
server:
- address: SEPP_IP
port: 7777
client:
scp:
- uri: http://SCP_IP:7777
n32:
server:
- sender: sepp.FIVEGC_DOMAIN
address: SEPP_IP
port: 7779
n32f:
address: SEPP_IP
port: 7780
client:
# sepp: # Configure roaming networks below
# - receiver: sepp.5gc.mnc070.mcc999.3gppnetwork.org
# uri: http://192.168.220.25:7779
# n32f:
# uri: http://192.168.220.25:7780

37
sepp/sepp_init.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
# BSD 2-Clause License
# Copyright (c) 2020, Supreeth Herle
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/sepp/sepp.yaml install/etc/open5gs
sed -i 's|SEPP_IP|'$SEPP_IP'|g' install/etc/open5gs/sepp.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/sepp.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/sepp.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -5,10 +5,11 @@ parameter:
sgwc:
gtpc:
- addr: SGWC_IP
server:
- address: SGWC_IP
pfcp:
- addr: SGWC_IP
sgwu:
pfcp:
- addr: SGWU_IP
server:
- address: SGWC_IP
client:
sgwu:
- address: SGWU_IP

View File

@@ -5,11 +5,12 @@ parameter:
sgwu:
gtpu:
- addr: SGWU_IP
advertise: SGWU_ADVERTISE_IP
server:
- address: SGWU_IP
advertise: SGWU_ADVERTISE_IP
pfcp:
- addr: SGWU_IP
sgwc:
pfcp:
- addr: SGWC_IP
server:
- address: SGWU_IP
client:
sgwc:
- address: SGWC_IP

View File

@@ -13,27 +13,35 @@ parameter:
smf:
freeDiameter: /open5gs/install/etc/freeDiameter/smf.conf
sbi:
- addr: SMF_IP
port: 7777
server:
- address: SMF_IP
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777
gtpc:
- addr: SMF_IP
server:
- address: SMF_IP
gtpu:
- addr: SMF_IP
server:
- address: SMF_IP
pfcp:
- addr: SMF_IP
subnet:
- addr: UE_IPV4_INTERNET_TUN_IP
server:
- address: SMF_IP
client:
upf:
- address: UPF_IP
session:
- subnet: UE_IPV4_INTERNET_TUN_IP
dnn: internet
dev: ogstun
- addr: 2001:230:cafe::1/48
dev: ogstun
- subnet: 2001:230:cafe::1/48
dnn: internet
- addr: UE_IPV4_IMS_TUN_IP
- subnet: UE_IPV4_IMS_TUN_IP
dnn: ims
dev: ogstun2
- addr: 2001:230:babe::1/48
- subnet: 2001:230:babe::1/48
dnn: ims
dev: ogstun2
dns:
- SMF_DNS1
- SMF_DNS2
@@ -43,21 +51,6 @@ smf:
- PCSCF_IP
mtu: 1450
metrics:
- addr: SMF_IP
port: 9091
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
upf:
pfcp:
- addr: UPF_IP
server:
- address: SMF_IP
port: 9091

View File

@@ -13,24 +13,26 @@ parameter:
smf:
freeDiameter: /open5gs/install/etc/freeDiameter/smf.conf
gtpc:
- addr: SMF_IP
server:
- address: SMF_IP
gtpu:
- addr: SMF_IP
server:
- address: SMF_IP
pfcp:
- addr: SMF_IP
subnet:
- addr: UE_IPV4_INTERNET_TUN_IP
server:
- address: SMF_IP
client:
upf:
- address: UPF_IP
session:
- subnet: UE_IPV4_INTERNET_TUN_IP
dnn: internet
dev: ogstun
- addr: 2001:230:cafe::1/48
dev: ogstun
- subnet: 2001:230:cafe::1/48
dnn: internet
- addr: UE_IPV4_IMS_TUN_IP
- subnet: UE_IPV4_IMS_TUN_IP
dnn: ims
dev: ogstun2
- addr: 2001:230:babe::1/48
- subnet: 2001:230:babe::1/48
dnn: ims
dev: ogstun2
dns:
- SMF_DNS1
- SMF_DNS2
@@ -40,9 +42,6 @@ smf:
- PCSCF_IP
mtu: 1450
metrics:
- addr: SMF_IP
port: 9091
upf:
pfcp:
- addr: UPF_IP
server:
- address: SMF_IP
port: 9091

View File

@@ -32,6 +32,7 @@ export IP_ADDR=$(awk 'END{print $1}' /etc/hosts)
export IF_NAME=$(ip r | awk '/default/ { print $5 }')
[ ${#MNC} == 3 ] && EPC_DOMAIN="epc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || EPC_DOMAIN="epc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
UE_IPV4_INTERNET_TUN_IP=$(python3 /mnt/smf/ip_utils.py --ip_range $UE_IPV4_INTERNET)
UE_IPV4_IMS_TUN_IP=$(python3 /mnt/smf/ip_utils.py --ip_range $UE_IPV4_IMS)
@@ -53,6 +54,7 @@ sed -i 's|SMF_DNS2|'$SMF_DNS2'|g' install/etc/open5gs/smf.yaml
sed -i 's|UE_IPV4_INTERNET_TUN_IP|'$UE_IPV4_INTERNET_TUN_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|UE_IPV4_IMS_TUN_IP|'$UE_IPV4_IMS_TUN_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|PCSCF_IP|'$PCSCF_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/smf.yaml
sed -i 's|SMF_IP|'$SMF_IP'|g' install/etc/freeDiameter/smf.conf
sed -i 's|PCRF_IP|'$PCRF_IP'|g' install/etc/freeDiameter/smf.conf
sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' install/etc/freeDiameter/smf.conf

View File

@@ -18,17 +18,11 @@ udm:
scheme: 2
key: /open5gs/install/etc/open5gs/hnet/secp256r1-2.key
sbi:
- addr: UDM_IP
port: 7777
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: udm.FIVEGC_DOMAIN
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777

View File

@@ -26,10 +26,11 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/udm/udm.yaml install/etc/open5gs
sed -i 's|UDM_IP|'$UDM_IP'|g' install/etc/open5gs/udm.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/udm.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/udm.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/udm.yaml
cp /mnt/udm/curve25519-1.key install/etc/open5gs/hnet
cp /mnt/udm/secp256r1-2.key install/etc/open5gs/hnet

View File

@@ -13,17 +13,11 @@ parameter:
udr:
sbi:
- addr: UDR_IP
port: 7777
scp:
sbi:
- addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777
server:
- address: UDR_IP
port: 7777
client:
# nrf:
# - uri: http://nrf.FIVEGC_DOMAIN:7777
scp:
- uri: http://SCP_IP:7777

View File

@@ -28,11 +28,14 @@
export DB_URI="mongodb://${MONGO_IP}/open5gs"
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
cp /mnt/udr/udr.yaml install/etc/open5gs
sed -i 's|UDR_IP|'$UDR_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/udr.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -5,27 +5,29 @@ parameter:
upf:
pfcp:
- addr: UPF_IP
server:
- address: UPF_IP
client:
smf:
- address: SMF_IP
gtpu:
- addr: UPF_IP
advertise: UPF_ADVERTISE_IP
subnet:
- addr: UE_IPV4_INTERNET_TUN_IP
server:
- address: UPF_IP
advertise: UPF_ADVERTISE_IP
session:
- subnet: UE_IPV4_INTERNET_TUN_IP
dev: ogstun
dnn: internet
- addr: 2001:230:cafe::1/48
- subnet: 2001:230:cafe::1/48
dev: ogstun
dnn: internet
- addr: UE_IPV4_IMS_TUN_IP
- subnet: UE_IPV4_IMS_TUN_IP
dnn: ims
dev: ogstun2
- addr: 2001:230:babe::1/48
- subnet: 2001:230:babe::1/48
dnn: ims
dev: ogstun2
metrics:
- addr: UPF_IP
port: 9091
smf:
pfcp:
- addr: SMF_IP
server:
- address: UPF_IP
port: 9091

View File

@@ -34,6 +34,8 @@ export IF_NAME=$(ip r | awk '/default/ { print $5 }')
python3 /mnt/upf/tun_if.py --tun_ifname ogstun --ipv4_range $UE_IPV4_INTERNET --ipv6_range 2001:230:cafe::/48
python3 /mnt/upf/tun_if.py --tun_ifname ogstun2 --ipv4_range $UE_IPV4_IMS --ipv6_range 2001:230:babe::/48 --nat_rule 'no'
[ ${#MNC} == 3 ] && FIVEGC_DOMAIN="5gc.mnc${MNC}.mcc${MCC}.3gppnetwork.org" || FIVEGC_DOMAIN="5gc.mnc0${MNC}.mcc${MCC}.3gppnetwork.org"
UE_IPV4_INTERNET_TUN_IP=$(python3 /mnt/upf/ip_utils.py --ip_range $UE_IPV4_INTERNET)
UE_IPV4_IMS_TUN_IP=$(python3 /mnt/upf/ip_utils.py --ip_range $UE_IPV4_IMS)
@@ -43,6 +45,7 @@ sed -i 's|SMF_IP|'$SMF_IP'|g' install/etc/open5gs/upf.yaml
sed -i 's|UE_IPV4_INTERNET_TUN_IP|'$UE_IPV4_INTERNET_TUN_IP'|g' install/etc/open5gs/upf.yaml
sed -i 's|UE_IPV4_IMS_TUN_IP|'$UE_IPV4_IMS_TUN_IP'|g' install/etc/open5gs/upf.yaml
sed -i 's|UPF_ADVERTISE_IP|'$UPF_ADVERTISE_IP'|g' install/etc/open5gs/upf.yaml
sed -i 's|FIVEGC_DOMAIN|'$FIVEGC_DOMAIN'|g' install/etc/open5gs/upf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone