Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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-SMF
Commits
28ac58cb
Commit
28ac58cb
authored
Apr 10, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update network topology for testing SMF locally
parent
14f156f3
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
154 additions
and
49 deletions
+154
-49
README.txt
README.txt
+15
-4
build/scripts/smf_conf.sh
build/scripts/smf_conf.sh
+11
-8
etc/smf.conf
etc/smf.conf
+8
-30
src/common/smf.h
src/common/smf.h
+3
-0
src/test/amf/CMakeLists.txt
src/test/amf/CMakeLists.txt
+1
-1
src/test/amf/amf-api-server.cpp
src/test/amf/amf-api-server.cpp
+1
-1
src/test/udm/CMakeLists.txt
src/test/udm/CMakeLists.txt
+1
-1
src/test/udm/udm-api-server.cpp
src/test/udm/udm-api-server.cpp
+1
-1
src/test/upf/spgw_u.conf
src/test/upf/spgw_u.conf
+108
-0
src/test/upf/spgwu_conf.sh
src/test/upf/spgwu_conf.sh
+5
-3
No files found.
README.txt
View file @
28ac58cb
...
...
@@ -28,7 +28,17 @@ openair-cn5g-smf
├── utils: Common utilities.
└── udp : UDP server implementation.
# OAI-SMF
# OAI-SMF testbed: network topology
AMF (eno1:amf 172.16.1.102)-----------------SBI interfaces-----------------(eno1:udm 172.16.1.103) UDM
|
|
(eno1:smf 172.16.1.101)
SMF
(eno1:sn4 172.16.2.101)
|
|
(eno1:sn4 172.16.2.102)
gNB (172.16.3.101)---(eno1:s1u 172.16.3.102)UPF/SPGW-U (SGI: eno1)----------------------------DNN
## Download source code from Gitlab
git clone https://gitlab.eurecom.fr/oai/oai-cn5g-smf/
...
...
@@ -54,7 +64,8 @@ cd /openair-cn-cups/build/scripts
./build_spgwu -I -f
./build_spgwu -c -V -b Debug -j
cp /oai-cn5g-smf/src/test/upf/spgwu_conf.sh .
#configure SPGWU using an example configure file (spgw_u.conf)
cd /oai-cn5g-smf/src/test/upf/
./spgwu_conf.sh
sudo spgwu -c /usr/local/etc/oai/spgw_u.conf -o
...
...
@@ -64,7 +75,7 @@ mkdir build
cd build
cmake ..
make
./udm-server
sudo
./udm-server
## Build and launch AMF server
cd /oai-cn5g-smf/src/test/amf
...
...
@@ -72,7 +83,7 @@ mkdir build
cd build
cmake ..
make
./amf-api
-server
sudo ./amf
-server
## Build and launch AMF client
cd /oai-cn5g-smf/src/test/amf_client
...
...
build/scripts/smf_conf.sh
View file @
28ac58cb
...
...
@@ -2,7 +2,9 @@
sudo
ifconfig eno1:smf 172.16.1.101 up
# SMF
sudo
ifconfig eno1:amf 172.16.1.102 up
# AMF
sudo
ifconfig eno1:udm 172.16.1.103 up
# UDM
sudo
ifconfig eno1:upf 172.16.1.104 up
# UPF
sudo
ifconfig eno1:sn4 172.16.2.101 up
# SMF N4 interface
sudo
ifconfig eno1:un4 172.16.2.102 up
# UPF N4 interface
INSTANCE
=
1
PREFIX
=
'/usr/local/etc/oai'
...
...
@@ -14,19 +16,20 @@ declare -A SMF_CONF
SMF_CONF[@INSTANCE@]
=
$INSTANCE
SMF_CONF[@PREFIX@]
=
$PREFIX
SMF_CONF[@PID_DIRECTORY@]
=
'/var/run'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]
=
'eno1:smf'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N11@]
=
'eno1:smf'
SMF_CONF[@SMF_INTERFACE_IPV4_ADDRESS_FOR_N11@]
=
'172.16.1.101'
SMF_CONF[@SMF_INTERFACE_PORT_FOR_N11@]
=
'80'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]
=
'eno1:sn4'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]
=
'eno1:smf'
SMF_CONF[@SMF_INTERFACE_IPV4_ADDRESS_FOR_SBI@]
=
'172.16.1.101'
SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]
=
'80'
SMF_CONF[@UDM_IPV4_ADDRESS@]
=
'172.16.1.103'
SMF_CONF[@UDM_PORT@]
=
'8
383
'
SMF_CONF[@UDM_PORT@]
=
'8
0
'
SMF_CONF[@AMF_IPV4_ADDRESS@]
=
'172.16.1.102'
SMF_CONF[@AMF_PORT@]
=
'8
282
'
SMF_CONF[@AMF_PORT@]
=
'8
0
'
SMF_CONF[@UPF_IPV4_ADDRESS@]
=
'172.16.
1.104
'
SMF_CONF[@UPF_IPV4_ADDRESS@]
=
'172.16.
2.102
'
SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]
=
'8.8.8.8'
SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]
=
'4.4.4.4'
...
...
etc/smf.conf
View file @
28ac58cb
...
...
@@ -23,28 +23,6 @@ SMF =
INSTANCE
= @
INSTANCE
@;
# 0 is the default
PID_DIRECTORY
=
"@PID_DIRECTORY@"
;
# /var/run is the default
#ITTI_TASKS :
#{
#ITTI_TIMER_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 85;
#};
#SMF_APP_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 84;
#};
#ASYNC_CMD_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 84;
#};
#};
INTERFACES
:
{
N4
:
...
...
@@ -54,16 +32,16 @@ SMF =
IPV4_ADDRESS
=
"read"
;
# STRING, CIDR or "read" to let app read interface configured IP address
};
N11
:
SBI
:
{
# SMF binded interface for
N11 communication (AMF
)
INTERFACE_NAME
=
"@SMF_INTERFACE_NAME_FOR_
N11
@"
;
# STRING, interface name
#IPV4_ADDRESS = "@SMF_INTERFACE_IPV4_ADDRESS_FOR_
N11
@"; # STRING, CIDR or "read" to let app read interface configured IP address
# SMF binded interface for
SBI interface (e.g., communication with AMF, UDM
)
INTERFACE_NAME
=
"@SMF_INTERFACE_NAME_FOR_
SBI
@"
;
# STRING, interface name
#IPV4_ADDRESS = "@SMF_INTERFACE_IPV4_ADDRESS_FOR_
SBI
@"; # STRING, CIDR or "read" to let app read interface configured IP address
IPV4_ADDRESS
=
"read"
;
PORT
= @
SMF_INTERFACE_PORT_FOR_
N11
@
PORT
= @
SMF_INTERFACE_PORT_FOR_
SBI
@
#Normally we don't need this (default port 80)
};
TEST_UPF
:
TEST_UPF
:
#for BUPT test only!
{
# P-GW binded interface for SX communication
IS_TEST
=
"0"
;
# 0: no test,1:test
...
...
@@ -120,12 +98,12 @@ SMF =
AMF
:
{
IPV4_ADDRESS
=
"@AMF_IPV4_ADDRESS@"
;
PORT
= @
AMF_PORT
@;
PORT
= @
AMF_PORT
@;
#should be removed (default: 80)
};
UDM
:
{
IPV4_ADDRESS
=
"@UDM_IPV4_ADDRESS@"
;
PORT
= @
UDM_PORT
@;
PORT
= @
UDM_PORT
@;
#should be removed (default 80)
};
UPF_LIST
= (
...
...
src/common/smf.h
View file @
28ac58cb
...
...
@@ -207,4 +207,7 @@ static const std::vector<std::string> multipart_related_content_part_e2str = {
"NGAP"
};
#define NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL "/namf-comm/v2/ue-contexts/{}/n1-n2-messages" //may get from configuration file
#define NUDM_SDM_GET_SM_DATA_URL "/nudm-sdm/v2/{}/sm-data" //may get from configuration file
#endif
src/test/amf/CMakeLists.txt
View file @
28ac58cb
cmake_minimum_required
(
VERSION 3.2
)
project
(
amf-
api-
server
)
project
(
amf-server
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11 -pg -g3"
)
...
...
src/test/amf/amf-api-server.cpp
View file @
28ac58cb
...
...
@@ -71,7 +71,7 @@ int main() {
std
::
vector
<
int
>
sigs
{
SIGQUIT
,
SIGINT
,
SIGTERM
,
SIGHUP
};
setUpUnixSignals
(
sigs
);
#endif
Pistache
::
Address
addr
(
"172.16.1.102"
,
Pistache
::
Port
(
8
282
));
Pistache
::
Address
addr
(
"172.16.1.102"
,
Pistache
::
Port
(
8
0
));
httpEndpoint
=
new
Pistache
::
Http
::
Endpoint
((
addr
));
auto
router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
...
...
src/test/udm/CMakeLists.txt
View file @
28ac58cb
cmake_minimum_required
(
VERSION 3.2
)
project
(
udm-
api-
server
)
project
(
udm-server
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11 -pg -g3"
)
...
...
src/test/udm/udm-api-server.cpp
View file @
28ac58cb
...
...
@@ -82,7 +82,7 @@ int main() {
std
::
vector
<
int
>
sigs
{
SIGQUIT
,
SIGINT
,
SIGTERM
,
SIGHUP
};
setUpUnixSignals
(
sigs
);
#endif
Pistache
::
Address
addr
(
"172.16.1.103"
,
Pistache
::
Port
(
8
383
));
Pistache
::
Address
addr
(
"172.16.1.103"
,
Pistache
::
Port
(
8
0
));
httpEndpoint
=
new
Pistache
::
Http
::
Endpoint
((
addr
));
auto
router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
...
...
src/test/upf/spgw_u.conf
0 → 100644
View file @
28ac58cb
################################################################################
# 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
################################################################################
SPGW
-
U
=
{
INSTANCE
= @
INSTANCE
@;
# 0 is the default
PID_DIRECTORY
=
"@PID_DIRECTORY@"
;
# /var/run is the default
#ITTI_TASKS :
#{
#ITTI_TIMER_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 85;
#};
#S1U_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 84;
#};
#SX_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 84;
#};
#ASYNC_CMD_SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 84;
#};
#};
INTERFACES
:
{
S1U_S12_S4_UP
:
{
# S-GW binded interface for S1-U communication (GTPV1-U) can be ethernet interface, virtual ethernet interface, we don't advise wireless interfaces
INTERFACE_NAME
=
"@SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP@"
;
# STRING, interface name, YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
# STRING, CIDR or "read to let app read interface configured IP address
#PORT = 2152; # Default is 2152
#SCHED_PARAMS :
#{
#CPU_ID = 2;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 98;
#};
};
SX
:
{
# S/P-GW binded interface for SX communication
INTERFACE_NAME
=
"@SGW_INTERFACE_NAME_FOR_SX@"
;
# STRING, interface name
IPV4_ADDRESS
=
"read"
;
# STRING, CIDR or "read" to let app read interface configured IP address
#PORT = 8805; # Default is 8805
#SCHED_PARAMS :
#{
#CPU_ID = 1;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 95;
#};
};
SGI
:
{
# No config to set, the software will set the SGi interface to the interface used for the default route.
INTERFACE_NAME
=
"@SGW_INTERFACE_NAME_FOR_SGI@"
;
# STRING, interface name or "default_gateway"
IPV4_ADDRESS
=
"read"
;
# STRING, CIDR or "read" to let app read interface configured IP address
#SCHED_PARAMS :
#{
#CPU_ID = 3;
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
#SCHED_PRIORITY = 98;
#};
};
};
PDN_NETWORK_LIST
= (
{
NETWORK_IPV4
=
"12.1.1.0/24"
;
NETWORK_IPV6
=
"2001:1:2::0/64"
;
SNAT
=
"yes"
;},
{
NETWORK_IPV4
=
"12.1.2.0/24"
;
SNAT
=
"no"
;},
{
NETWORK_IPV4
=
"192.169.0.0/24"
;
SNAT
=
"no"
;},
{
NETWORK_IPV4
=
"192.170.0.0/24"
;
SNAT
=
"no"
;},
{
NETWORK_IPV4
=
"192.171.0.0/24"
;
SNAT
=
"no"
;}
);
SPGW
-
C_LIST
= (
{
IPV4_ADDRESS
=
"172.16.1.101"
;}
);
};
src/test/upf/spgwu_conf.sh
View file @
28ac58cb
# prompt has been removed for easier Ctrl+C Ctrl+V
sudo
ifconfig eno1:s1u 192.168.248.159 up
# SPGW-U S1U interface
sudo
ifconfig eno1:s1u 172.16.3.102 up
# SPGW-U S1U interface
#sudo ifconfig eno1:un4 172.16.2.102 up # SPGW-U SX interface
INSTANCE
=
1
PREFIX
=
'/usr/local/etc/oai'
sudo mkdir
-m
0777
-p
$PREFIX
cp
.
./../etc
/spgw_u.conf
$PREFIX
cp
./spgw_u.conf
$PREFIX
declare
-A
SPGWU_CONF
...
...
@@ -11,7 +13,7 @@ SPGWU_CONF[@INSTANCE@]=$INSTANCE
SPGWU_CONF[@PREFIX@]
=
$PREFIX
SPGWU_CONF[@PID_DIRECTORY@]
=
'/var/run'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP@]
=
'eno1:s1u'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SX@]
=
'eno1:u
pf
'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SX@]
=
'eno1:u
n4
'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SGI@]
=
'eno1'
for
K
in
"
${
!SPGWU_CONF[@]
}
"
;
do
...
...
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