Commit 729aa14e authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Update configuration file

parent e3f9f661
# prompt has been removed for easier Ctrl+C Ctrl+V
# please update the following information according to your configuration
INSTANCE=1
PREFIX='/usr/local/etc/oai'
sudo mkdir -m 0777 -p $PREFIX
cp ../../etc/amf.conf $PREFIX
declare -A AMF_CONF
AMF_CONF[@INSTANCE@]=$INSTANCE
AMF_CONF[@PREFIX@]=$PREFIX
AMF_CONF[@PID_DIRECTORY@]='/var/run'
AMF_CONF[@MCC@]='208'
AMF_CONF[@MNC@]='95'
AMF_CONF[@REGION_ID@]='128'
AMF_CONF[@AMF_SET_ID@]='1'
AMF_CONF[@SERVED_GUAMI_MCC_0@]='208'
AMF_CONF[@SERVED_GUAMI_MNC_0@]='95'
AMF_CONF[@SERVED_GUAMI_REGION_ID_0@]='128'
AMF_CONF[@SERVED_GUAMI_AMF_SET_ID_0@]='1'
AMF_CONF[@SERVED_GUAMI_MCC_1@]='460'
AMF_CONF[@SERVED_GUAMI_MNC_1@]='11'
AMF_CONF[@SERVED_GUAMI_REGION_ID_1@]='10'
AMF_CONF[@SERVED_GUAMI_AMF_SET_ID_1@]='1'
AMF_CONF[@PLMN_SUPPORT_MCC@]='208'
AMF_CONF[@PLMN_SUPPORT_MNC@]='95'
AMF_CONF[@PLMN_SUPPORT_TAC@]='0xa000'
AMF_CONF[@SST_0@]='222'
AMF_CONF[@SD_0@]='123'
AMF_CONF[@SST_1@]='1'
AMF_CONF[@SD_1@]='12'
AMF_CONF[@AMF_INTERFACE_NAME_FOR_NGAP@]='ens3'
AMF_CONF[@AMF_INTERFACE_NAME_FOR_N11@]='ens3'
AMF_CONF[@SMF_INSTANCE_ID_0@]='1'
AMF_CONF[@SMF_IPV4_ADDR_0@]='192.168.122.1'
AMF_CONF[@SMF_HTTP_VERSION_0@]='v1'
AMF_CONF[@SMF_INSTANCE_ID_1@]='2'
AMF_CONF[@SMF_IPV4_ADDR_1@]='192.168.122.2'
AMF_CONF[@SMF_HTTP_VERSION_1@]='v1'
AMF_CONF[@MYSQL_SERVER@]='127.0.0.1'
AMF_CONF[@MYSQL_USER@]='root'
AMF_CONF[@MYSQL_PASS@]='linux'
AMF_CONF[@MYSQL_DB@]='oai_db'
AMF_CONF[@OPERATOR_KEY@]='63bfa50ee6523365ff14c1f45f88737d'
for K in "${!AMF_CONF[@]}"; do
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${AMF_CONF[$K]}|g"
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${AMF_CONF[$K]}"
done
......@@ -18,65 +18,88 @@
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
AMF =
{
INSTANCE_ID = 10;
PID_DIRECTORY = "/var/run";
INSTANCE_ID = @INSTANCE@; # 0 is the default
PID_DIRECTORY = "@PID_DIRECTORY@"; # /var/run is the default
########################## NG SETUP RESPONSE IEs ###############################
AMF_NAME = "OAI-AMF";
GUAMI:{MCC = "208"; MNC = "95"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "1"}
ServedGUAMIList = (
{MCC = "208"; MNC = "95"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "0"}, #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "460"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
RELATIVE_CAPACITY = 30;
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL = 20; # YOUR CONFIG HERE
CORE_CONFIGURATION:
{
EMERGENCY_SUPPORT = "false";
};
GUAMI:
{
MCC = "@MCC@"; MNC = "@MNC@"; RegionID = "@REGION_ID@"; AMFSetID = "@AMF_SET_ID@"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST = (
{MCC = "@SERVED_GUAMI_MCC_0@"; MNC = "@SERVED_GUAMI_MNC_0@"; RegionID = "@SERVED_GUAMI_REGION_ID_0@"; AMFSetID = "@SERVED_GUAMI_AMF_SET_ID_0@"; AMFPointer = "0"}, #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "@SERVED_GUAMI_MCC_1@"; MNC = "@SERVED_GUAMI_MNC_1@"; RegionID = "@SERVED_GUAMI_REGION_ID_1@"; AMFSetID = "@SERVED_GUAMI_AMF_SET_ID_1@"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
RelativeAMFCapacity = 30;
PLMNSupportList = (
{MCC = "208"; MNC = "95"; TAC = 0xa000;
SliceSupportList = (
{SST = "222"; SD = "123"},
{SST = "1"; SD = "none"},
{SST = "1"; SD = "12"}
PLMN_SUPPORT_LIST = (
{
MCC = "@PLMN_SUPPORT_MCC@"; MNC = "@PLMN_SUPPORT_MNC@"; TAC = @PLMN_SUPPORT_TAC@; # YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST = (
{SST = "@SST_0@"; SD = "@SD_0@"}, # YOUR NSSAI CONFIG HERE
{SST = "@SST_1@"; SD = "@SD_1@"} # YOUR NSSAI CONFIG HERE
)
}
}
);
######################### clause 9.2.6.2, 3gpp ts38.413 #######################
STATISTICS_TIMER_INTERVAL = 20; #second
INTERFACES:{
NGAP_AMF:{
INTERFACE_NAME = "ens3";
INTERFACES:
{
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF:
{
INTERFACE_NAME = "@AMF_INTERFACE_NAME_FOR_NGAP@"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 38412;
PPID = 60;
PORT = 38412; # YOUR NETWORK CONFIG HERE
PPID = 60; # YOUR NETWORK CONFIG HERE
};
N11:{
INTERFACE_NAME = "ens3";
IPV4_ADDRESS = "read";
PORT = 80;
# AMF binded interface for N11
N11:
{
INTERFACE_NAME = "@AMF_INTERFACE_NAME_FOR_N11@"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 80; # YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.122.1"; PORT = "80"; VERSION = "v2"; SELECTED = "true"},
{SMF_INSTANCE_ID = 2; IPV4_ADDRESS = "10.103.238.21"; PORT = "8181"; VERSION = "v1"; SELECTED = "false"}
{SMF_INSTANCE_ID = @SMF_INSTANCE_ID_0@; IPV4_ADDRESS = "@SMF_IPV4_ADDR_0@"; PORT = "80"; VERSION = "@SMF_HTTP_VERSION_0@"; SELECTED = "true"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = @SMF_INSTANCE_ID_1@; IPV4_ADDRESS = "@SMF_IPV4_ADDR_1@"; PORT = "80"; VERSION = "@SMF_HTTP_VERSION_1@"; SELECTED = "false"} # YOUR SMF CONFIG HERE
);
};
};
CORE_CONFIGURATION:{
EMERGENCY_SUPPORT = "false";
};
AUTHENTICATION:{
MYSQL_server = "127.0.0.1";
MYSQL_user = "root"; # Database server login
MYSQL_pass = "linux"; # Database server password
MYSQL_db = "oai_db";
OPERATOR_key = "63bfa50ee6523365ff14c1f45f88737d";
AUTHENTICATION:
{
## MySQL mandatory options
MYSQL_server = "@MYSQL_SERVER@"; # MySQL Server address
MYSQL_user = "@MYSQL_USER@"; # Database server login
MYSQL_pass = "@MYSQL_PASS@"; # Database server password
MYSQL_db = "@MYSQL_DB@"; # Your database name
## OP
OPERATOR_key = "@OPERATOR_KEY@"; # OP key matching your database
RANDOM = "true";
};
NAS:{
#ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA2" , "NIA1" , "NIA0" ];
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA0" , "NIA1" , "NIA1" ];
NAS:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA0" , "NIA1" , "NIA2" ];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA0" , "NEA1" , "NEA2" ];
#ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA1" , "NEA1" , "NEA1" ];
};
};
......
################################################################################
# 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
################################################################################
AMF =
{
INSTANCE_ID = 1; # 0 is the default
PID_DIRECTORY = "/var/run"; # /var/run is the default
AMF_NAME = "OAI-AMF";
RELATIVE_CAPACITY = 30;
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL = 20; # YOUR CONFIG HERE
CORE_CONFIGURATION:
{
EMERGENCY_SUPPORT = "false";
};
GUAMI:
{
MCC = "208"; MNC = "95"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST = (
{MCC = "208"; MNC = "95"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "0"}, #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "460"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST = (
{
MCC = "208"; MNC = "95"; TAC = 0xa000; # YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST = (
{SST = "222"; SD = "123"}, # YOUR NSSAI CONFIG HERE
{SST = "1"; SD = "12"} # YOUR NSSAI CONFIG HERE
)
}
);
INTERFACES:
{
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF:
{
INTERFACE_NAME = "ens3"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 38412; # YOUR NETWORK CONFIG HERE
PPID = 60; # YOUR NETWORK CONFIG HERE
};
# AMF binded interface for N11
N11:
{
INTERFACE_NAME = "ens3"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 80; # YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.122.1"; PORT = "80"; VERSION = "v1"; SELECTED = "true"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = 2; IPV4_ADDRESS = "192.168.122.2"; PORT = "80"; VERSION = "v1"; SELECTED = "false"} # YOUR SMF CONFIG HERE
);
};
};
AUTHENTICATION:
{
## MySQL mandatory options
MYSQL_server = "127.0.0.1"; # MySQL Server address
MYSQL_user = "root"; # Database server login
MYSQL_pass = "linux"; # Database server password
MYSQL_db = "oai_db"; # Your database name
## OP
OPERATOR_key = "63bfa50ee6523365ff14c1f45f88737d"; # OP key matching your database
RANDOM = "true";
};
NAS:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA0" , "NIA1" , "NIA2" ];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA0" , "NEA1" , "NEA2" ];
};
};
MODULES =
{
NGAP_MESSAGE = (
{MSG_NAME = "NGSetupRequest"; ProcedureCode = 21; TypeOfMessage = "initialMessage"}
);
};
......@@ -113,7 +113,7 @@ int amf_config::load(const std::string &config_file) {
Logger::amf_app().error("%s : %s, using defaults", nfex.what(), nfex.getPath());
}
try {
const Setting &guami_list_cfg = amf_cfg[AMF_CONFIG_STRING_ServedGUAMIList];
const Setting &guami_list_cfg = amf_cfg[AMF_CONFIG_STRING_SERVED_GUAMI_LIST];
int count = guami_list_cfg.getLength();
for (int i = 0; i < count; i++) {
guami_t guami;
......@@ -129,12 +129,12 @@ int amf_config::load(const std::string &config_file) {
Logger::amf_app().error("%s : %s, using defaults", nfex.what(), nfex.getPath());
}
try {
amf_cfg.lookupValue(AMF_CONFIG_STRING_RelativeAMFCapacity, relativeAMFCapacity);
amf_cfg.lookupValue(AMF_CONFIG_STRING_RELATIVE_AMF_CAPACITY, relativeAMFCapacity);
} catch (const SettingNotFoundException &nfex) {
Logger::amf_app().error("%s : %s, using defaults", nfex.what(), nfex.getPath());
}
try {
const Setting &plmn_list_cfg = amf_cfg[AMF_CONFIG_STRING_PLMNSupportList];
const Setting &plmn_list_cfg = amf_cfg[AMF_CONFIG_STRING_PLMN_SUPPORT_LIST];
int count = plmn_list_cfg.getLength();
for (int i = 0; i < count; i++) {
plmn_item_t plmn_item;
......@@ -142,7 +142,7 @@ int amf_config::load(const std::string &config_file) {
item.lookupValue(AMF_CONFIG_STRING_MCC, plmn_item.mcc);
item.lookupValue(AMF_CONFIG_STRING_MNC, plmn_item.mnc);
item.lookupValue(AMF_CONFIG_STRING_TAC, plmn_item.tac);
const Setting &slice_list_cfg = plmn_list_cfg[i][AMF_CONFIG_STRING_SliceSupportList];
const Setting &slice_list_cfg = plmn_list_cfg[i][AMF_CONFIG_STRING_SLICE_SUPPORT_LIST];
int numOfSlice = slice_list_cfg.getLength();
for (int j = 0; j < numOfSlice; j++) {
slice_t slice;
......@@ -249,16 +249,16 @@ void amf_config::display() {
Logger::config().info("- AMF NAME............................................: %s", AMF_Name.c_str());
Logger::config().info("- GUAMI (MCC, MNC, Region ID, AMF Set ID, AMF pointer): ");
Logger::config().info(" (%s, %s, %s, %s, %s )", guami.mcc.c_str(), guami.mnc.c_str(), guami.regionID.c_str(), guami.AmfSetID.c_str(), guami.AmfPointer.c_str());
Logger::config().info("- ServedGUAMIList ....................................: ");
Logger::config().info("- SERVED_GUAMI_LIST...................................: ");
for (int i = 0; i < guami_list.size(); i++) {
Logger::config().info(" (%s, %s, %s , %s, %s)", guami_list[i].mcc.c_str(), guami_list[i].mnc.c_str(), guami_list[i].regionID.c_str(), guami_list[i].AmfSetID.c_str(), guami_list[i].AmfPointer.c_str());
}
Logger::config().info("- RelativeAMFCapacity ................................: %d", relativeAMFCapacity);
Logger::config().info("- PLMNSupportList ....................................: ");
Logger::config().info("- RELATIVE_CAPACITY...................................: %d", relativeAMFCapacity);
Logger::config().info("- PLMN_SUPPORT_LIST...................................: ");
for (int i = 0; i < plmn_list.size(); i++) {
Logger::config().info(" (MCC %s, MNC %s) ", plmn_list[i].mcc.c_str(), plmn_list[i].mnc.c_str());
Logger::config().info(" TAC: %d", plmn_list[i].tac);
Logger::config().info(" SliceSupportList (SST, SD) ....................: ");
Logger::config().info(" SLICE_SUPPORT_LIST (SST, SD) ....................: ");
for (int j = 0; j < plmn_list[i].slice_list.size(); j++) {
Logger::config().info(" (%s, %s) ", plmn_list[i].slice_list[j].sST.c_str(), plmn_list[i].slice_list[j].sD.c_str());
}
......
......@@ -70,16 +70,16 @@
#define AMF_CONFIG_STRING_AMF_NAME "AMF_NAME"
#define AMF_CONFIG_STRING_GUAMI "GUAMI"
#define AMF_CONFIG_STRING_ServedGUAMIList "ServedGUAMIList"
#define AMF_CONFIG_STRING_SERVED_GUAMI_LIST "SERVED_GUAMI_LIST"
#define AMF_CONFIG_STRING_TAC "TAC"
#define AMF_CONFIG_STRING_MCC "MCC"
#define AMF_CONFIG_STRING_MNC "MNC"
#define AMF_CONFIG_STRING_RegionID "RegionID"
#define AMF_CONFIG_STRING_AMFSetID "AMFSetID"
#define AMF_CONFIG_STRING_AMFPointer "AMFPointer"
#define AMF_CONFIG_STRING_RelativeAMFCapacity "RelativeAMFCapacity"
#define AMF_CONFIG_STRING_PLMNSupportList "PLMNSupportList"
#define AMF_CONFIG_STRING_SliceSupportList "SliceSupportList"
#define AMF_CONFIG_STRING_RELATIVE_AMF_CAPACITY "RELATIVE_CAPACITY"
#define AMF_CONFIG_STRING_PLMN_SUPPORT_LIST "PLMN_SUPPORT_LIST"
#define AMF_CONFIG_STRING_SLICE_SUPPORT_LIST "SLICE_SUPPORT_LIST"
#define AMF_CONFIG_STRING_SST "SST"
#define AMF_CONFIG_STRING_SD "SD"
#define AMF_CONFIG_STRING_CORE_CONFIGURATION "CORE_CONFIGURATION"
......
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