Commit 28ac58cb authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

Update network topology for testing SMF locally

parent 14f156f3
......@@ -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
......
......@@ -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@]='8383'
SMF_CONF[@UDM_PORT@]='80'
SMF_CONF[@AMF_IPV4_ADDRESS@]='172.16.1.102'
SMF_CONF[@AMF_PORT@]='8282'
SMF_CONF[@AMF_PORT@]='80'
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'
......
......@@ -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 = (
......
......@@ -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
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" )
......
......@@ -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(8282));
Pistache::Address addr("172.16.1.102", Pistache::Port(80));
httpEndpoint = new Pistache::Http::Endpoint((addr));
auto router = std::make_shared<Pistache::Rest::Router>();
......
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" )
......
......@@ -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(8383));
Pistache::Address addr("172.16.1.103", Pistache::Port(80));
httpEndpoint = new Pistache::Http::Endpoint((addr));
auto router = std::make_shared<Pistache::Rest::Router>();
......
################################################################################
# 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" ;}
);
};
# 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:upf'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SX@]='eno1:un4'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SGI@]='eno1'
for K in "${!SPGWU_CONF[@]}"; do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment