configuration is changed from the discussions

This commit is contained in:
Sukchan Lee 2017-12-03 12:02:56 +09:00
parent 2c00f28b50
commit f86839eb7b
5 changed files with 304 additions and 131 deletions

View File

@ -158,7 +158,7 @@ static status_t mme_context_validation()
if (list_first(&self.sgw_list) == NULL)
{
d_error("No sgw.gtpc.hostname in '%s'",
d_error("No sgw.gtpc in '%s'",
context_self()->config.path);
return CORE_ERROR;
}
@ -300,7 +300,8 @@ status_t mme_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(s1ap_key, "hostname"))
else if (!strcmp(s1ap_key, "addr") ||
!strcmp(s1ap_key, "name"))
{
hostname = yaml_iter_value(&s1ap_iter);
}
@ -367,7 +368,8 @@ status_t mme_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpc_key, "hostname"))
else if (!strcmp(gtpc_key, "addr") ||
!strcmp(gtpc_key, "name"))
{
hostname = yaml_iter_value(&gtpc_iter);
}
@ -896,7 +898,8 @@ status_t mme_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpc_key, "hostname"))
else if (!strcmp(gtpc_key, "addr") ||
!strcmp(gtpc_key, "name"))
{
hostname = yaml_iter_value(&gtpc_iter);
}
@ -988,7 +991,8 @@ status_t mme_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpc_key, "hostname"))
else if (!strcmp(gtpc_key, "addr") ||
!strcmp(gtpc_key, "name"))
{
hostname = yaml_iter_value(&gtpc_iter);
#if 1

View File

@ -224,7 +224,8 @@ status_t pgw_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpc_key, "hostname"))
else if (!strcmp(gtpc_key, "addr") ||
!strcmp(gtpc_key, "name"))
{
hostname = yaml_iter_value(&gtpc_iter);
#if 1
@ -303,7 +304,8 @@ status_t pgw_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpu_key, "hostname"))
else if (!strcmp(gtpu_key, "addr") ||
!strcmp(gtpu_key, "name"))
{
hostname = yaml_iter_value(&gtpu_iter);
#if 1

View File

@ -186,7 +186,8 @@ status_t sgw_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpc_key, "hostname"))
else if (!strcmp(gtpc_key, "addr") ||
!strcmp(gtpc_key, "name"))
{
hostname = yaml_iter_value(&gtpc_iter);
#if 1
@ -265,7 +266,8 @@ status_t sgw_context_parse_config()
family = AF_UNSPEC;
}
}
else if (!strcmp(gtpu_key, "hostname"))
else if (!strcmp(gtpu_key, "addr") ||
!strcmp(gtpu_key, "name"))
{
hostname = yaml_iter_value(&gtpu_iter);
#if 1

View File

@ -9,35 +9,147 @@ logger:
gtp: 1
others: 1
#
# <IPv4>
#
# o Disable use of IPv4 addresses (only IPv6)
# Type : BOOLEAN
#
# o IPv4 enabled
# parameter:
#
# o IPv4 disabled
# parameter:
# no_ipv4: true
#
#
# <IPv6>
#
# o Disable use of IPv6 addresses (only IPv4)
# Type : BOOLEAN
#
# o IPv6 enabled
# parameter:
#
# o IPv6 disabled
# parameter:
# no_ipv6: true
#
#
# <GTP Client Preference>
#
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
# Type : BOOLEAN
# Default : IPv6 is attempted first.
#
# o IPv6 preferred
# parameter:
#
# o IPv4 preferred
# parameter:
# prefer_ipv4: true
#
#
# <EPC elements>
#
# o Disable EPC elements (Only applicable `nextepc-epcd`)
# Type : BOOLEAN
#
# o Enable HSS/SGW/PGW/PCRF
# parameter:
#
# o Disable HSS/SGW/PGW/PCRF
# parameter:
# no_hss: true
# no_sgw: true
# no_pgw: true
# no_pcrf: true
#
parameter:
# no_hss: true
# no_sgw: true
# no_pgw: true
# no_pcrf: true
# no_ipv4: true
# no_ipv6: true
# prefer_ipv4: true
mme:
freeDiameter: mme.conf
#
# <S1AP Server>>
#
# o Specify local addresses the S1AP server must bind to
#
# o S1AP Server(all address avaiable)
# s1ap:
#
# o Single S1AP Server(0.0.0.0:36412)
# s1ap:
# addr:
#
# o Multiple S1AP Server(127.0.0.1:36412, [::1]:36413)
# s1ap:
# name: localhost
#
s1ap:
- hostname: 127.0.0.1
- hostname: ::1
gtpc:
- hostname: 127.0.0.1
- addr: 127.0.0.1
- addr: ::1
#
# <GTP-C Server>>
#
# o Specify local addresses the GTP-C server must bind to
#
# o Multiple GTP-C Server(127.0.0.1:2123, [::1]:2123)
# gtpc:
# - addr: 127.0.0.1
# - addr: ::1
#
gtpc:
- addr: 127.0.0.1
- addr: ::1
#
# <GUMMEI>
#
# o Multiple GUMMEI
# gummei:
# - plmn_id:
# mcc: 001
# mnc: 01
# mme_gid: 2
# mme_code: 1
# - plmn_id:
# - mcc: 002
# mnc: 02
# - mcc: 003
# mnc: 03
# mme_gid: [3, 4]
# mme_code:
# - 2
# - 3
#
gummei:
- plmn_id:
mcc: 001
mnc: 01
mme_gid: 2
mme_code: 1
plmn_id:
mcc: 001
mnc: 01
mme_gid: 2
mme_code: 1
#
# <TAI>
#
# o Multiple TAI
# tai:
# - plmn_id:
# mcc: 001
# mnc: 01
# tac: 12345
# - plmn_id:
# mcc: 002
# mnc: 02
# tac: 12346
#
tai:
- plmn_id:
mcc: 001
mnc: 01
tac: 12345
plmn_id:
mcc: 001
mnc: 01
tac: 12345
security:
integrity_order : [ EIA1, EIA2, EIA0 ]
@ -47,28 +159,126 @@ hss:
freeDiameter: hss.conf
sgw:
#
# ------------------------ MME --------------------------
#
# o Specify SGW addresses the GTP-C must connect to
#
# o Single GTP-C Client(127.0.0.2:2123)
# gtpc:
# addr: 127.0.0.2
#
# o MME selects SGW with round-robin manner per UE-basis
# gtpc:
# - name: sgw1.nextepc.org
# - addr: 192.168.0.1
# - name: sgw2.nextepc.org
#
# ------------------------ SGW --------------------------
#
# o Specify local addresses the GTP-C server must bind to
#
# o Single GTP-C Server(127.0.0.2:2123)
# gtpc:
# addr: 127.0.0.2
#
gtpc:
- hostname: 127.0.0.2
addr: 127.0.0.2
#
# <GTP-U Server>>
#
# o Specify local addresses the GTP-U server must bind to
#
# o GTP-U Server(all address avaiable)
# gtpu:
#
# gtpu:
gtpu:
- hostname: 127.0.0.2
addr: 127.0.0.2
pgw:
freeDiameter: pgw.conf
#
# ------------------------ MME --------------------------
#
# o Specify PGW addresses the GTP-C must connect to
#
# o Only first address is attempted. Others are ignored.
# o if HSS provide PGW addresss(per-UE), it overwrites configuration.
#
# o 127.0.0.3:2123 is attempted. [::3]:2123 is ignored.
# gtpc:
# - addr: 127.0.0.3
# - addr: ::3
#
# ------------------------ PGW --------------------------
#
# o Specify local addresses the GTP-C server must bind to
#
# o Single GTP-C Server(127.0.0.3:2123)
# gtpc:
# addr: 127.0.0.3
#
gtpc:
- hostname: 127.0.0.3
addr: 127.0.0.3
#
# <GTP-U Server>>
#
# o Specify local addresses the GTP-U server must bind to
#
# o Multiple GTP-U Server(127.0.0.3:2152, [::3]:2152)
# gtpu:
# - addr: 127.0.0.3
# - addr: ::3
gtpu:
- hostname: 127.0.0.3
- addr: 127.0.0.3
# - addr: ::3
#
# <UE network>
#
# o IPv4/IPv6 with `pgwtun` device
# ue_network:
# addr:
# - 45.45.0.1/16
# - 2001:200:903::1/96
#
# o Multiple Device
# ue_network:
# - addr: 45.45.0.1/16
# dev: pgwtun1
# - addr:
# - 46.46.0.1/16
# - 2001:200:903::1/96
# dev: pgwtun2
#
# o Per-APN
# ue_network:
# - addr: 45.45.0.1/16
# dev: pgwtun1
# apn : internet
# - addr:
# - 46.46.0.1/16
# - 2001:200:903::1/96
# dev: pgwtun2
# apn : volte
#
ue_network:
- addr: 45.45.0.1/16
dev: pgwtun
addr: 45.45.0.1/16
dev: pgwtun
#
# <Domain Name Server>
#
# o primary/secondary can be configured. Others is ignored
#
dns:
- 8.8.8.8
- 8.8.4.4
dns6:
- 2001:4860:4860::8888
- 2001:4860:4860::8844

View File

@ -74,32 +74,33 @@ mme:
# <S1AP Server>>
#
# o Specify local addresses the S1AP server must bind to
# Type 'family' : ENUM
# 0 - AF_UNSPEC
# 2 - AF_INET
# 30 - AF_INET6
#
# o S1AP Server(all address avaiable)
# s1ap:
#
# o Single S1AP Server(0.0.0.0:36412)
# s1ap:
# - family: 2
# addr:
#
# o Multiple S1AP Server(127.0.0.1:36412, [::1]:36413)
# s1ap:
# - family: 2
# hostname: localhost
# - hostname: ::1
# port: 36413
# name: localhost
#
s1ap:
#
# <GTP-C Server>>
#
# o Specify local addresses the GTP-C server must bind to
#
# o Multiple GTP-C Server(127.0.0.1:2123, [::1]:2123)
# gtpc:
# - addr: 127.0.0.1
# - addr: ::1
#
gtpc:
- family: 2
hostname: localhost
- family: 30
hostname: localhost
- addr: 127.0.0.1
- addr: ::1
#
# <GUMMEI>
@ -159,73 +160,37 @@ sgw:
#
# ------------------------ MME --------------------------
#
# o Specify default SGW addresses the GTP-C must connect to
# Type 'family' : ENUM
# 0 - AF_UNSPEC
# 2 - AF_INET
# 30 - AF_INET6
# o Specify SGW addresses the GTP-C must connect to
#
# o Only first address is attempted. Others are ignored.
#
# o 127.0.0.2:2123 is attempted. [::2]:2123 is ignored.
# o Single GTP-C Client(127.0.0.2:2123)
# gtpc:
# - hostname: 127.0.0.2
# - hostname: ::2
# addr: 127.0.0.2
#
# o [::2]:2123 and [::10]:2123 is ignored. 127.0.0.2:2123 is attempted.
# parameter:
# - no_ipv6: true
# o MME selects SGW with round-robin manner per UE-basis
# gtpc:
# - hostname: ::2
# - hostname: 127.0.0.2
# - hostname: ::10
#
# - name: sgw1.nextepc.org
# - addr: 192.168.0.1
# - name: sgw2.nextepc.org
#
# ------------------------ SGW --------------------------
#
# o Specify local addresses the GTP-C server must bind to
# Type 'family' : Enum
# 0 - AF_UNSPEC
# 2 - AF_INET
# 30 - AF_INET6
# Default : liston on all address available
#
# o Single GTP-C Server(127.0.0.2:2123)
# gtpu:
# hostname: 127.0.0.2
#
# o Multiple GTP-C Server(127.0.0.2:2124, [::2]:2123)
# gtpu:
# - hostname: 127.0.0.2
# port: 2124
# - hostname: ::2
# gtpc:
# addr: 127.0.0.2
#
gtpc:
- hostname: 127.0.0.2
- hostname: ::2
addr: 127.0.0.2
#
# <GTP-U Server>
# <GTP-U Server>>
#
# o Specify local addresses the GTP-U server must bind to
# Type 'family' : ENUM
# 0 - AF_UNSPEC
# 2 - AF_INET
# 30 - AF_INET6
#
# o GPU-U Server(all address avaiable)
# o GTP-U Server(all address avaiable)
# gtpu:
#
# o Multiple GTP-U Server([::]:2152)
# gtpu:
# - family: 30
#
# o Multiple GTP-U Server(127.0.0.1:2153, [::1]:2152)
# gtpu:
# - family: 2
# hostname: localhost
# port: 2153
# - hostname: ::1
#
#
gtpu:
pgw:
@ -234,59 +199,44 @@ pgw:
#
# ------------------------ MME --------------------------
#
# o Specify default PGW addresses the GTP-C must connect to
# Type 'family' : ENUM
# 0 - AF_UNSPEC
# 2 - AF_INET
# 30 - AF_INET6
# o Specify PGW addresses the GTP-C must connect to
#
# o Only first address is attempted. Others are ignored.
# o if HSS provide PGW addresss(per-UE), it overwrites configuration.
#
# o 127.0.0.3:2123 is attempted. [::3]:2123 is ignored.
# gtpc:
# - hostname: 127.0.0.3
# - hostname: ::3
#
# o [::3]:2123 is attempted. [127.0.0.3]:2123 is ignored.
# gtpc:
# - hostname: ::3
# - hostname: 127.0.0.3
#
# - addr: 127.0.0.3
# - addr: ::3
#
# ------------------------ PGW --------------------------
#
# o Specify local addresses the GTP-C server must bind to
# Type 'family' : Enum
# 0 - AF_UNSPEC
# 2 - AF_INET
# 30 - AF_INET6
#
# o GPU-C Server(all address avaiable)
# gtpc:
#
# o Single GTP-C Server(127.0.0.3:2123)
# gtpc:
# hostname: 127.0.0.3
#
# o Multiple GTP-C Server(127.0.0.3:2124, [::3]:2123)
# gtpc:
# - hostname: 127.0.0.3
# port: 2124
# - hostname: ::3
# addr: 127.0.0.3
#
gtpc:
- hostname: 127.0.0.3
- hostname: ::3
addr: 127.0.0.3
#
# <GTP-U Server>>
#
# o Specify local addresses the GTP-U server must bind to
#
# o Multiple GTP-U Server(127.0.0.3:2152, [::3]:2152)
# gtpu:
# - addr: 127.0.0.3
# - addr: ::3
gtpu:
- hostname: 127.0.0.3
- hostname: ::3
- addr: 127.0.0.3
- addr: ::3
#
# <UE network>
#
# o Multiple IP Address
# o IPv4/IPv6 with `pgwtun` device
# ue_network:
# addr:
# - 45.45.0.1/16
@ -315,6 +265,11 @@ pgw:
ue_network:
addr: 45.45.0.1/16
#
# <Domain Name Server>
#
# o primary/secondary can be configured. Others is ignored
#
dns:
- 8.8.8.8
- 8.8.4.4