Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UPF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UPF
Commits
30defdf4
Unverified
Commit
30defdf4
authored
Sep 17, 2021
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nrf python client
parent
17c02ea1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
422 additions
and
176 deletions
+422
-176
docker/Dockerfile.upf-vpp.ubuntu18
docker/Dockerfile.upf-vpp.ubuntu18
+7
-0
scripts/entrypoint.sh
scripts/entrypoint.sh
+9
-3
scripts/nrf_client.py
scripts/nrf_client.py
+165
-0
scripts/run.sh
scripts/run.sh
+11
-2
scripts/tests/docker-compose.yml
scripts/tests/docker-compose.yml
+191
-171
scripts/upf_conf/upf_profile.json
scripts/upf_conf/upf_profile.json
+39
-0
No files found.
docker/Dockerfile.upf-vpp.ubuntu18
View file @
30defdf4
...
...
@@ -93,16 +93,23 @@ RUN apt-get update && \
iproute2 \
iputils-ping \
vim \
python \
python-pip \
libcurl4-openssl-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip install pycurl termcolor
WORKDIR /openair-upf/bin
COPY --from=vpp-upf-builder /vpp-upf/scripts/entrypoint.sh .
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp .
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl .
COPY --from=vpp-upf-builder /vpp-upf/scripts/nrf_client.py .
WORKDIR /openair-upf/etc
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/init.conf .
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/startup_debug.conf .
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/upf_profile.json .
WORKDIR /usr/lib/x86_64-linux-gnu/
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/ .
...
...
scripts/entrypoint.sh
View file @
30defdf4
...
...
@@ -10,12 +10,19 @@
set
-euo
pipefail
CONFIG_DIR
=
"/openair-upf/etc"
SGI_IPV4
=
$(
ifconfig
$INTERFACE_SGI
|
grep
"inet "
|
awk
'{print $2}'
)
ACCESS_IPV4
=
$(
ifconfig
$INTERFACE_ACCESS
|
grep
"inet "
|
awk
'{print $2}'
)
CORE_IPV4
=
$(
ifconfig
$INTERFACE_CORE
|
grep
"inet "
|
awk
'{print $2}'
)
N3_IPV4_ADDRESS_LOCAL
=
$(
ifconfig
$INTERFACE_ACCESS
|
grep
"inet "
|
awk
'{print $2}'
|
cut
-d
"."
-f1-3
)
".202"
N4_IPV4_ADDRESS_LOCAL
=
$(
ifconfig
$INTERFACE_CORE
|
grep
"inet "
|
awk
'{print $2}'
|
cut
-d
"."
-f1-3
)
".202"
N6_IPV4_ADDRESS_LOCAL
=
$(
ifconfig
$INTERFACE_SGI
|
grep
"inet "
|
awk
'{print $2}'
|
cut
-d
"."
-f1-3
)
".202"
###############################
# UPF Config
###############################
for
c
in
${
CONFIG_DIR
}
/
*
.conf
;
do
array
=(
${
CONFIG_DIR
}
/
*
.conf
${
CONFIG_DIR
}
/
*
.json
)
for
c
in
"
${
array
[@]
}
"
;
do
# grep variable names (format: ${VAR}) from template to be rendered
VARS
=
$(
grep
-oP
'@[a-zA-Z0-9_]+@'
${
c
}
|
sort
|
uniq
| xargs
)
# create sed expressions for substituting each occurrence of ${VAR}
...
...
@@ -44,7 +51,6 @@ done
# Near future we will have multiple interfaces (e.g. two n6 interface for edge computing case)
# We define in this order in docker-compose -> it is alphabetical order
#
SGI_IPV4
=
$(
ifconfig
$INTERFACE_SGI
|
grep
"inet "
|
awk
'{print $2}'
)
ip
link set
$INTERFACE_ACCESS
down
ip
link set
$INTERFACE_ACCESS
name access
...
...
scripts/nrf_client.py
0 → 100755
View file @
30defdf4
#!/usr/bin/env python
"""
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*!
\f
ile nrf_client.py
\a
uthor Rohan KHARADE
\date 2018
\email: rohan.kharade@openairinterface.org
*/
"""
import
time
,
sys
,
json
,
logging
,
uuid
,
pycurl
,
argparse
,
atexit
from
termcolor
import
colored
logging
.
basicConfig
(
format
=
'%(asctime)s] %(filename)s: %(levelname)s '
'- %(message)s'
,
datefmt
=
'%m/%d/%Y %I:%M:%S %p'
)
class
upf_profile
(
object
):
def
__init__
(
self
,
create_topo_log_level
=
None
,
fqdn
=
None
,
nrf_ip
=
None
,
nrf_port
=
None
,
http_version
=
None
):
self
.
logger
=
logging
.
getLogger
(
"upf"
)
atexit
.
register
(
self
.
goodbye
)
# register a message to print out when exit
if
create_topo_log_level
:
if
create_topo_log_level
==
'debug'
:
self
.
logger
.
setLevel
(
logging
.
DEBUG
)
elif
create_topo_log_level
==
'info'
:
self
.
logger
.
setLevel
(
logging
.
INFO
)
elif
create_topo_log_level
==
'warn'
:
self
.
logger
.
setLevel
(
logging
.
WARNING
)
elif
create_topo_log_level
==
'error'
:
self
.
logger
.
setLevel
(
logging
.
ERROR
)
elif
create_topo_log_level
==
'critic'
:
self
.
logger
.
setLevel
(
logging
.
CRITICAL
)
message
=
" NRF UPF client started "
self
.
logger
.
info
(
message
)
#@@@@@@@@ Initialize arguments #@@@@@@@@
self
.
nrf_ip
=
nrf_ip
self
.
nrf_port
=
nrf_port
self
.
http_version
=
http_version
self
.
status_code
=
0
self
.
uuid
=
uuid
.
uuid4
()
self
.
url
=
'http://'
+
str
(
self
.
nrf_ip
)
+
':'
+
str
(
self
.
nrf_port
)
+
'/nnrf-nfm/v1/nf-instances/'
+
str
(
self
.
uuid
)
self
.
curl
=
pycurl
.
Curl
()
self
.
headers
=
[
"Content-Type:application/json"
]
self
.
dir_config
=
'/openair-upf/'
self
.
file_name
=
self
.
dir_config
+
'etc/upf_profile.json'
self
.
conf_file
=
open
(
self
.
file_name
,)
self
.
upf_profile
=
json
.
load
(
self
.
conf_file
)
#@@@@@@@@ Initialize upf profile #@@@@@@@@
self
.
upf_profile
[
'nfInstanceId'
]
=
str
(
self
.
uuid
)
self
.
capacity
=
self
.
upf_profile
[
'capacity'
]
self
.
fqdn
=
self
.
upf_profile
[
'fqdn'
]
self
.
heartBeatTimer
=
self
.
upf_profile
[
'heartBeatTimer'
]
self
.
ipv4Addresses
=
self
.
upf_profile
[
'ipv4Addresses'
]
self
.
nfInstanceId
=
self
.
upf_profile
[
'nfInstanceId'
]
self
.
nfInstanceName
=
self
.
upf_profile
[
'nfInstanceName'
]
self
.
nfStatus
=
self
.
upf_profile
[
'nfStatus'
]
self
.
nfType
=
self
.
upf_profile
[
'nfType'
]
self
.
priority
=
self
.
upf_profile
[
'priority'
]
self
.
sNssais
=
self
.
upf_profile
[
'sNssais'
]
self
.
upfInfo
=
self
.
upf_profile
[
'upfInfo'
]
message
=
" UPF profile is parsed "
self
.
logger
.
info
(
message
)
def
display_upf_profile
(
self
):
message
=
" Display UPF profile "
self
.
logger
.
info
(
message
)
print
(
colored
(
'[*] UPF Profile
\n
\t
fqdn = '
+
self
.
fqdn
+
\
'
\n
\t
capacity = '
+
str
(
self
.
capacity
)
+
\
'
\n
\t
heartBeatTimer = '
+
str
(
self
.
heartBeatTimer
)
+
\
'
\n
\t
ipv4Addresses = '
+
u", "
.
join
(
self
.
ipv4Addresses
)
+
\
'
\n
\t
nfInstanceId = '
+
self
.
nfInstanceId
+
\
'
\n
\t
nfInstanceName = '
+
self
.
nfInstanceName
+
\
'
\n
\t
nfStatus = '
+
self
.
nfStatus
+
\
'
\n
\t
nfType = '
+
self
.
nfType
+
\
'
\n
\t
priority = '
+
str
(
self
.
priority
)
+
\
'
\n
\t
sNssais = '
+
json
.
dumps
(
self
.
sNssais
)
+
\
'
\n
\t
upfInfo = '
+
json
.
dumps
(
self
.
upfInfo
,
indent
=
6
)
\
,
'green'
))
def
trigger_nf_registration
(
self
):
message
=
" Sending NF registration request (HTTP Version - "
+
str
(
self
.
http_version
)
+
")"
self
.
logger
.
info
(
message
)
self
.
curl
.
setopt
(
self
.
curl
.
URL
,
self
.
url
)
self
.
curl
.
setopt
(
self
.
curl
.
HTTPHEADER
,
self
.
headers
)
self
.
curl
.
setopt
(
self
.
curl
.
CUSTOMREQUEST
,
'PUT'
)
self
.
curl
.
setopt
(
self
.
curl
.
POSTFIELDS
,
json
.
dumps
(
self
.
upf_profile
))
if
(
str
(
self
.
http_version
)
==
'2'
):
self
.
curl
.
setopt
(
self
.
curl
.
HTTP_VERSION
,
pycurl
.
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
)
response
=
self
.
curl
.
perform
()
self
.
status_code
=
self
.
curl
.
getinfo
(
self
.
curl
.
RESPONSE_CODE
)
if
self
.
status_code
==
201
or
self
.
status_code
==
200
:
message
=
" Succussfully registered at NRF !!"
self
.
logger
.
info
(
message
)
self
.
trigger_nf_heartbeat
()
else
:
print
(
colored
(
'
\n\n
NF registration failed
\n\n
'
,
'red'
))
def
trigger_nf_heartbeat
(
self
):
patch_data
=
[{
"op"
:
"replace"
,
"path"
:
"/nfStatus"
,
"value"
:
"REGISTERED"
}]
while
True
:
message
=
" Sending NF heartbeat requset (HTTP Version - "
+
str
(
self
.
http_version
)
+
") !!"
self
.
logger
.
info
(
message
)
time
.
sleep
(
5
)
self
.
curl
.
setopt
(
self
.
curl
.
CUSTOMREQUEST
,
'PATCH'
)
self
.
curl
.
setopt
(
self
.
curl
.
POSTFIELDS
,
json
.
dumps
(
patch_data
))
response
=
self
.
curl
.
perform
()
self
.
status_code
=
self
.
curl
.
getinfo
(
self
.
curl
.
RESPONSE_CODE
)
if
self
.
status_code
==
204
:
message
=
" Succussfully received NF heartbeat response !!"
self
.
logger
.
info
(
message
)
else
:
print
(
colored
(
'
\n\n
NF heartbeat procedure failed
\n\n
'
,
'red'
))
def
goodbye
(
self
):
print
(
colored
(
'
\n\n\n
[*] You are now leaving OAI-NRF framework .....
\n\n\n
'
,
'yellow'
))
sys
.
exit
(
0
)
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
(
description
=
'Process commandline arguments and override configurations'
)
parser
.
add_argument
(
'--log'
,
metavar
=
'[level]'
,
action
=
'store'
,
type
=
str
,
required
=
False
,
default
=
'debug'
,
help
=
'set the log level: debug, info (default), warning, error, critical. default = info'
)
parser
.
add_argument
(
'--fqdn'
,
metavar
=
'[number]'
,
action
=
'store'
,
type
=
str
,
required
=
False
,
default
=
'oai-upf-vpp.org'
,
help
=
'set the fqdn for upf. default = oai-upf-vpp.org'
)
parser
.
add_argument
(
'--nrf_ip'
,
metavar
=
'[number]'
,
action
=
'store'
,
type
=
str
,
required
=
False
,
default
=
'192.168.71.130'
,
help
=
'set the nrf ip address. default = 192.168.71.130'
)
parser
.
add_argument
(
'--nrf_port'
,
metavar
=
'[number]'
,
action
=
'store'
,
type
=
str
,
required
=
False
,
default
=
'8080'
,
help
=
'set the nrf ip address. default = 8080'
)
parser
.
add_argument
(
'--http_version'
,
metavar
=
'[number]'
,
action
=
'store'
,
type
=
str
,
required
=
False
,
default
=
'2'
,
help
=
'set the nrf ip address. default = 2'
)
args
=
parser
.
parse_args
()
nrf_client
=
upf_profile
(
args
.
log
,
args
.
fqdn
,
args
.
nrf_ip
,
args
.
nrf_port
,
args
.
http_version
)
nrf_client
.
display_upf_profile
()
nrf_client
.
trigger_nf_registration
()
()
\ No newline at end of file
scripts/run.sh
View file @
30defdf4
#!/bin/
sh -x
#!/bin/
bash
if
[
$(
id
-u
)
-ne
0
]
;
then
exec sudo
-E
"
$0
"
"
$@
"
...
...
@@ -25,10 +25,11 @@ while getopts ":r" opt; do
;;
esac
done
shift
$((
OPTIND-1
))
if
test
-z
"
$1
"
;
then
$APP
$ARGS
$APP
$ARGS
&
elif
test
"
$1
"
=
"debug"
;
then
shift
gdb
-ex
'set print pretty on'
-ex
'run'
--args
$APP
$ARGS
$@
...
...
@@ -37,3 +38,11 @@ else
exit
1
fi
if
[[
${
REGISTER_NRF
}
==
"yes"
]]
;
then
sleep
5
NRF_APP
=
"
$base
/bin/nrf_client.py"
NRF_ARGS
=
" --nrf_ip="
$NRF_IP_ADDR
" --nrf_port="
$NRF_PORT
" --http_version="
$HTTP_VERSION
python
$NRF_APP
$NRF_ARGS
fi
scripts/tests/docker-compose.yml
View file @
30defdf4
version
:
'
3.8'
services
:
mysql
:
container_name
:
mysql
container_name
:
"
mysql"
image
:
mysql:5.7
volumes
:
-
./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
...
...
@@ -19,204 +18,225 @@ services:
timeout
:
5s
retries
:
5
networks
:
public_net
:
ipv4_address
:
192.168.74.200
oai-smf
:
image
:
oai-smf:vpp-upf
depends_on
:
[
oai-vpp
]
container_name
:
oai-smf
privileged
:
true
networks
:
public_net
:
ipv4_address
:
192.168.74.196
public_net_core
:
ipv4_address
:
192.168.71.131
oai-nrf
:
container_name
:
"
oai-nrf"
image
:
oai-nrf:latest
environment
:
INSTANCE
:
1
PID_DIRECTORY
:
/var/run
SMF_INTERFACE_NAME_FOR_N4
:
eth0
SMF_INTERFACE_NAME_FOR_SBI
:
eth0
SMF_INTERFACE_PORT_FOR_SBI
:
80
SMF_INTERFACE_HTTP2_PORT_FOR_SBI
:
8080
SMF_API_VERSION
:
v1
DEFAULT_DNS_IPV4_ADDRESS
:
8.8.8.8
DEFAULT_DNS_SEC_IPV4_ADDRESS
:
8.8.4.4
UE_IP_ADDRESS_POOL
:
'
10.1.1.2
-
10.1.1.200'
AMF_IPV4_ADDRESS
:
192.168.74.195
AMF_PORT
:
80
AMF_API_VERSION
:
v1
UDM_IPV4_ADDRESS
:
192.168.74.194
UDM_PORT
:
80
UDM_API_VERSION
:
v1
UPF_IPV4_ADDRESS
:
192.168.74.202
USE_NETWORK_INSTANCE
:
'
yes'
DISCOVER_UPF
:
'
no'
NRF_API_VERSION
:
'
v1'
NRF_IPV4_ADDRESS
:
'
127.0.0.1'
NRF_PORT
:
'
8080'
REGISTER_NRF
:
'
no'
-
NRF_INTERFACE_NAME_FOR_SBI=eth0
-
NRF_INTERFACE_PORT_FOR_SBI=80
-
NRF_INTERFACE_HTTP2_PORT_FOR_SBI=8080
-
NRF_API_VERSION=v1
-
INSTANCE=0
-
PID_DIRECTORY=/var/run
networks
:
public_net_core
:
ipv4_address
:
192.168.71.130
volumes
:
-
./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck
:
test
:
/bin/bash -c "
pgrep oai_smf
"
test
:
/bin/bash -c "
/openair-nrf/bin/nrf-healthcheck.sh
"
interval
:
10s
timeout
:
5s
retries
:
5
extra_hosts
:
-
"
gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.74.202"
oai-amf
:
image
:
oai-amf:develop
depends_on
:
[
oai-smf
,
mysql
]
container_name
:
oai-amf
privileged
:
true
networks
:
public_net
:
ipv4_address
:
192.168.74.195
container_name
:
"
oai-amf"
image
:
oai-amf:latest
environment
:
INSTANCE
:
1
PID_DIRECTORY
:
/var/run
MCC
:
'
208'
MNC
:
'
95'
REGION_ID
:
'
128'
AMF_SET_ID
:
1
SERVED_GUAMI_MCC_0
:
'
208'
SERVED_GUAMI_MCC_1
:
'
460'
SERVED_GUAMI_MNC_0
:
'
95'
SERVED_GUAMI_MNC_1
:
'
11'
SERVED_GUAMI_REGION_ID_0
:
'
95'
SERVED_GUAMI_REGION_ID_1
:
'
11'
SERVED_GUAMI_AMF_SET_ID_0
:
'
1'
SERVED_GUAMI_AMF_SET_ID_1
:
'
1'
PLMN_SUPPORT_MCC
:
'
208'
PLMN_SUPPORT_MNC
:
'
95'
PLMN_SUPPORT_TAC
:
'
0xa000'
SST_0
:
'
222'
SST_1
:
'
1'
SD_0
:
'
123'
SD_1
:
'
12'
SMF_SELECTION
:
'
no'
SMF_INSTANCE_ID_0
:
1
SMF_INSTANCE_ID_1
:
2
SMF_IPV4_ADDR_0
:
192.168.74.196
SMF_IPV4_ADDR_1
:
127.0.0.1
SMF_HTTP_VERSION_0
:
v1
SMF_HTTP_VERSION_1
:
v1
AMF_INTERFACE_NAME_FOR_NGAP
:
eth0
AMF_INTERFACE_NAME_FOR_N11
:
eth0
AUSF_IPV4_ADDRESS
:
192.168.74.205
AUSF_API_VERSION
:
'
v1'
AUSF_PORT
:
80
NRF_IPV4_ADDRESS
:
192.168.74.206
NRF_API_VERSION
:
'
v1'
NRF_PORT
:
80
MYSQL_SERVER
:
192.168.74.200
MYSQL_USER
:
'
root'
MYSQL_PASS
:
'
linux'
MYSQL_DB
:
'
oai_db'
OPERATOR_KEY
:
'
63bfa50ee6523365ff14c1f45f88737d'
NF_REGISTRATION
:
'
no'
-
TZ=Europe/paris
-
INSTANCE=0
-
PID_DIRECTORY=/var/run
-
MCC=208
-
MNC=95
-
REGION_ID=128
-
AMF_SET_ID=1
-
SERVED_GUAMI_MCC_0=208
-
SERVED_GUAMI_MNC_0=95
-
SERVED_GUAMI_REGION_ID_0=128
-
SERVED_GUAMI_AMF_SET_ID_0=1
-
SERVED_GUAMI_MCC_1=460
-
SERVED_GUAMI_MNC_1=11
-
SERVED_GUAMI_REGION_ID_1=10
-
SERVED_GUAMI_AMF_SET_ID_1=1
-
PLMN_SUPPORT_MCC=208
-
PLMN_SUPPORT_MNC=95
-
PLMN_SUPPORT_TAC=0xa000
-
SST_0=222
-
SD_0=123
-
SST_1=1
-
SD_1=12
-
AMF_INTERFACE_NAME_FOR_NGAP=eth0
-
AMF_INTERFACE_NAME_FOR_N11=eth0
-
SMF_INSTANCE_ID_0=1
-
SMF_FQDN_0=oai-smf
-
SMF_IPV4_ADDR_0=192.168.71.133
-
SMF_HTTP_VERSION_0=v1
-
SMF_INSTANCE_ID_1=2
-
SMF_FQDN_1=oai-smf
-
SMF_IPV4_ADDR_1=0.0.0.0
-
SMF_HTTP_VERSION_1=v1
-
MYSQL_SERVER=192.168.71.131
-
MYSQL_USER=root
-
MYSQL_PASS=linux
-
MYSQL_DB=oai_db
-
OPERATOR_KEY=63bfa50ee6523365ff14c1f45f88737d
-
NRF_IPV4_ADDRESS=0.0.0.0
-
NRF_PORT=80
-
NF_REGISTRATION=no
-
SMF_SELECTION=no
-
USE_FQDN_DNS=no
-
NRF_FQDN=oai-nrf
-
NRF_API_VERSION=v1
-
AUSF_IPV4_ADDRESS=127.0.0.1
-
AUSF_PORT=80
-
AUSF_API_VERSION=v1
depends_on
:
-
mysql
-
vpp-upf
-
oai-ext-dn
volumes
:
-
./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck
:
test
:
/bin/bash -c "
pgrep oai_amf
"
test
:
/bin/bash -c "
/openair-amf/bin/amf-healthcheck.sh
"
interval
:
10s
timeout
:
5s
retries
:
5
oai-vpp
:
image
:
vpp-upg:develop
timeout
:
15s
retries
:
5
networks
:
public_net_core
:
ipv4_address
:
192.168.71.132
oai-smf
:
container_name
:
"
oai-smf"
image
:
oai-smf:latest
environment
:
-
TZ=Europe/Paris
-
INSTANCE=0
-
PID_DIRECTORY=/var/run
-
SMF_INTERFACE_NAME_FOR_N4=eth0
-
SMF_INTERFACE_NAME_FOR_SBI=eth0
-
SMF_INTERFACE_PORT_FOR_SBI=80
-
SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
-
SMF_API_VERSION=v1
-
DEFAULT_DNS_IPV4_ADDRESS=192.168.18.129
-
DEFAULT_DNS_SEC_IPV4_ADDRESS=8.8.8.8
-
AMF_FQDN=oai-amf
-
AMF_IPV4_ADDRESS=192.168.71.132
-
AMF_PORT=80
-
AMF_API_VERSION=v1
-
UDM_IPV4_ADDRESS=127.0.0.1
-
UDM_FQDN=localhost
-
UDM_PORT=80
-
UDM_API_VERSION=v1
-
UPF_FQDN_0=gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org
-
UPF_IPV4_ADDRESS=192.168.71.202
-
NRF_FQDN=oai-nrf
-
NRF_IPV4_ADDRESS=0.0.0.0
-
NRF_PORT=80
-
NRF_API_VERSION=v1
-
REGISTER_NRF=no
-
DISCOVER_UPF=no
-
USE_NETWORK_INSTANCE=yes
-
USE_FQDN_DNS=no
extra_hosts
:
-
"
gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.71.202"
depends_on
:
-
oai-amf
volumes
:
-
./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
-
/home/rohan/gitrepo/oai-cn5g-smf:/oai-cn5g-smf
healthcheck
:
test
:
/bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval
:
10s
timeout
:
5s
retries
:
5
networks
:
public_net_core
:
ipv4_address
:
192.168.71.133
entrypoint
:
/bin/bash -c "sleep infinity"
vpp-upf
:
image
:
vpp-upg:latest
privileged
:
true
container_name
:
vpp-upf
networks
:
public_net_access
:
ipv4_address
:
192.168.75.197
public_net
:
ipv4_address
:
192.168.74.197
public_net_sgi_lan
:
ipv4_address
:
192.168.76.197
environment
:
NWI_CORE
:
"
core.oai"
NWI_ACCESS
:
"
access.oai"
NWI_SGI
:
"
sgi.oai"
GW_ID
:
"
1"
MNC03
:
"
95"
MCC
:
"
208"
REALM
:
"
3gppnetwork.org"
NETWORK_UE_IP
:
"
12.1.1.0/24"
N3_IPV4_ADDRESS_REMOTE
:
"
192.168.75.198"
N3_IPV4_ADDRESS_LOCAL
:
"
192.168.75.202"
N4_IPV4_ADDRESS_REMOTE
:
"
192.168.74.196"
N4_IPV4_ADDRESS_LOCAL
:
"
192.168.74.202"
N6_IPV4_ADDRESS_REMOTE
:
"
192.168.76.205"
N6_IPV4_ADDRESS_LOCAL
:
"
192.168.76.202"
VPP_MAIN_CORE
:
0
VPP_CORE_WORKER
:
1
# VPP_PLUGIN_PATH: "/usr/lib64/vpp_plugins/" # RHEL7
VPP_PLUGIN_PATH
:
"
/usr/lib/x86_64-linux-gnu/vpp_plugins/"
# Ubntu18.04
INTERFACE_ACCESS
:
"
eth0"
INTERFACE_CORE
:
"
eth1"
INTERFACE_SGI
:
"
eth2"
-
NWI_CORE=core.oai.org
-
NWI_ACCESS=access.oai.org
-
NWI_SGI=sgi.oai.org
-
GW_ID=1
-
MNC03=95
-
MCC=208
-
REALM=3gppnetwork.org
-
NETWORK_UE_IP=12.1.1.0/24
-
N3_IPV4_ADDRESS_REMOTE=192.168.72.141
-
N3_IPV4_ADDRESS_LOCAL=192.168.72.202
-
N4_IPV4_ADDRESS_REMOTE=192.168.71.133
-
N4_IPV4_ADDRESS_LOCAL=192.168.71.202
-
N6_IPV4_ADDRESS_REMOTE=192.168.73.135
-
N6_IPV4_ADDRESS_LOCAL=192.168.73.202
-
VPP_MAIN_CORE=0
-
VPP_CORE_WORKER=1
# - VPP_PLUGIN_PATH=/usr/lib64/vpp_plugins/ # RHEL7
-
VPP_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/vpp_plugins/
# Ubntu18.04
-
INTERFACE_ACCESS=eth0
-
INTERFACE_CORE=eth1
-
INTERFACE_SGI=eth2
-
NSSAI_SD_0=222
-
SST=123
-
DNN=default
-
REGISTER_NRF=yes
-
NRF_IP_ADDR=192.168.71.130
-
NRF_PORT=8080
-
HTTP_VERSION=2
healthcheck
:
test
:
/bin/bash -c "pgrep vpp"
interval
:
10s
timeout
:
5s
retries
:
5
oai-nat
:
image
:
ubuntu:bionic
privileged
:
true
container_name
:
oai-nat
retries
:
5
networks
:
public_net
:
ipv4_address
:
192.168.74.205
public_net_core
:
ipv4_address
:
192.168.71.134
public_net_access
:
ipv4_address
:
192.168.72.134
public_net_sgi_lan
:
ipv4_address
:
192.168.76.205
ipv4_address
:
192.168.73.134
entrypoint
:
/bin/bash -c "sleep infinity"
oai-ext-dn
:
image
:
ubuntu:bionic
privileged
:
true
container_name
:
oai-ext-dn
entrypoint
:
/bin/bash -c \
"apt update; apt install -y iptables iproute2 iputils-ping
net-tools python iperf3
;"\
"apt update; apt install -y iptables iproute2 iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.76.202 dev eth1; sleep infinity"
gnbsim
:
image
:
gnbsim:latest
depends_on
:
[
oai-amf
]
privileged
:
true
container_name
:
gnbsim
environment
:
MCC
:
208
MNC
:
95
GNBID
:
1
TAC
:
'
0x00a000'
SST
:
'
222'
SD
:
'
00007b'
PagingDRX
:
'
v32'
RANUENGAPID
:
0
IMEISV
:
'
35609204079514'
MSIN
:
'
0000000031'
RoutingIndicator
:
1234
ProtectionScheme
:
'
null'
KEY
:
'
0C0A34601D4F07677303652C0462535B'
OPc
:
'
63bfa50ee6523365ff14c1f45f88737d'
DNN
:
'
default'
URL
:
'
http://192.168.76.205:8000'
NRCellID
:
1
NGAPPeerAddr
:
'
192.168.74.195'
GTPuLocalAddr
:
'
192.168.75.198'
GTPuIFname
:
'
eth0'
"ip route add 12.1.1.0/24 via 192.168.73.202 dev eth0; sleep infinity"
command
:
[
"
/bin/bash"
,
"
-c"
,
"
trap
:
TERM
INT;
sleep
infinity
&
wait"
]
depends_on
:
-
vpp-upf
networks
:
public_net
:
ipv4_address
:
192.168.74.198
public_net_access
:
ipv4_address
:
192.168.75.198
healthcheck
:
test
:
/bin/bash -c "ifconfig gtp-gnb"
interval
:
10s
timeout
:
5s
retries
:
5
public_net_sgi_lan
:
ipv4_address
:
192.168.73.135
networks
:
public_net
:
name
:
oai-public-
net
public_net
_core
:
name
:
oai-public-
core
ipam
:
config
:
-
subnet
:
192.168.7
4
.0/24
-
subnet
:
192.168.7
1
.0/24
public_net_access
:
name
:
oai-public-access
ipam
:
config
:
-
subnet
:
192.168.7
5
.0/24
-
subnet
:
192.168.7
2
.0/24
public_net_sgi_lan
:
name
:
oai-public-sgi-lan
ipam
:
config
:
-
subnet
:
192.168.76.0/24
-
subnet
:
192.168.73.0/24
# Incase the user wants docker-compose to create a bridge rather than creating the bridge manually then uncomment the below lines
# public_net:
# driver: bridge
# name: demo-oai-public-net
# ipam:
# config:
# - subnet: 192.168.71.128/26
# driver_opts:
# com.docker.network.bridge.name: "demo-oai"
scripts/upf_conf/upf_profile.json
0 → 100644
View file @
30defdf4
{
"capacity"
:
100
,
"fqdn"
:
"gw@GW_ID@.vppupf.node.5gcn.mnc@MNC03@.mcc@MCC@.@REALM@"
,
"heartBeatTimer"
:
10
,
"ipv4Addresses"
:
[
"@N4_IPV4_ADDRESS_LOCAL@"
],
"json_data"
:
null
,
"nfInstanceName"
:
"OAI-UPF-VPP"
,
"nfServices"
:
[],
"nfStatus"
:
"REGISTERED"
,
"nfType"
:
"UPF"
,
"priority"
:
1
,
"sNssais"
:
[{
"sd"
:
"@NSSAI_SD_0@"
,
"sst"
:
@SST@
}],
"upfInfo"
:
{
"sNssaiUpfInfoList"
:
[{
"dnnUpfInfoList"
:
[{
"dnn"
:
"@DNN@"
}],
"sNssai"
:
{
"sd"
:
"@NSSAI_SD_0@"
,
"sst"
:
@SST@
}
}],
"interfaceUpfInfoList"
:
[{
"endpointFqdn"
:
"@NWI_ACCESS@"
,
"interfaceType"
:
"N3"
,
"ipv4EndpointAddresses"
:
[
"@ACCESS_IPV4@"
],
"networkInstance"
:
"@NWI_ACCESS@"
},
{
"endpointFqdn"
:
"@NWI_CORE@"
,
"interfaceType"
:
"N6"
,
"ipv4EndpointAddresses"
:
[
"@CORE_IPV4@"
],
"networkInstance"
:
"@NWI_CORE@"
}]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment