mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-01 12:33:41 +00:00
Compare commits
193 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37a69e6332 | ||
|
|
4ceae8857d | ||
|
|
f0a405f17c | ||
|
|
7c47a8901a | ||
|
|
c6ea286fe2 | ||
|
|
b50c77c9f8 | ||
|
|
7aae20e04a | ||
|
|
8323114945 | ||
|
|
c26d525488 | ||
|
|
74d631aaaa | ||
|
|
2e784a331d | ||
|
|
5009876c16 | ||
|
|
63809a3677 | ||
|
|
713693ee78 | ||
|
|
c00f67caab | ||
|
|
3feddd5424 | ||
|
|
2b69283a81 | ||
|
|
88981a570d | ||
|
|
23251fa6e3 | ||
|
|
a1569e5d86 | ||
|
|
5f7d1c5d90 | ||
|
|
0789216201 | ||
|
|
d84f79f4f2 | ||
|
|
235d61a2ea | ||
|
|
3bb763292a | ||
|
|
2e7d19a7f1 | ||
|
|
e13a7a1161 | ||
|
|
9b9cad288e | ||
|
|
7b5f9520d9 | ||
|
|
c7856bf3b2 | ||
|
|
27b3bec169 | ||
|
|
ef8d7d5d34 | ||
|
|
e7b40a3a09 | ||
|
|
cbc557f51a | ||
|
|
557d9532b0 | ||
|
|
9c150253d9 | ||
|
|
1225d1f1d5 | ||
|
|
db13836426 | ||
|
|
3d6a84ca85 | ||
|
|
0521d9fccf | ||
|
|
df60fbd0a5 | ||
|
|
5eb1c87e43 | ||
|
|
0796ce3d7e | ||
|
|
44455d55b3 | ||
|
|
85dbeb05cc | ||
|
|
1e56141d1e | ||
|
|
bf751dcee7 | ||
|
|
8472aa3743 | ||
|
|
3f2ad4ca08 | ||
|
|
6f97e32dca | ||
|
|
f2df9db68c | ||
|
|
787d8ebe01 | ||
|
|
24e9def813 | ||
|
|
baad38cab3 | ||
|
|
c3627e6852 | ||
|
|
4f29b912e8 | ||
|
|
34384de197 | ||
|
|
44ff12aa03 | ||
|
|
c639569c91 | ||
|
|
82e27f3ad9 | ||
|
|
cd6d51ad65 | ||
|
|
7df3d0509b | ||
|
|
9a3d5b50fc | ||
|
|
e9a8944189 | ||
|
|
307cf190c4 | ||
|
|
f27699abf5 | ||
|
|
045f013f39 | ||
|
|
5d99df4036 | ||
|
|
7c658091c5 | ||
|
|
81856afff9 | ||
|
|
5ff8376a64 | ||
|
|
f49e5e2360 | ||
|
|
4beba8e104 | ||
|
|
047ad240e7 | ||
|
|
2abdef74cb | ||
|
|
96af2d0337 | ||
|
|
8536fe3979 | ||
|
|
ce07bc16d4 | ||
|
|
d39582ff6e | ||
|
|
e418eda22f | ||
|
|
65b262a7f9 | ||
|
|
c4cc7f60ba | ||
|
|
6ee8ae0774 | ||
|
|
04233e505b | ||
|
|
0e1fcb43a7 | ||
|
|
1bf78f7655 | ||
|
|
75c431855b | ||
|
|
322d4d9157 | ||
|
|
c403e250fa | ||
|
|
a4670ca6e1 | ||
|
|
f3dd605c67 | ||
|
|
3975f6e775 | ||
|
|
0891ee5b19 | ||
|
|
d1f3439f93 | ||
|
|
e35bc4cc0d | ||
|
|
8cf9da560b | ||
|
|
f577f8dc9f | ||
|
|
4fcbb65eca | ||
|
|
d191a5135e | ||
|
|
e6432868de | ||
|
|
5664b90e38 | ||
|
|
768e4d9eb3 | ||
|
|
6a470c8881 | ||
|
|
8e26a9adf3 | ||
|
|
b8928ee849 | ||
|
|
3bc9b6e9aa | ||
|
|
ef6e16acf0 | ||
|
|
3b6b024866 | ||
|
|
428fbffa36 | ||
|
|
0f0d87d742 | ||
|
|
a62e07318e | ||
|
|
d7657a8f0b | ||
|
|
04f1730982 | ||
|
|
83cf871ff7 | ||
|
|
50f5a527a8 | ||
|
|
219899b8d0 | ||
|
|
2ac9d931cf | ||
|
|
10235922f4 | ||
|
|
a86e296afc | ||
|
|
66f839592f | ||
|
|
324f3d158f | ||
|
|
f06a8b92fe | ||
|
|
b86658e173 | ||
|
|
b7360d37d4 | ||
|
|
79bada897b | ||
|
|
f7a4d0ed78 | ||
|
|
cef1b46130 | ||
|
|
b5307cdb7a | ||
|
|
dfa5c4f0ee | ||
|
|
8749c2d666 | ||
|
|
896ca50253 | ||
|
|
cd6a295039 | ||
|
|
e051941a45 | ||
|
|
79c4afe277 | ||
|
|
d0822c2e6b | ||
|
|
5e59349d17 | ||
|
|
36dc786e01 | ||
|
|
4e2d7bf708 | ||
|
|
ce6d2c5889 | ||
|
|
ed701ce90e | ||
|
|
636170e0da | ||
|
|
2cd9f496e2 | ||
|
|
5b59f09d9f | ||
|
|
552045aa28 | ||
|
|
46e04210da | ||
|
|
31f1fc030f | ||
|
|
b31836d8fc | ||
|
|
7afc017cf9 | ||
|
|
eb905e4514 | ||
|
|
9341d756cc | ||
|
|
a808423631 | ||
|
|
fd05d25715 | ||
|
|
ee213e160a | ||
|
|
7b7acea59b | ||
|
|
552305afe2 | ||
|
|
f3ccd71db0 | ||
|
|
a622feac84 | ||
|
|
835b3c9851 | ||
|
|
c8bcfffe2e | ||
|
|
ad7fc34fa2 | ||
|
|
b994a8efbf | ||
|
|
cdbbbc500b | ||
|
|
71f54a4500 | ||
|
|
8639c0f43c | ||
|
|
b65d76d0b2 | ||
|
|
439ba9c82c | ||
|
|
f2e34dd7ff | ||
|
|
3743ef98a2 | ||
|
|
4b8e2a5c97 | ||
|
|
6f44ff5f4d | ||
|
|
c131295dfb | ||
|
|
ee80d1f996 | ||
|
|
da242e6734 | ||
|
|
4fcde77017 | ||
|
|
13ee6960aa | ||
|
|
14427de551 | ||
|
|
aa7d7f3b7d | ||
|
|
d4f982427c | ||
|
|
e55c7f9174 | ||
|
|
f2831ff1fd | ||
|
|
29e8a68dea | ||
|
|
46f9e1369b | ||
|
|
9f1a5d19a4 | ||
|
|
32c80cb031 | ||
|
|
b47e0e510e | ||
|
|
28f6d16ce2 | ||
|
|
06f8e42173 | ||
|
|
1e30669d6c | ||
|
|
04f5c31287 | ||
|
|
dcef973a09 | ||
|
|
290cdfac42 | ||
|
|
87b6b66cfd | ||
|
|
79759f4599 |
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# This directory is fetched during first build and is present in this directory
|
||||
subprojects/freeDiameter
|
||||
subprojects/usrsctp
|
||||
@@ -6,7 +6,7 @@ If you don't understand something about Open5GS, the [https://open5gs.org/open5g
|
||||
|
||||
Problem with Open5GS can be filed as [issues](https://github.com/open5gs/open5gs/issues) in this repository.
|
||||
|
||||
Discussions related to this project are happening on the [open5gs@lists.osmocom.org](mailto:open5gs@lists.osmocom.org) mailing list, please see <https://lists.osmocom.org/mailman/listinfo/open5gs> for subscription options and the list archive.
|
||||
Discussions related to this project are happening on the [nextepc@lists.osmocom.org](mailto:nextepc@lists.osmocom.org) mailing list, please see <https://lists.osmocom.org/mailman/listinfo/nextepc> for subscription options and the list archive.
|
||||
|
||||
Voice and text chat available in Open5GS's [Discord](https://discordapp.com/) workspace. Use [this link](https://discord.gg/GreNkuc) to get started.
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ mme:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.4
|
||||
@@ -94,7 +93,6 @@ hss:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: mme.localdomain
|
||||
addr: 127.0.0.2
|
||||
@@ -131,13 +129,15 @@ pgw:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.localdomain
|
||||
|
||||
@@ -229,7 +229,6 @@ LoadExtension = "@libdir@/freeDiameter/dict_nasreq.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_nas_mipv6.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_dcca.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_dcca_3gpp.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_s6a.fdx";
|
||||
|
||||
|
||||
##############################################################
|
||||
|
||||
@@ -229,7 +229,6 @@ LoadExtension = "@libdir@/freeDiameter/dict_nasreq.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_nas_mipv6.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_dcca.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_dcca_3gpp.fdx";
|
||||
LoadExtension = "@libdir@/freeDiameter/dict_s6a.fdx";
|
||||
|
||||
|
||||
##############################################################
|
||||
|
||||
@@ -383,6 +383,19 @@ sgw:
|
||||
#
|
||||
# o GTP-U Server(all address avaiable)
|
||||
# gtpu:
|
||||
#
|
||||
# o Provide custom SGW GTP-U address to be advertised inside S1AP messages
|
||||
# gtpu:
|
||||
# addr: 10.4.128.21
|
||||
# advertise_addr: 172.24.15.30
|
||||
#
|
||||
# gtpu:
|
||||
# addr: 10.4.128.21
|
||||
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
#
|
||||
# gtpu:
|
||||
# dev: ens3
|
||||
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
#
|
||||
gtpu:
|
||||
|
||||
@@ -462,54 +475,82 @@ pgw:
|
||||
# <UE Pool>
|
||||
#
|
||||
# o IPv4 Pool
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# addr: 45.45.0.1/16
|
||||
# addr: 10.45.0.1/16
|
||||
#
|
||||
# o IPv4/IPv6 Pool
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 45.45.0.1/16
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
#
|
||||
#
|
||||
# o Specific APN(e.g 'volte') uses 45.46.0.1/16, cafe:2::1/64
|
||||
# All other APNs use 45.45.0.1/16, cafe:1::1/64
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 45.46.0.1/16 dev ogstun
|
||||
# o Specific APN(e.g 'volte') uses 10.46.0.1/16, cafe:2::1/64
|
||||
# All other APNs use 10.45.0.1/16, cafe:1::1/64
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 10.46.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
# $ sudo ip addr add cafe:2::1/64 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 45.45.0.1/16
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# - addr: 45.46.0.1/16
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: volte
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
#
|
||||
# o Multiple Devices (default: ogstun)
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun2
|
||||
# $ sudo ip addr add 45.46.0.1/16 dev ogstun3
|
||||
# $ sudo ip addr add 10.46.0.1/16 dev ogstun3
|
||||
# $ sudo ip addr add cafe:2::1/64 dev ogstun3
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 45.45.0.1/16
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# dev: ogstun2
|
||||
# - addr: 45.46.0.1/16
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: volte
|
||||
# dev: ogstun3
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
# dev: ogstun3
|
||||
#
|
||||
# o Pool Range Sample
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range: 10.45.0.100-10.45.0.200
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range:
|
||||
# - 10.45.0.5-10.45.0.50
|
||||
# - 10.45.0.100-
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range:
|
||||
# - -10.45.0.200
|
||||
# - 10.45.0.210-10.45.0.220
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/16
|
||||
# range:
|
||||
# - 10.45.0.100-10.45.0.200
|
||||
# - 10.45.1.100-10.45.1.200
|
||||
# - addr: cafe::1/64
|
||||
# range:
|
||||
# - cafe::a0-cafe:b0
|
||||
# - cafe::c0-cafe:d0
|
||||
#
|
||||
#
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
|
||||
#
|
||||
@@ -523,6 +564,17 @@ pgw:
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
|
||||
#
|
||||
# <MTU Size>
|
||||
#
|
||||
# o Provisioning a limit on the size of the packets sent by the MS
|
||||
# to avoid packet fragmentation in the backbone network
|
||||
# between the MS and the GGSN/PGW and/or across the (S)Gi reference point)
|
||||
# when some of the backbone links does not support
|
||||
# packets larger then 1500 octets
|
||||
#
|
||||
mtu: 1400
|
||||
|
||||
#
|
||||
# <P-CSCF>
|
||||
#
|
||||
|
||||
@@ -23,7 +23,7 @@ conf_data.set('libdir', libdir)
|
||||
conf_data.set('localstatedir', localstatedir)
|
||||
|
||||
freediameter_extensions_builddir = join_paths(
|
||||
meson.build_root(), 'subprojects', 'freediameter', 'extensions')
|
||||
meson.build_root(), 'subprojects', 'freeDiameter', 'extensions')
|
||||
conf_data.set('freediameter_extensions_builddir',
|
||||
freediameter_extensions_builddir)
|
||||
|
||||
@@ -36,6 +36,7 @@ endif
|
||||
example_conf = '''
|
||||
simple.yaml
|
||||
installed.yaml
|
||||
split.yaml
|
||||
mnc3.yaml
|
||||
csfb.yaml
|
||||
volte.yaml
|
||||
|
||||
@@ -19,7 +19,6 @@ mme:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.4
|
||||
@@ -60,7 +59,6 @@ hss:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: mme.localdomain
|
||||
addr: 127.0.0.2
|
||||
@@ -101,13 +99,15 @@ pgw:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.localdomain
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# truncate rails logs every day at midnight, keep 14 previous logs, compress previous logs
|
||||
#
|
||||
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
||||
@localstatedir@/log/open5gs/pcrf.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/open5gs-pcrfd/pid`
|
||||
@localstatedir@/log/open5gs/pgw.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/open5gs-pgwd/pid`
|
||||
@localstatedir@/log/open5gs/sgw.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/open5gs-sgwd/pid`
|
||||
@localstatedir@/log/open5gs/hss.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/open5gs-hssd/pid`
|
||||
@localstatedir@/log/open5gs/mme.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/open5gs-mmed/pid`
|
||||
@localstatedir@/log/open5gs/pcrf.log 644 14 * $D0 GZ @localstatedir@/run/open5gs-pcrfd/pid`
|
||||
@localstatedir@/log/open5gs/pgw.log 644 14 * $D0 GZ @localstatedir@/run/open5gs-pgwd/pid`
|
||||
@localstatedir@/log/open5gs/sgw.log 644 14 * $D0 GZ @localstatedir@/run/open5gs-sgwd/pid`
|
||||
@localstatedir@/log/open5gs/hss.log 644 14 * $D0 GZ @localstatedir@/run/open5gs-hssd/pid`
|
||||
@localstatedir@/log/open5gs/mme.log 644 14 * $D0 GZ @localstatedir@/run/open5gs-mmed/pid`
|
||||
|
||||
@@ -12,10 +12,11 @@ pgw:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
@@ -19,7 +19,6 @@ mme:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.4
|
||||
@@ -60,7 +59,6 @@ hss:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: mme.localdomain
|
||||
addr: 127.0.0.2
|
||||
@@ -97,13 +95,15 @@ pgw:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.localdomain
|
||||
|
||||
121
configs/split.yaml.in
Normal file
121
configs/split.yaml.in
Normal file
@@ -0,0 +1,121 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
|
||||
mme:
|
||||
freeDiameter:
|
||||
identity: mme.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.2
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.4
|
||||
|
||||
s1ap:
|
||||
gtpc:
|
||||
addr: 127.0.0.1
|
||||
gummei:
|
||||
plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
tac: 7
|
||||
security:
|
||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
|
||||
network_name:
|
||||
full: Open5GS
|
||||
|
||||
hss:
|
||||
freeDiameter:
|
||||
identity: hss.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.4
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: mme.localdomain
|
||||
addr: 127.0.0.2
|
||||
|
||||
sgw:
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gtpu:
|
||||
|
||||
pgw:
|
||||
freeDiameter:
|
||||
identity: pgw.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.3
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: pcrf.localdomain
|
||||
addr: 127.0.0.5
|
||||
|
||||
gtpc:
|
||||
addr:
|
||||
- 127.0.0.3
|
||||
- ::1
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.5
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: pgw.localdomain
|
||||
addr: 127.0.0.3
|
||||
@@ -19,7 +19,6 @@ mme:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.4
|
||||
@@ -60,7 +59,6 @@ hss:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: mme.localdomain
|
||||
addr: 127.0.0.2
|
||||
@@ -97,13 +95,15 @@ pgw:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.localdomain
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
Name=ogstun
|
||||
|
||||
[Network]
|
||||
Address=45.45.0.1/16
|
||||
Address=10.45.0.1/16
|
||||
Address=cafe::1/64
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[Unit]
|
||||
Description=Open5GS HSS Daemon
|
||||
BindTo=mongodb.service
|
||||
After=networking.service mongodb.service
|
||||
Wants=mongodb.service mongod.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -13,6 +12,7 @@ Restart=always
|
||||
ExecStart=@bindir@/open5gs-hssd -c @sysconfdir@/open5gs/hss.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -12,6 +12,7 @@ Restart=always
|
||||
ExecStart=@bindir@/open5gs-mmed -c @sysconfdir@/open5gs/mme.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[Unit]
|
||||
Description=Open5GS PCRF Daemon
|
||||
BindTo=mongodb.service
|
||||
After=networking.service mongodb.service
|
||||
Wants=mongodb.service mongod.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -13,6 +12,7 @@ Restart=always
|
||||
ExecStart=@bindir@/open5gs-pcrfd -c @sysconfdir@/open5gs/pcrf.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[Unit]
|
||||
Description=Open5GS P-GW Daemon
|
||||
After=networking.service
|
||||
Requires=systemd-networkd.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -12,6 +13,7 @@ Restart=always
|
||||
ExecStart=@bindir@/open5gs-pgwd -c @sysconfdir@/open5gs/pgw.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -12,6 +12,7 @@ Restart=always
|
||||
ExecStart=@bindir@/open5gs-sgwd -c @sysconfdir@/open5gs/sgw.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -20,7 +20,6 @@ mme:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: hss.open-ims.test
|
||||
addr: 127.0.0.4
|
||||
@@ -61,7 +60,6 @@ hss:
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_s6a.fdx
|
||||
connect:
|
||||
- identity: mme.open-ims.test
|
||||
addr: 127.0.0.2
|
||||
@@ -102,13 +100,15 @@ pgw:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 45.45.0.1/16
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
#
|
||||
# <P-CSCF>
|
||||
#
|
||||
|
||||
127
debian/changelog
vendored
127
debian/changelog
vendored
@@ -1,3 +1,130 @@
|
||||
open5gs (1.2.4~eoan) eoan; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 26 Apr 2020 15:08:22 -0400
|
||||
|
||||
open5gs (1.2.4~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 26 Apr 2020 15:07:40 -0400
|
||||
|
||||
open5gs (1.2.4~focal) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 26 Apr 2020 15:04:41 -0400
|
||||
|
||||
open5gs (1.2.4) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 26 Apr 2020 13:59:06 -0400
|
||||
|
||||
open5gs (1.2.3~eoan) eoan; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sat, 04 Apr 2020 18:11:28 -0400
|
||||
|
||||
open5gs (1.2.3~disco) disco; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sat, 04 Apr 2020 18:10:43 -0400
|
||||
|
||||
open5gs (1.2.3~bionic1) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sat, 04 Apr 2020 18:08:17 -0400
|
||||
|
||||
open5gs (1.2.3) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sat, 04 Apr 2020 18:03:59 -0400
|
||||
|
||||
open5gs (1.2.2~eoan) eoan; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 25 Mar 2020 23:52:52 +0000
|
||||
|
||||
open5gs (1.2.2~disco) disco; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 25 Mar 2020 23:51:53 +0000
|
||||
|
||||
open5gs (1.2.2~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 25 Mar 2020 23:49:09 +0000
|
||||
|
||||
open5gs (1.2.2) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 25 Mar 2020 23:46:47 +0000
|
||||
|
||||
open5gs (1.2.1~eoan) eoan; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 05 Feb 2020 19:59:15 +0900
|
||||
|
||||
open5gs (1.2.1~disco) disco; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 05 Feb 2020 19:58:05 +0900
|
||||
|
||||
open5gs (1.2.1~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 05 Feb 2020 19:56:44 +0900
|
||||
|
||||
open5gs (1.2.1) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 05 Feb 2020 19:52:54 +0900
|
||||
|
||||
open5gs (1.2.0~eoan) eoan; urgency=medium
|
||||
|
||||
* VoLTE tested
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 12 Jan 2020 23:08:38 +0900
|
||||
|
||||
open5gs (1.2.0~disco) disco; urgency=medium
|
||||
|
||||
* VoLTE tested
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 12 Jan 2020 23:07:41 +0900
|
||||
|
||||
open5gs (1.2.0~bionic2) bionic; urgency=medium
|
||||
|
||||
* VoLTE tested
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 12 Jan 2020 23:05:19 +0900
|
||||
|
||||
open5gs (1.2.0) unstable; urgency=medium
|
||||
|
||||
* VoLTE tested
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 12 Jan 2020 22:45:29 +0900
|
||||
|
||||
open5gs (1.1.0) unstable; urgency=medium
|
||||
|
||||
* Static IP addresses
|
||||
* Many BUGS Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Mon, 18 Nov 2019 22:27:05 +0900
|
||||
|
||||
open5gs (1.0.0) unstable; urgency=medium
|
||||
|
||||
* Change build-tool to MESON
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -4,6 +4,7 @@ Priority: optional
|
||||
Maintainer: Harald Welte <laforge@gnumonks.org>
|
||||
Uploaders: Sukchan Lee <acetcom@gmail.com>
|
||||
Build-Depends: debhelper (>= 11),
|
||||
git,
|
||||
pkg-config,
|
||||
meson (>= 0.43.0),
|
||||
flex,
|
||||
@@ -85,7 +86,7 @@ Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
mongodb,
|
||||
mongodb-org | mongodb,
|
||||
open5gs-common (= ${binary:Version})
|
||||
Description: Open Source based 3GPP EPC PCRF (Policy and Charging Rules Function)
|
||||
Open5GS is a C-language Open Source implementation of the 3GPP Evolved
|
||||
@@ -101,7 +102,7 @@ Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
mongodb,
|
||||
mongodb-org | mongodb,
|
||||
open5gs-common (= ${binary:Version})
|
||||
Description: Open Source based 3GPP EPC HSS (Home Subscriber Server)
|
||||
Open5GS is a C-language Open Source implementation of the 3GPP Evolved
|
||||
@@ -117,7 +118,6 @@ Package: open5gs
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${misc:Depends},
|
||||
mongodb,
|
||||
open5gs-common (= ${binary:Version}),
|
||||
open5gs-mme (= ${binary:Version}),
|
||||
open5gs-sgw (= ${binary:Version}),
|
||||
|
||||
1
debian/open5gs-common.install
vendored
1
debian/open5gs-common.install
vendored
@@ -3,3 +3,4 @@ usr/lib/*/libfd*.so*
|
||||
usr/lib/*/freeDiameter/*.fdx
|
||||
configs/freeDiameter/cacert.pem /etc/freeDiameter
|
||||
configs/logrotate/open5gs /etc/logrotate.d
|
||||
misc/db/open5gs-dbctl /usr/bin
|
||||
|
||||
@@ -66,8 +66,12 @@ export DEBEMAIL='acetcom@gmail.com'
|
||||
$ gpg --export > public.asc
|
||||
$ gpg --import public.asc
|
||||
|
||||
* Version Change
|
||||
$ vi meson.build
|
||||
|
||||
* Upload OpenBuildService
|
||||
$ dch -i
|
||||
$ meson subprojects download freeDiameter
|
||||
$ debuild -S -uc -us -d
|
||||
$ osc co home:acetcom:open5gs latest
|
||||
$ cd home\:acetcom\:open5gs/latest/
|
||||
@@ -76,9 +80,13 @@ export DEBEMAIL='acetcom@gmail.com'
|
||||
|
||||
* Upload LaunchPad
|
||||
$ dch -i
|
||||
$ meson subprojects download freeDiameter
|
||||
$ debuild -S -d
|
||||
$ dput ppa:open5gs/latest *.source.changes
|
||||
|
||||
* Tagging
|
||||
$ git tag v1.x.x -a
|
||||
|
||||
* Build package
|
||||
$ dpkg-buildpackage -d
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
if ! grep "ogstun" /proc/net/dev > /dev/null; then
|
||||
ip tuntap add name ogstun mode tun
|
||||
fi
|
||||
ip addr del 45.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 45.45.0.1/16 dev ogstun
|
||||
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 10.45.0.1/16 dev ogstun
|
||||
ip addr del cafe::1/64 dev ogstun 2> /dev/null
|
||||
ip addr add cafe::1/64 dev ogstun
|
||||
ip link set ogstun up
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
8
|
||||
@@ -3,8 +3,8 @@
|
||||
if ! grep "ogstun" /proc/net/dev > /dev/null; then
|
||||
ip tuntap add name ogstun mode tun
|
||||
fi
|
||||
ip addr del 45.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 45.45.0.1/16 dev ogstun
|
||||
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 10.45.0.1/16 dev ogstun
|
||||
ip addr del cafe::1/64 dev ogstun 2> /dev/null
|
||||
ip addr add cafe::1/64 dev ogstun
|
||||
ip link set ogstun up
|
||||
1
docker/debian/buster
Symbolic link
1
docker/debian/buster
Symbolic link
@@ -0,0 +1 @@
|
||||
../ubuntu/latest
|
||||
@@ -1,31 +0,0 @@
|
||||
ARG dist=ubuntu
|
||||
ARG tag=latest
|
||||
FROM ${dist}:${tag}
|
||||
|
||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
ninja-build \
|
||||
build-essential \
|
||||
flex \
|
||||
bison \
|
||||
git \
|
||||
libsctp-dev \
|
||||
libgnutls28-dev \
|
||||
libgcrypt-dev \
|
||||
libssl-dev \
|
||||
libidn11-dev \
|
||||
libmongoc-dev \
|
||||
libbson-dev \
|
||||
libyaml-dev \
|
||||
iproute2 \
|
||||
ca-certificates \
|
||||
netbase \
|
||||
pkg-config && \
|
||||
apt-get clean
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
RUN python3 -m pip install meson
|
||||
@@ -1 +0,0 @@
|
||||
../../ubuntu/bionic/dev
|
||||
@@ -1 +0,0 @@
|
||||
stable
|
||||
@@ -1 +1 @@
|
||||
buster
|
||||
../ubuntu/latest
|
||||
@@ -1 +1 @@
|
||||
buster
|
||||
../ubuntu/latest
|
||||
@@ -1 +1 @@
|
||||
buster
|
||||
../ubuntu/latest
|
||||
@@ -1 +1 @@
|
||||
30
|
||||
latest
|
||||
1
docker/fedora/30
Symbolic link
1
docker/fedora/30
Symbolic link
@@ -0,0 +1 @@
|
||||
latest
|
||||
@@ -1 +0,0 @@
|
||||
30
|
||||
@@ -3,8 +3,8 @@
|
||||
if ! grep "ogstun" /proc/net/dev > /dev/null; then
|
||||
ip tuntap add name ogstun mode tun
|
||||
fi
|
||||
ip addr del 45.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 45.45.0.1/16 dev ogstun
|
||||
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 10.45.0.1/16 dev ogstun
|
||||
ip addr del cafe::1/64 dev ogstun 2> /dev/null
|
||||
ip addr add cafe::1/64 dev ogstun
|
||||
ip link set ogstun up
|
||||
1
docker/ubuntu/bionic
Symbolic link
1
docker/ubuntu/bionic
Symbolic link
@@ -0,0 +1 @@
|
||||
latest
|
||||
@@ -1 +1 @@
|
||||
bionic
|
||||
latest
|
||||
1
docker/ubuntu/focal
Symbolic link
1
docker/ubuntu/focal
Symbolic link
@@ -0,0 +1 @@
|
||||
latest
|
||||
@@ -1 +0,0 @@
|
||||
bionic
|
||||
@@ -6,14 +6,17 @@ MAINTAINER Sukchan Lee <acetcom@gmail.com>
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y --no-install-recommends \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
ninja-build \
|
||||
build-essential \
|
||||
flex \
|
||||
bison \
|
||||
git \
|
||||
meson \
|
||||
libsctp-dev \
|
||||
libgnutls28-dev \
|
||||
libgcrypt-dev \
|
||||
@@ -27,4 +30,3 @@ RUN apt-get update && \
|
||||
netbase \
|
||||
pkg-config && \
|
||||
apt-get clean
|
||||
RUN python3 -m pip install meson
|
||||
@@ -3,8 +3,8 @@
|
||||
if ! grep "ogstun" /proc/net/dev > /dev/null; then
|
||||
ip tuntap add name ogstun mode tun
|
||||
fi
|
||||
ip addr del 45.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 45.45.0.1/16 dev ogstun
|
||||
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
|
||||
ip addr add 10.45.0.1/16 dev ogstun
|
||||
ip addr del cafe::1/64 dev ogstun 2> /dev/null
|
||||
ip addr add cafe::1/64 dev ogstun
|
||||
ip link set ogstun up
|
||||
@@ -1 +1 @@
|
||||
bionic
|
||||
latest
|
||||
@@ -8,7 +8,7 @@ title: Quickstart
|
||||
### Install Open5GS with a Package Manager
|
||||
---
|
||||
|
||||
The Open5GS package is available on the recent versions of *Ubuntu*.
|
||||
*Ubuntu* makes it easy to install Open5GS as shown below,
|
||||
|
||||
```bash
|
||||
$ sudo apt update
|
||||
@@ -18,42 +18,51 @@ $ sudo apt update
|
||||
$ sudo apt install open5gs
|
||||
```
|
||||
|
||||
The Open5GS package is also available on [OBS](https://build.opensuse.org/package/show/home:acetcom:open5gs:snapshot/open5gs). First, install the authentication key as shown below.
|
||||
Other Linux distributions, such as *Debian*, are additionally available on [OBS](https://build.opensuse.org/project/show/home:acetcom:open5gs).
|
||||
```bash
|
||||
$ sudo apt update
|
||||
$ sudo apt install wget gnupg
|
||||
$ wget https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10/Release.key
|
||||
$ sudo apt-key add Release.key
|
||||
```
|
||||
|
||||
If there is no MongoDB package like *Debian* 10(Buster), you'll need to install this first as shown below,
|
||||
|
||||
```bash
|
||||
$ sudo apt update
|
||||
$ sudo apt install wget gnupg
|
||||
$ wget https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10.0/Release.key
|
||||
$ sudo apt-key add Release.key
|
||||
|
||||
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
|
||||
$ echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | sudo tee /etc/apt/sources.list.d/mongodb-org.list
|
||||
$ sudo apt update
|
||||
$ sudo apt -y install mongodb-org
|
||||
```
|
||||
|
||||
In Debian 10.0(buster), you can install it as follows:
|
||||
On *Debian* 10(buster), you can install Open5GS as shown below,
|
||||
|
||||
```bash
|
||||
$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_9.0/ ./' > /etc/apt/sources.list.d/open5gs.list"
|
||||
$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10/ ./' > /etc/apt/sources.list.d/open5gs.list"
|
||||
$ sudo apt update
|
||||
$ sudo apt install open5gs
|
||||
```
|
||||
|
||||
Other Linux distributions can be installed by changing the path.
|
||||
Other distributions can be installed by changing the path.
|
||||
|
||||
```
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10.0/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_Testing/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_Unstable/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Raspbian_10.0/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Raspbian_10/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.04/
|
||||
http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.10/
|
||||
```
|
||||
|
||||
[Martin Hauke](https://build.opensuse.org/user/show/mnhauke) packaged Open5GS for *openSUSE* on [OBS](https://build.opensuse.org/package/show/home:mnhauke:nextepc/nextepc).
|
||||
[Martin Hauke](https://build.opensuse.org/user/show/mnhauke) packaged Open5GS for *openSUSE* on [OBS](https://build.opensuse.org/package/show/home:mnhauke:open5gs/open5gs).
|
||||
|
||||
```bash
|
||||
$ sudo zypper addrepo -f obs://home:mnhauke:nextepc home:mnhauke:nextepc
|
||||
$ sudo zypper install nextepc
|
||||
$ sudo zypper addrepo -f obs://home:mnhauke:open5gs home:mnhauke:open5gs
|
||||
$ sudo zypper install mongodb-server mongodb-shell
|
||||
$ sudo zypper install open5gs
|
||||
```
|
||||
|
||||
### Configure Open5GS
|
||||
@@ -160,7 +169,7 @@ To add subscriber information, you can do WebUI operations in the following orde
|
||||
{: .notice--info}
|
||||
|
||||
|
||||
### Adding a route for UE to have Internet connectivity
|
||||
### Adding a route for UE to have Internet connectivity {#UEInternet}
|
||||
---
|
||||
|
||||
If your phone can connect to internet, you must run the following command in Open5GS-PGW installed host.
|
||||
@@ -195,7 +204,7 @@ target prot opt source destination
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
|
||||
### Add NAT Rule
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 45.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
**Note:** For the first time, it is a good condition if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add a rule differently.
|
||||
@@ -207,36 +216,6 @@ $ sudo iptables -t nat -A POSTROUTING -s 45.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
- You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
|
||||
- You can view the log at `/var/log/open5gs/*.log`.
|
||||
|
||||
### Troubleshooting
|
||||
---
|
||||
|
||||
Problem with Open5GS can be filed as [GitHub Issues](https://github.com/open5gs/open5gs/issues). Please include the following to get help:
|
||||
|
||||
- Attach `*.pcapng` file created by wireskark.
|
||||
- Attach configuration files at `/etc/open5gs/*.conf`.
|
||||
- Attach log files at `/var/log/open5gs/*.log`.
|
||||
|
||||
You can modify the configuration file to record more logs.
|
||||
|
||||
```diff
|
||||
diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
|
||||
--- mme.yaml.old 2018-04-15 18:28:31.000000000 +0900
|
||||
+++ mme.yaml 2018-04-15 19:53:10.000000000 +0900
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
logger:
|
||||
file: /var/log/open5gs/mme.log
|
||||
+ level: debug
|
||||
|
||||
parameter:
|
||||
```
|
||||
|
||||
After changing conf files, please restart Open5GS daemons.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-mmed
|
||||
$ sudo systemctl restart open5gs-sgwd
|
||||
```
|
||||
|
||||
### Uninstall Open5GS and WebUI
|
||||
|
||||
|
||||
@@ -9,22 +9,23 @@ This post explains how to compile and install the source code on **Debian/Ubuntu
|
||||
### Getting MongoDB
|
||||
---
|
||||
|
||||
Install MongoDB with package manager.
|
||||
Install MongoDB with package manager. It is used as database for the HSS and PCRF.
|
||||
|
||||
```bash
|
||||
$ sudo apt update
|
||||
$ sudo apt install mongodb
|
||||
$ sudo systemctl start mongodb (if '/usr/bin/mongod' is not running)
|
||||
$ sudo systemctl enable mongodb (ensure to automatically start it on system boot)
|
||||
```
|
||||
|
||||
### Setting up TUN device (No persistent after rebooting)
|
||||
### Setting up TUN device (not persistent after rebooting)
|
||||
---
|
||||
|
||||
Create the TUN device with the interface name `ogstun`.
|
||||
|
||||
```bash
|
||||
$ sudo ip tuntap add name ogstun mode tun
|
||||
$ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add cafe::1/64 dev ogstun
|
||||
$ sudo ip link set ogstun up
|
||||
```
|
||||
@@ -36,16 +37,10 @@ $ sudo ip link set ogstun up
|
||||
### Building Open5GS
|
||||
---
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
Install the dependencies for building the source code.
|
||||
|
||||
```bash
|
||||
$ sudo apt install python3-pip python3-setuptools ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev
|
||||
```
|
||||
|
||||
Install Meson using Python.
|
||||
|
||||
```bash
|
||||
$ pip3 install --user meson
|
||||
$ sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
@@ -67,19 +62,25 @@ Check whether the compilation is correct.
|
||||
$ ninja -C build test
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testsimple.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testsimple.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
```bash
|
||||
$ cd build
|
||||
$ ninja install
|
||||
$ cd ../
|
||||
```
|
||||
|
||||
### Configure Open5GS
|
||||
---
|
||||
|
||||
Modify [/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP/GTP-C IP address, PLMN ID, and TAC
|
||||
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP/GTP-C IP address, PLMN ID, and TAC.
|
||||
|
||||
In the below example we
|
||||
|
||||
- use MCC-MNC of 901-70, as this is the home network of the default IMSIs of the sysmoUSIM-SJS1 cards.
|
||||
- use 192.168.0.100 for the S1AP +GTP-U connection of MME/SGW to the eNB
|
||||
|
||||
```diff
|
||||
diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
|
||||
@@ -113,7 +114,7 @@ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
```
|
||||
|
||||
Modify [/etc/open5gs/sgw.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgw.yaml.in) to set the GTP-U IP address.
|
||||
Modify [install/etc/open5gs/sgw.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgw.yaml.in) to set the GTP-U IP address.
|
||||
```diff
|
||||
diff -u /etc/open5gs/sgw.yaml.old /etc/open5gs/sgw.yaml
|
||||
--- sgw.yaml.old 2018-04-15 18:30:25.000000000 +0900
|
||||
@@ -125,14 +126,14 @@ diff -u /etc/open5gs/sgw.yaml.old /etc/open5gs/sgw.yaml
|
||||
+ addr: 192.168.0.100
|
||||
```
|
||||
|
||||
After changing conf files, please restart Open5GS daemons.
|
||||
If you modify the config files while Open5GS daemons are running, please restart them
|
||||
|
||||
|
||||
### Running Open5GS
|
||||
---
|
||||
|
||||
```bash
|
||||
$ cd install
|
||||
$ cd install/bin/
|
||||
$ ./open5gs-pcrfd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
@@ -197,8 +198,12 @@ Options:
|
||||
-h : show this message and exit
|
||||
```
|
||||
|
||||
You can also copy the binaries to /usr/bin to be able to run them from anywhere on the system.
|
||||
```bash
|
||||
$ cp open5gs* /usr/bin/
|
||||
```
|
||||
|
||||
### Building WebUI of Open5GS
|
||||
### Building the WebUI of Open5GS
|
||||
---
|
||||
|
||||
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
|
||||
@@ -241,16 +246,16 @@ To add subscriber information, you can do WebUI operations in the following orde
|
||||
3. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
|
||||
4. Click `SAVE` Button
|
||||
|
||||
**Tip:** This addition immediately affects Open5GS without restaring any daemon.
|
||||
**Tip:** This addition immediately affects Open5GS without restarting any daemon.
|
||||
{: .notice--warning}
|
||||
|
||||
### Adding a route for UE to have internet connectivity
|
||||
### IP routing + NAT for UE internet connectivity
|
||||
---
|
||||
|
||||
If your phone can connect to internet, you must run the following command in Open5GS-PGW installed host.
|
||||
To allow your phones to connect to the internet, you must run the following command on the host running Open5GS-PGW:
|
||||
|
||||
```bash
|
||||
### Check IP Tables
|
||||
### Check IP Table 'forward'
|
||||
$ sudo iptables -L
|
||||
Chain INPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
@@ -261,7 +266,7 @@ target prot opt source destination
|
||||
Chain OUTPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
### Check NAT Tables
|
||||
### Check IP Table 'nat'
|
||||
$ sudo iptables -L -t nat
|
||||
Chain PREROUTING (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
@@ -279,10 +284,11 @@ target prot opt source destination
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
|
||||
### Add NAT Rule
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 45.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
**Note:** It is a good condition if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add a rule differently.
|
||||
**Note:** The above assumes you do not have any existing rules in the filter and nat tables. If a program such as docker has already set up rules, you may need to add the Open5GS related rules differently.
|
||||
{: .notice--danger}
|
||||
|
||||
### Turn on your eNodeB and Phone
|
||||
---
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,7 +66,7 @@ $ sudo sh -c "cat << EOF > /etc/systemd/network/99-open5gs.network
|
||||
[Match]
|
||||
Name=ogstun
|
||||
[Network]
|
||||
Address=45.45.0.1/16
|
||||
Address=10.45.0.1/16
|
||||
Address=cafe::1/64
|
||||
EOF"
|
||||
```
|
||||
@@ -83,7 +83,7 @@ Make sure it is set up properly.
|
||||
```bash
|
||||
$ ifconfig ogstun
|
||||
ogstun: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
|
||||
inet 45.45.0.1 netmask 255.255.0.0 destination 45.45.0.1
|
||||
inet 10.45.0.1 netmask 255.255.0.0 destination 10.45.0.1
|
||||
inet6 cafe::1 prefixlen 64 scopeid 0x0<global>
|
||||
inet6 fe80::e86e:86d8:ea24:f8ee prefixlen 64 scopeid 0x20<link>
|
||||
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
|
||||
|
||||
@@ -55,7 +55,7 @@ $ sysctl -n net.ipv6.conf.ogstun.disable_ipv6
|
||||
You are now ready to set the IP address on TUN device.
|
||||
|
||||
```bash
|
||||
$ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add cafe::1/64 dev ogstun
|
||||
```
|
||||
|
||||
@@ -115,7 +115,7 @@ Check whether the compilation is correct.
|
||||
$ ninja -C build test
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testsimple.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testsimple.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
|
||||
@@ -48,7 +48,7 @@ $ sysctl -n net.ipv6.conf.ogstun.disable_ipv6
|
||||
You are now ready to set the IP address on TUN device.
|
||||
|
||||
```bash
|
||||
$ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add cafe::1/64 dev ogstun
|
||||
```
|
||||
|
||||
@@ -95,7 +95,7 @@ Check whether the compilation is correct.
|
||||
$ ninja -C build test
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testsimple.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testsimple.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform **the installation process**.
|
||||
|
||||
@@ -76,7 +76,7 @@ Check whether the compilation is correct.
|
||||
$ sudo ninja -C build test
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
|
||||
**Tip:** You can also check the result of `sudo ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testsimple.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testsimple.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform **the installation process**.
|
||||
|
||||
@@ -28,6 +28,11 @@ $ mkdir -p ./data/db
|
||||
$ mongod --dbpath ./data/db
|
||||
```
|
||||
|
||||
**Tip:** MongoDB is persistent after rebooting with the following commands:
|
||||
`$ brew services start mongodb-community`
|
||||
{: .notice--info}
|
||||
|
||||
|
||||
### Setting up TUN device (No persistent after rebooting)
|
||||
---
|
||||
|
||||
@@ -45,7 +50,7 @@ $ sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
|
||||
Enable IP forwarding & Masquerading
|
||||
```bash
|
||||
$ sudo sysctl -w net.inet.ip.forwarding=1
|
||||
$ sudo sh -c "echo 'nat on {en0} from 45.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
|
||||
$ sudo sh -c "echo 'nat on {en0} from 10.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
|
||||
$ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
|
||||
```
|
||||
|
||||
@@ -58,7 +63,7 @@ $ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ brew install gnu-sed mongo-c-driver libusrsctp gnutls libgcrypt libidn libyaml pkg-config
|
||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml pkg-config
|
||||
```
|
||||
|
||||
Install Meson using Homebrew.
|
||||
@@ -76,7 +81,7 @@ To compile with meson:
|
||||
|
||||
```bash
|
||||
$ cd open5gs
|
||||
$ meson build --prefix=`pwd`/install
|
||||
$ meson build --prefix=`pwd`/install -D c_std=c99
|
||||
$ ninja -C build
|
||||
```
|
||||
|
||||
@@ -88,7 +93,7 @@ Check whether the compilation is correct.
|
||||
$ sudo ninja -C build test
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
|
||||
**Tip:** You can also check the result of `sudo ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testsimple.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testsimple.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform **the installation process**.
|
||||
|
||||
173
docs/_docs/troubleshoot/01-simple-issues.md
Normal file
173
docs/_docs/troubleshoot/01-simple-issues.md
Normal file
@@ -0,0 +1,173 @@
|
||||
---
|
||||
title: Simple Issue
|
||||
---
|
||||
|
||||
**Note:** This guide assumes you've already installed Open5GS and it's running with it's default values. If you're new to Open5GS check out the [Quickstart Guide]({{ site.url }}{{ site.baseurl }}/docs/guide/01-quickstart)
|
||||
{: .notice--warning}
|
||||
|
||||
## Services Running
|
||||
|
||||
#### Confirming All Services are Running
|
||||
Before we get too far in troubleshooting let's first check all our services are running.
|
||||
|
||||
```bash
|
||||
$ ps aux | grep open5gs
|
||||
open5gs 3434 0.2 2.8 1074020 27972 ? Ssl 02:39 0:00 /usr/bin/open5gs-pgwd -c /etc/open5gs/pgw.yaml
|
||||
open5gs 3672 0.0 1.0 922972 10408 ? Ssl 02:39 0:00 /usr/bin/open5gs-sgwd -c /etc/open5gs/sgw.yaml
|
||||
open5gs 3893 0.1 1.3 958412 13260 ? Ssl 02:39 0:00 /usr/bin/open5gs-hssd -c /etc/open5gs/hss.yaml
|
||||
open5gs 4011 0.1 1.3 956320 13140 ? Ssl 02:39 0:00 /usr/bin/open5gs-pcrfd -c /etc/open5gs/pcrf.yaml
|
||||
open5gs 4138 0.3 1.2 986524 12608 ? Ssl 02:40 0:00 /usr/bin/open5gs-mmed -c /etc/open5gs/mme.yaml
|
||||
root 4198 0.0 0.1 13136 1060 pts/0 S+ 02:40 0:00 grep --color=auto open5gs
|
||||
```
|
||||
|
||||
You should see each of the services above, PGW, SGW, HSS, PCRF & MME all running.
|
||||
|
||||
If your instance doesn't show this make sure you're started each service:
|
||||
```bash
|
||||
$ systemctl start open5gs-*
|
||||
```
|
||||
|
||||
#### Finding out why a Service isn't Starting
|
||||
|
||||
If a service isn't running check the log for that service - logs for each service live in */var/log/open5gs/* where each service logs to it's own file - MME logs in mme.log, PGW logs in pgw.log, and so on.
|
||||
|
||||
```bash
|
||||
$ cat /var/log/open5gs/mme.log
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
[app] INFO: Configuration: '/etc/open5gs/mme.yaml' (../src/main.c:54)
|
||||
[app] INFO: File Logging: '/var/log/open5gs/mme.log' (../src/main.c:57)
|
||||
[mme] ERROR: No sgw.gtpc in '/etc/open5gs/mme.yaml' (../src/mme/mme-context.c:192)
|
||||
[app] ERROR: Failed to intialize MME (../src/mme/app-init.c:30)
|
||||
[app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:222)
|
||||
```
|
||||
|
||||
Or, you can use `journalctl` like below to view live log.
|
||||
|
||||
```bash
|
||||
$ journalctl -u open5gs-mmed.service --since today -f
|
||||
```
|
||||
|
||||
In the example above we can see the error - no SGW GTPC address is configured in the mme.yaml file, meaning Open5GS MME is failing to start.
|
||||
|
||||
The errors you experience may be different, but if a service is failing to start it's most often due to a misconfiguration issue in one or more of the Open5GS *.yaml* configuration files. The log should tell you which section of the yaml file is missing or invalid.
|
||||
|
||||
|
||||
## eNB Connection Issues
|
||||
---
|
||||
When a UE connects to Open5GS MME the log shows the presence of a new S1AP connection the log at */var/log/open5gs/mme.log*:
|
||||
|
||||
##### No S1AP Connection
|
||||
If you're not seeing any S1AP connection attempts check the eNB can contact the IP the MME is on (No firewall / ACLs etc blocking) and that SCTP Traffic is able to be carried across your transmission network.
|
||||
|
||||
**Note:** 3GPP defines SCTP as the transport protocol for S1-AP/S1-CP traffic (not TCP/UDP). Not all devices / routers support S1AP, particularly over the Internet.
|
||||
|
||||
If you're confident the service is running and connectivity is able to be established across your transmission network, you should see the *SCTP INIT* packets in Wireshark. If you're not seeing these packets go back and check your network.
|
||||
|
||||
If you are seeing the SCTP INIT messages and seeing an ABORT after each one, that suggests the SCTP connection is trying to be established. Check that the MME service is started and listening on the interface / IP you're sending traffic to.
|
||||
|
||||
##### S1AP Connection Rejected
|
||||
If you're seeing S1AP Connection attempts but seeing them rejected by Open5GS, the S1AP message show in a packet capture will indicate the rejection reason, as well as in the mme log.
|
||||
```
|
||||
$ tail -f /var/log/open5gs/mme.log
|
||||
[mme] INFO: eNB-S1[10.0.1.14] connection refused!!! (mme-sm.c:176)
|
||||
```
|
||||
|
||||
Typically S1AP connections are rejected due to one of these reasons:
|
||||
* MNC / MCC in eNB does not match *gummei* and *tai* MCC/MNC pair in (mme.yaml*.
|
||||
* Tracking Area Code does not match configured TACs in *mme.yaml*.
|
||||
|
||||
Each of these can be addressed by editing the relevant section in the MME config in */etc/open5gs/mme.yaml*
|
||||
|
||||
__Example of sucesful eNB connection to MME:__
|
||||
```
|
||||
$ tail -f /var/log/open5gs/mme.log
|
||||
[mme] INFO: eNB-S1 accepted[10.0.1.14]:3223 in s1_path module (s1ap-lkpath.c:70)
|
||||
[mme] INFO: eNB-S1 accepted[10.0.1.14] in master_sm module (mme-sm.c:126)
|
||||
```
|
||||
|
||||
## UE Connection Issues
|
||||
---
|
||||
If your network is setup there are a variety of reasons your network may not perform correctly / at all when connecting a UE.
|
||||
|
||||
#### UE cannot See Network
|
||||
If while scanning for the networks on your UE / Phone you're not seeing your network, there's a few things to check:
|
||||
* Check your eNB is connected to the MME
|
||||
* Check the eNB status
|
||||
* Check the UE you are scanning with is capable of working on the frequencies / bands and duplex mode (TDD or FDD) used by the UE
|
||||
* Check UE is within range of eNB
|
||||
* Check PLMN is not forbidden on USIM (F-PLMN List)
|
||||
|
||||
#### UE Fails to Attach to the Network
|
||||
Assuming while scanning for networks the UE can see the network, but not connect, the most common issues stem from Authentication.
|
||||
|
||||
LTE/E-UTRAN employs *Mutual Authentication* of both the network and the subscriber. This means the credentials in the HSS must match the credentials on the USIM and the credentials in the USIM must match those in the HSS. This means unlike GSM, you cannot use just any SIM and disable crypto, you have to know the details on the USIM or be able to program this yourself in order to authenticate.
|
||||
|
||||
If the issue is authentication, the mme and hss log will give you an indication as to which side is rejecting the authentication, the UE or the Network (Open5GS);
|
||||
|
||||
__IMSI/Subscriber not present in HSS:__
|
||||
If the USIM's IMSI is not present in the HSS the HSS will reject the Authentication.
|
||||
|
||||
```
|
||||
$ tail -f /var/log/open5gs/hss.log
|
||||
[hss] WARNING: Cannot find IMSI in DB : 001000000000001 (hss-context.c:309)
|
||||
```
|
||||
|
||||
__IMSI/Subscriber configured in HSS with wrong credentails:__
|
||||
If the credentials on the HSS do not match what is configured on the USIM, the USIM will reject the connection (MAC Error).
|
||||
|
||||
```
|
||||
$ tail -f /var/log/open5gs/mme.log
|
||||
[emm] WARNING: Authentication failure(MAC failure) (emm-sm.c:573)
|
||||
```
|
||||
|
||||
__APN Requested by UE not present in HSS:__
|
||||
Ensure the APNs requested by the UE are present in the HSS.
|
||||
|
||||
|
||||
#### UE shows "4G" or "LTE" Connection but has no IP Connectivity to the outside World
|
||||
If your device shows as connected (Includes LTE/4G symbol) there are a few simple things to check to diagnose connectivity issues:
|
||||
* The PGW can contact the outside world (Can resolve DNS, browse, etc)
|
||||
* Check if the interface connected to the internet is correctly `NAT` with the `ogstun` interface.
|
||||
- Ensure that the packets in the `INPUT` chain to the `ogstun` interface are accepted
|
||||
```
|
||||
$ sudo iptables -I INPUT -i ogstun -j ACCEPT
|
||||
```
|
||||
* Check if the UE's IP can be pinged successfully by performing `ping <IP of UE>` -- [e.g. `ping 10.45.0.2`]
|
||||
* Configure the firewall correctly. Some operating systems (Ubuntu) by default enable firewall rules to block traffic
|
||||
- Explicitly disable it to see if it resolves the problem of granting data access to the UE by doing
|
||||
```
|
||||
$ sudo ufw disable
|
||||
```
|
||||
|
||||
## Further Debugging
|
||||
---
|
||||
|
||||
Problem with Open5GS can be filed as [GitHub Issues](https://github.com/open5gs/open5gs/issues). Please include the following to get help:
|
||||
|
||||
- Attach `*.pcapng` file created by wireskark.
|
||||
- Attach configuration files at `/etc/open5gs/*.yaml`.
|
||||
- Attach log files at `/var/log/open5gs/*.log`.
|
||||
|
||||
You can modify the configuration file to record more logs.
|
||||
|
||||
```diff
|
||||
diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
|
||||
--- mme.yaml.old 2018-04-15 18:28:31.000000000 +0900
|
||||
+++ mme.yaml 2018-04-15 19:53:10.000000000 +0900
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
logger:
|
||||
file: /var/log/open5gs/mme.log
|
||||
+ level: debug
|
||||
|
||||
parameter:
|
||||
```
|
||||
|
||||
After changing conf files, please restart Open5GS daemons.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-mmed
|
||||
$ sudo systemctl restart open5gs-sgwd
|
||||
```
|
||||
|
||||
647
docs/_docs/troubleshoot/02-now-in-github-issues.md
Normal file
647
docs/_docs/troubleshoot/02-now-in-github-issues.md
Normal file
@@ -0,0 +1,647 @@
|
||||
---
|
||||
title: Now in the Github Issue
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
#### Test failed (e.g. `meson test`)
|
||||
|
||||
Sometimes you may get a message like the one below due to a problem with the freeDiameter library.
|
||||
|
||||
```
|
||||
$ meson test
|
||||
|
||||
...
|
||||
5/8 open5gs:system / simple OK 7.69 s
|
||||
|
||||
--- command ---
|
||||
08:06:23 /home/parallels/open5gs/build/tests/simple/simple
|
||||
--- stdout ---
|
||||
s1setup-test : SUCCESS
|
||||
attach-test : SUCCESS
|
||||
volte-test : SUCCESS
|
||||
handover-test : SUCCESS
|
||||
crash-test : SUCCESS
|
||||
All tests passed.
|
||||
-------
|
||||
|
||||
6/8 open5gs:system / mnc3 FAIL 12.80 s (exit status 1)
|
||||
|
||||
--- command ---
|
||||
08:06:31 /home/parallels/open5gs/build/tests/mnc3/mnc3
|
||||
--- stdout ---
|
||||
mnc3-test : ERROR: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:112 ROUTING ERROR 'No remaining suitable candidate to route the message to' for: (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 'Credit-Control-Request' (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 Version: 0x01 (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 Length: 20 (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 Flags: 0xC0 (RP--) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 Command Code: 272 (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 ApplicationId: 16777238 (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 Hop-by-Hop Identifier: 0x00000000 (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 End-to-End Identifier: 0x2875502B (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 {internal data}: src:(nil)(0) rwb:(nil) rt:0 cb:0x564527642502,(nil)(0x7f71a86df418) qry:(nil) asso:0 sess:0x7f7158001140 (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Session-Id'(263) l=8 f=-M val="pgw.localdomain;1585209991;1;app_gx" (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Origin-Host'(264) l=8 f=-M val="pgw.localdomain" (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Origin-Realm'(296) l=8 f=-M val="localdomain" (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Destination-Realm'(283) l=8 f=-M val="localdomain" (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Auth-Application-Id'(258) l=12 f=-M val=16777238 (0x1000016) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'CC-Request-Type'(416) l=12 f=-M val='INITIAL_REQUEST' (1 (0x1)) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'CC-Request-Number'(415) l=12 f=-M val=0 (0x0) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Subscription-Id'(443) l=8 f=-M val=(grouped) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Subscription-Id-Type'(450) l=12 f=-M val='END_USER_IMSI' (1 (0x1)) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Subscription-Id-Data'(444) l=8 f=-M val="310014987654004" (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Supported-Features'(628) vend='3GPP'(10415) l=12 f=V- val=(grouped) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Feature-List-ID'(629) vend='3GPP'(10415) l=16 f=V- val=1 (0x1) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Feature-List'(630) vend='3GPP'(10415) l=16 f=V- val=11 (0xb) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Network-Request-Support'(1024) vend='3GPP'(10415) l=16 f=VM val=1 (0x1) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Framed-IP-Address'(8) l=8 f=-M val=<0A 2D 00 02> (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'IP-CAN-Type'(1027) vend='3GPP'(10415) l=16 f=VM val=5 (0x5) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'RAT-Type'(1032) vend='3GPP'(10415) l=16 f=V- val=1004 (0x3ec) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'QoS-Information'(1016) vend='3GPP'(10415) l=12 f=VM val=(grouped) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'APN-Aggregate-Max-Bitrate-UL'(1041) vend='3GPP'(10415) l=16 f=V- val=1024000000 (0x3d090000) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'APN-Aggregate-Max-Bitrate-DL'(1040) vend='3GPP'(10415) l=16 f=V- val=1024000000 (0x3d090000) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Default-EPS-Bearer-QoS'(1049) vend='3GPP'(10415) l=12 f=V- val=(grouped) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'QoS-Class-Identifier'(1028) vend='3GPP'(10415) l=16 f=VM val=9 (0x9) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Allocation-Retention-Priority'(1034) vend='3GPP'(10415) l=12 f=V- val=(grouped) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Priority-Level'(1046) vend='3GPP'(10415) l=16 f=V- val=15 (0xf) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Pre-emption-Capability'(1047) vend='3GPP'(10415) l=16 f=V- val=1 (0x1) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Pre-emption-Vulnerability'(1048) vend='3GPP'(10415) l=16 f=V- val=0 (0x0) (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: '3GPP-User-Location-Info'(22) vend='3GPP'(10415) l=12 f=VM val=<82 13 00 41 00 33 13 00 41 08 D0 1B 78> (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: '3GPP-MS-TimeZone'(23) vend='3GPP'(10415) l=12 f=VM val=<23 00> (../lib/diameter/common/init.c:116)
|
||||
: ../subprojects/freeDiameter/extensions/dbg_msg_dumps/dbg_msg_dumps.c:113 AVP: 'Called-Station-Id'(30) l=8 f=-M val=<73 74 61 72 65 6E 74 2E 63 6F 6D> (../lib/diameter/common/init.c:116)
|
||||
: no_CC-Request-Number (../src/pgw/pgw-fd-path.c:505)
|
||||
/home/parallels/open5gs/build/src/pgw/../../lib/core/libogscore.so.1(ogs_abort+0x2e)[0x7f71abdbdbf8]
|
||||
/home/parallels/open5gs/build/src/pgw/open5gs-pgwd(+0x1cb8f)[0x564527642b8f]
|
||||
/home/parallels/open5gs/build/src/pgw/../../subprojects/freeDiameter/libfdcore/libfdcore.so.7(+0x492d7)[0x7f71ab7702d7]
|
||||
/home/parallels/open5gs/build/src/pgw/../../subprojects/freeDiameter/libfdcore/libfdcore.so.7(+0x4cb63)[0x7f71ab773b63]
|
||||
/home/parallels/open5gs/build/src/pgw/../../subprojects/freeDiameter/libfdcore/libfdcore.so.7(+0x4ccef)[0x7f71ab773cef]
|
||||
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f71aae686db]
|
||||
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f71aab9188f]
|
||||
03/26 16:06:43.674ERROR: GTP Timeout : IMSI[310014987654004] Message-Type[32] (../src/sgw/sgw-s11-handler.c:39)
|
||||
FAILED 1 of 1
|
||||
Failed Tests Total Fail Failed %
|
||||
===================================================
|
||||
mnc3-test 1 1 100.00%
|
||||
--- stderr ---
|
||||
03/26 16:06:43.681: [ERROR: GTP Timeout : IMSI[310014987654004] Message-Type[32] (../src/mme/mme-gtp-path.c:110)
|
||||
Line 202: Condition is false, but expected true
|
||||
-------
|
||||
|
||||
7/8 open5gs:system / volte FAIL 10.57 s (killed by signal 6 SIGABRT)
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
I cannot solve the problem exactly at this point.
|
||||
{: .blue}
|
||||
|
||||
Remove all subscriber information using MongoDB Client
|
||||
```
|
||||
$ mongo
|
||||
> use open5gs
|
||||
switched to db open5gs
|
||||
> db.subscribers.find() ### Check the test subscriber
|
||||
> db.subscribers.drop() ### Remove all subscriber
|
||||
> db.subscribers.find() ### Check that all subscribers are empty
|
||||
```
|
||||
|
||||
Kill all processes.
|
||||
```bash
|
||||
$ ps -ef | grep open5gs
|
||||
$ sudo pkill -9 open5gs-hssd
|
||||
$ sudo pkill -9 open5gs-pcrfd
|
||||
$ sudo pkill -9 open5gs-pgwd
|
||||
$ sudo pkill -9 open5gs-sgwd
|
||||
$ sudo pkill -9 open5gs-mmed
|
||||
```
|
||||
|
||||
Run `meson test` again
|
||||
```
|
||||
$ meson test
|
||||
ninja: Entering directory `/Users/acetcom/Documents/git/open5gs/build'
|
||||
ninja: no work to do.
|
||||
1/8 open5gs:unit / core OK 6.93 s
|
||||
2/8 open5gs:unit / crypt OK 0.08 s
|
||||
3/8 open5gs:system / sctp OK 1.09 s
|
||||
4/8 open5gs:unit / unit OK 0.04 s
|
||||
5/8 open5gs:system / simple OK 5.07 s
|
||||
6/8 open5gs:system / mnc3 OK 1.18 s
|
||||
7/8 open5gs:system / volte OK 2.99 s
|
||||
8/8 open5gs:system / csfb OK 6.53 s
|
||||
|
||||
Ok: 8
|
||||
Expected Fail: 0
|
||||
Fail: 0
|
||||
Unexpected Pass: 0
|
||||
Skipped: 0
|
||||
Timeout: 0
|
||||
|
||||
Full log written to /Users/acetcom/Documents/git/open5gs/build/meson-logs/testlog.txt
|
||||
```
|
||||
|
||||
**Note:** If your test result more than once is same as above, there should be no problem with code you modified.
|
||||
{: .notice--danger}
|
||||
|
||||
#### Is it possible to setup IP/NAT table along with Docker?
|
||||
|
||||
Enable IP Forward.
|
||||
```
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
```
|
||||
|
||||
The following is the default docker IP/NAT table.
|
||||
|
||||
```
|
||||
$ sudo iptables-save
|
||||
# Generated by iptables-save v1.6.1 on Sat Jun 1 23:43:50 2019
|
||||
*nat
|
||||
:PREROUTING ACCEPT [74:4820]
|
||||
:INPUT ACCEPT [4:208]
|
||||
:OUTPUT ACCEPT [49:3659]
|
||||
:POSTROUTING ACCEPT [49:3659]
|
||||
:DOCKER - [0:0]
|
||||
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
|
||||
-A DOCKER -i docker0 -j RETURN
|
||||
COMMIT
|
||||
# Completed on Sat Jun 1 23:43:50 2019
|
||||
# Generated by iptables-save v1.6.1 on Sat Jun 1 23:43:50 2019
|
||||
*filter
|
||||
:INPUT ACCEPT [651:514108]
|
||||
:FORWARD DROP [70:4612]
|
||||
:OUTPUT ACCEPT [590:63846]
|
||||
:DOCKER - [0:0]
|
||||
:DOCKER-ISOLATION-STAGE-1 - [0:0]
|
||||
:DOCKER-ISOLATION-STAGE-2 - [0:0]
|
||||
:DOCKER-USER - [0:0]
|
||||
-A FORWARD -j DOCKER-USER
|
||||
-A FORWARD -j DOCKER-ISOLATION-STAGE-1
|
||||
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
-A FORWARD -o docker0 -j DOCKER
|
||||
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
|
||||
-A FORWARD -i docker0 -o docker0 -j ACCEPT
|
||||
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
|
||||
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
|
||||
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
|
||||
-A DOCKER-ISOLATION-STAGE-2 -j RETURN
|
||||
-A DOCKER-USER -j RETURN
|
||||
COMMIT
|
||||
# Completed on Sat Jun 1 23:43:50 2019
|
||||
```
|
||||
|
||||
Create **newtables** file as below.
|
||||
|
||||
```diff
|
||||
$ diff -u oldtables newtables
|
||||
--- oldtables 2019-06-01 23:43:50.354974226 +0900
|
||||
+++ newtables 2019-06-01 23:44:16.110931684 +0900
|
||||
@@ -8,6 +8,7 @@
|
||||
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
|
||||
+-A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
-A DOCKER -i docker0 -j RETURN
|
||||
COMMIT
|
||||
# Completed on Sat Jun 1 23:43:50 2019
|
||||
@@ -26,6 +27,10 @@
|
||||
-A FORWARD -o docker0 -j DOCKER
|
||||
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
|
||||
-A FORWARD -i docker0 -o docker0 -j ACCEPT
|
||||
+-A FORWARD -o ogstun -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
+-A FORWARD -o ogstun -j DOCKER
|
||||
+-A FORWARD -i ogstun ! -o ogstun -j ACCEPT
|
||||
+-A FORWARD -i ogstun -o ogstun -j ACCEPT
|
||||
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
|
||||
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
|
||||
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
|
||||
```
|
||||
|
||||
And then, apply **newtables** as below.
|
||||
```
|
||||
$ sudo iptables-restore < newtables
|
||||
```
|
||||
|
||||
The above operation is the same as described in the following manuals.
|
||||
```
|
||||
### Check IP Tables
|
||||
$ sudo iptables -L
|
||||
Chain INPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain FORWARD (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain OUTPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
### Check NAT Tables
|
||||
$ sudo iptables -L -t nat
|
||||
Chain PREROUTING (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain INPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain OUTPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain POSTROUTING (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
### Enable IPv4 Forwarding
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
|
||||
### Add NAT Rule
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
#### How to use a different APN for each PGW
|
||||
|
||||
By default, MME selects the PGW as the first PGW node. To use a different APN for each PGW, specify gtpc.apn as the APN name. If the HSS uses WebUI to set the PGW IP for each UE, you can use a specific PGW node for each UE.
|
||||
|
||||
See the following example.
|
||||
|
||||
```
|
||||
### For reference, see `pgw.yaml`
|
||||
#------------------------ MME --------------------------
|
||||
#
|
||||
# o Two PGW are defined. 127.0.0.3:2123 is used.
|
||||
# [fe80::3%lo]:2123 is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%lo
|
||||
#
|
||||
# o One PGW is defined. if prefer_ipv4 is not true,
|
||||
# [fe80::3%lo] is selected.
|
||||
# gtpc:
|
||||
# - addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%lo
|
||||
#
|
||||
# o Two PGW are defined with a different APN.
|
||||
# - Note that if PGW IP for UE is configured in HSS,
|
||||
# the following configurion for this UE is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# apn: internet
|
||||
# - addr: 127.0.0.5
|
||||
# apn: volte
|
||||
#
|
||||
# o If APN is omitted, the default APN uses the first PGW node.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: 127.0.0.5
|
||||
# apn: volte
|
||||
#
|
||||
```
|
||||
|
||||
The IP address of the UE can also use a different UE pool depending on the APN.
|
||||
|
||||
```
|
||||
### For reference, see `pgw.yaml`
|
||||
#
|
||||
# <UE Pool>
|
||||
#
|
||||
# o IPv4 Pool
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# addr: 10.45.0.1/16
|
||||
#
|
||||
# o IPv4/IPv6 Pool
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
#
|
||||
#
|
||||
# o Specific APN(e.g 'volte') uses 10.46.0.1/16, cafe:2::1/64
|
||||
# All other APNs use 10.45.0.1/16, cafe:1::1/64
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 10.46.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
# $ sudo ip addr add cafe:2::1/64 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: volte
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
#
|
||||
# o Multiple Devices (default: ogstun)
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun2
|
||||
# $ sudo ip addr add 10.46.0.1/16 dev ogstun3
|
||||
# $ sudo ip addr add cafe:2::1/64 dev ogstun3
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# dev: ogstun2
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: volte
|
||||
# dev: ogstun3
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
# dev: ogstun3
|
||||
#
|
||||
```
|
||||
|
||||
#### Failing to run `./open5gs-mmed`
|
||||
|
||||
You might be getting the following error after running `./open5gs-mmed`.
|
||||
```bash
|
||||
$ ./build/src/mme/open5gs-mmed
|
||||
10/27 16:45:41.912: [app] FATAL: cannot open file `/Users/acetcom/Documents/git/open5gs/install/etc/open5gs/mme.yaml` (../lib/app/ogs-config.c:67)
|
||||
10/27 16:45:41.912: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:211)
|
||||
```
|
||||
|
||||
You should perform **the installation process**.
|
||||
|
||||
```bash
|
||||
$ ninja -C build install
|
||||
```
|
||||
|
||||
#### How to connect MongoDB server
|
||||
|
||||
If you do not start MongoDB, you will get the following error:
|
||||
|
||||
```bash
|
||||
$ ./install/bin/open5gs-hssd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
10/27 16:45:00.371: [app] INFO: Configuration: '/Users/acetcom/Documents/git/open5gs/install/etc/open5gs/hss.yaml' (../src/main.c:54)
|
||||
10/27 16:45:00.372: [app] INFO: File Logging: '/Users/acetcom/Documents/git/open5gs/install/var/log/open5gs/hss.log' (../src/main.c:57)
|
||||
10/27 16:45:00.377: [dbi] ERROR: Failed to connect to server [mongodb://localhost/open5gs] (../lib/dbi/ogs-mongoc.c:91)
|
||||
10/27 16:45:00.377: [app] ERROR: Failed to intialize HSS (../src/hss/app-init.c:28)
|
||||
```
|
||||
|
||||
You can start MongoDB using systemctl.
|
||||
```bash
|
||||
$ sudo systemctl start mongodb
|
||||
```
|
||||
|
||||
#### I have some error when running `./build/test/simple/simple`
|
||||
|
||||
Did you see the following error after executing `./build/test/simple/simple`?
|
||||
```bash
|
||||
$ ./build/test/simple/simple
|
||||
s1setup_test : SUCCESS
|
||||
attach_test : -Line 134: Condition is false, but expected true
|
||||
\04/09 15:49:09.285: [esm] FATAL: esm_handle_pdn_connectivity_request: Assertion `SECURITY_CONTEXT_IS_VALID(mme_ue)' failed. (esm_handler.c:29)
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/lib/ogslib/src/core/.libs/libogscore-1.0.so.0(ogs_abort+0x2b)[0x7f608518271b]
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/test/.libs/testcomplex(+0x92121)[0x55dc9e274121]
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/test/.libs/testcomplex(+0x4f5b9)[0x55dc9e2315b9]
|
||||
```
|
||||
|
||||
|
||||
Remove all subscriber information using MongoDB Client
|
||||
```
|
||||
$ mongo
|
||||
> db.subscribers.find() ### Check the test subscriber
|
||||
> db.subscribers.drop() ### Remove all subscriber
|
||||
> db.subscribers.find() ### Check that all subscribers are empty
|
||||
```
|
||||
|
||||
Kill all processes.
|
||||
```bash
|
||||
$ ps -ef | grep simple
|
||||
$ ps -ef | grep open5gs
|
||||
$ sudo pkill -9 simple
|
||||
$ sudo pkill -9 open5gs-mmed ...
|
||||
```
|
||||
|
||||
Execute `./build/test/simple/simple`
|
||||
```bash
|
||||
$ ./build/test/simple/simple
|
||||
```
|
||||
|
||||
#### My eNB does not support IPv6.
|
||||
|
||||
Your eNodeB don't have to support IPv6.
|
||||
|
||||
If the sgw.gtpu configuration does not have an IPv6 address, the eNodeB can use IPv4 to connect to the MME and SGW. If the sgw.gtpu setting has an IPv6 address, you can disable the IPv6 address as shown below.
|
||||
|
||||
```yaml
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
```
|
||||
|
||||
**Note:** This parameter `no_ipv6` is only applied to EPC Elements such as MME, SGW, and so on. The parameter `no_ipv6` does not affect to UE. So, IPv6-enabled UE can connect to Open5GS LTE network.
|
||||
{: .notice--warning}
|
||||
|
||||
#### Unable to add new user by WebUI
|
||||
|
||||
It might be a CSRF token mismatch error.
|
||||
Please, delete corresponding cookies, cache, session data etc.
|
||||
|
||||
#### Change Domain from localdomain to anything else
|
||||
|
||||
You should configure the domain name on your computer. Otherwise, freeDiameter raise an error.
|
||||
|
||||
#### How many of UEs can Open5GS support?
|
||||
|
||||
See the [lib/core/ogs-3gpp-types.h](https://github.com/{{ site.github_username }}/open5gs/blob/master/lib/core/ogs-3gpp-types.h).
|
||||
|
||||
```
|
||||
#define MAX_NUM_OF_ENB 128
|
||||
#define MAX_NUM_OF_UE 128
|
||||
#define MAX_NUM_OF_SESS 4
|
||||
#define MAX_NUM_OF_BEARER 4
|
||||
#define MAX_NUM_OF_TUNNEL 3 /* Num of Tunnel per Bearer */
|
||||
#define MAX_NUM_OF_PF 16 /* Num of Packet Filter per Bearer */
|
||||
|
||||
#define MAX_POOL_OF_UE (MAX_NUM_OF_ENB * MAX_NUM_OF_UE)
|
||||
#define MAX_POOL_OF_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)
|
||||
#define MAX_POOL_OF_BEARER (MAX_POOL_OF_SESS * MAX_NUM_OF_BEARER)
|
||||
#define MAX_POOL_OF_TUNNEL (MAX_POOL_OF_BEARER * MAX_NUM_OF_TUNNEL)
|
||||
#define MAX_POOL_OF_PF (MAX_POOL_OF_BEARER * MAX_NUM_OF_PF)
|
||||
#define MAX_POOL_OF_DIAMETER_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)
|
||||
```
|
||||
|
||||
Currently, the number of UE is limited to `128*128`.
|
||||
|
||||
#### What is the Default Configuration?
|
||||
|
||||
- Network
|
||||
|
||||
```
|
||||
* MME
|
||||
S1AP: listen on all address avaiable in system
|
||||
GTP-C: listen on the first IP address in system
|
||||
DIAMETER: 127.0.0.2 (No TLS)
|
||||
|
||||
* SGW
|
||||
GTP-C: 127.0.0.2
|
||||
GTP-U: listen on the first IP address in system
|
||||
|
||||
* PGW
|
||||
GTP-C: Both 127.0.0.3 and [::1]
|
||||
GTP-U: Both 127.0.0.3 and [::1]
|
||||
DIAMETER: 127.0.0.3 (No TLS)
|
||||
|
||||
* HSS
|
||||
DIAMETER: 127.0.0.4 (No TLS)
|
||||
|
||||
* PCRF
|
||||
DIAMETER: 127.0.0.5 (No TLS)
|
||||
```
|
||||
|
||||
- GUMMEI, PLMN and TAC
|
||||
|
||||
```
|
||||
* GUMMEI
|
||||
PLMN ID - MNC: 001, MCC: 01
|
||||
MME Group : 2
|
||||
MME Code : 1
|
||||
|
||||
* TAI
|
||||
PLMN ID - MNC: 001, MCC: 01
|
||||
TAC : 12345
|
||||
```
|
||||
|
||||
- Security
|
||||
|
||||
```
|
||||
* Integrity : EIA1 - Snow 3G
|
||||
* Ciphering : EEA0 - Nothing
|
||||
```
|
||||
|
||||
- UE Network
|
||||
|
||||
```
|
||||
* IPv4 : 10.45.0.1/16
|
||||
* IPv6 : cafe::1/64
|
||||
```
|
||||
|
||||
- DNS
|
||||
|
||||
```
|
||||
* IPv4
|
||||
Primary : 8.8.8.8
|
||||
Secondary : 8.8.4.4
|
||||
|
||||
* IPv6
|
||||
Primary : 2001:4860:4860::8888
|
||||
Secondary : 2001:4860:4860::8844
|
||||
```
|
||||
|
||||
#### The parsing errors are caused by tab spaces in the configuration files.
|
||||
|
||||
YAML forbids tabs. You should use space instead of tab in Open5GS configuration file.
|
||||
|
||||
```markdown
|
||||
YAML FAQ: Why does YAML forbid tabs?
|
||||
|
||||
Tabs have been outlawed since they are treated differently by different editors and tools. And since indentation is so critical to proper interpretation of YAML, this issue is just too tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs in Python source is a headache for many people and that were he to design Python again, he would forbid them.
|
||||
```
|
||||
|
||||
#### Cross compilation setup
|
||||
|
||||
By default, Open5GS is designed to support the Embedding System. To do so, we introduced pool-based memory management. Unfortunately, we have not tested Open5GS in an embedded environment. I tried to compile on the ARM architecture using Docker and run it with QEMU for your reference.
|
||||
|
||||
- We'll use Debian Docker Environment.
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/acetcom/open5gs
|
||||
$ cd open5gs/docker
|
||||
$ DIST=debian TAG=stretch docker-compose run dev
|
||||
```
|
||||
|
||||
- In Docker Container
|
||||
|
||||
```bash
|
||||
$ sudo dpkg --add-architecture armel
|
||||
$ sudo apt update
|
||||
$ sudo apt install libsctp-dev:armel libyaml-dev:armel libgnutls28-dev:armel libgcrypt-dev:armel libidn11-dev:armel libssl-dev:armel libmongoc-dev:armel libbson-dev:armel
|
||||
$ sudo apt install crossbuild-essential-armel
|
||||
$ sudo apt install qemu
|
||||
$ git clone https://github.com/acetcom/open5gs
|
||||
$ cd open5gs/
|
||||
|
||||
$ cat << EOF > cross_file.txt
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
||||
|
||||
[binaries]
|
||||
c = '/usr/bin/arm-linux-gnueabi-gcc'
|
||||
ar = '/usr/bin/arm-linux-gnueabi-ar'
|
||||
strip = '/usr/bin/arm-linux-gnueabi-strip'
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
EOF
|
||||
|
||||
$ meson build --prefix=`pwd`/install --cross-file cross_file.txt
|
||||
$ ninja -C build
|
||||
$ qemu-arm ./install/bin/open5gs-sgwd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
10/28 06:47:36.649: [app] INFO: Configuration: '/home/acetcom/git/open5gs/install/etc/open5gs/sgw.yaml' (../src/main.c:54)
|
||||
10/28 06:47:36.652: [app] INFO: File Logging: '/home/acetcom/git/open5gs/install/var/log/open5gs/sgw.log' (../src/main.c:57)
|
||||
Unknown host QEMU_IFLA type: 50
|
||||
Unknown host QEMU_IFLA type: 51
|
||||
Unknown host QEMU_IFLA type: 40
|
||||
Unknown host QEMU_IFLA type: 41
|
||||
Unknown host QEMU_IFLA type: 47
|
||||
Unknown host QEMU_IFLA type: 48
|
||||
Unknown host QEMU_IFLA type: 43
|
||||
Unknown host QEMU_IFLA type: 50
|
||||
Unknown host QEMU_IFLA type: 51
|
||||
Unknown host QEMU_IFLA type: 40
|
||||
Unknown host QEMU_IFLA type: 41
|
||||
Unknown host QEMU_IFLA type: 47
|
||||
Unknown host QEMU_IFLA type: 48
|
||||
Unknown host QEMU_IFLA type: 43
|
||||
Unknown QEMU_IFLA_INFO_KIND tun
|
||||
Unknown host QEMU_IFLA type: 50
|
||||
Unknown host QEMU_IFLA type: 51
|
||||
Unknown host QEMU_IFLA type: 40
|
||||
Unknown host QEMU_IFLA type: 41
|
||||
Unknown host QEMU_IFLA type: 47
|
||||
Unknown host QEMU_IFLA type: 48
|
||||
Unknown host QEMU_IFLA type: 43
|
||||
10/28 06:47:36.683: [app] INFO: SGW initialize...done (../src/sgw/app-init.c:31)
|
||||
10/28 06:47:36.696: [gtp] INFO: gtp_server() [127.0.0.2]:2123 (../lib/gtp/path.c:32)
|
||||
10/28 06:47:36.697: [gtp] INFO: gtp_server() [172.18.0.2]:2152 (../lib/gtp/path.c:32)
|
||||
^C10/28 06:47:37.324: [app] INFO: SIGINT received (../src/main.c:73)
|
||||
10/28 06:47:37.325: [app] INFO: Open5GS daemon terminating... (../src/main.c:229)
|
||||
10/28 06:47:37.337: [app] INFO: SGW terminate...done (../src/sgw/app-init.c:39)
|
||||
|
||||
$ qemu-arm ./install/bin/open5gs-hssd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
10/28 06:47:39.021: [app] INFO: Configuration: '/home/acetcom/git/open5gs/install/etc/open5gs/hss.yaml' (../src/main.c:54)
|
||||
10/28 06:47:39.024: [app] INFO: File Logging: '/home/acetcom/git/open5gs/install/var/log/open5gs/hss.log' (../src/main.c:57)
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
qemu: Unsupported syscall: 345
|
||||
10/28 06:47:39.044: [dbi] INFO: MongoDB URI: 'mongodb://mongodb/open5gs' (../lib/dbi/ogs-mongoc.c:99)
|
||||
|
||||
|
||||
getsockopt level=132 optname=0 not yet supported
|
||||
10/28 06:47:41.917: [diam] ERROR: ../subprojects/freediameter/libfdcore/sctp.c:86 ERROR: in '(getsockopt(sk, IPPROTO_SCTP, 0, &rtoinfo, &sz))' : Operation not supported (../lib/diameter/common/init.c:116)
|
||||
10/28 06:47:41.919: [diam] ERROR: ../subprojects/freediameter/libfdcore/sctp.c:778 ERROR: in '((fd_setsockopt_prebind(*sock)))' : Operation not supported (../lib/diameter/common/init.c:116)
|
||||
10/28 06:47:41.919: [diam] ERROR: ../subprojects/freediameter/libfdcore/cnxctx.c:181 ERROR: in '(fd_sctp_create_bind_server( &cnx->cc_socket, cnx->cc_family, ep_list, port ))' : Operation not supported (../lib/diameter/common/init.c:116)
|
||||
10/28 06:47:41.919: [diam] ERROR: ../subprojects/freediameter/libfdcore/server.c:355 ERROR: in '(s->conn = fd_cnx_serv_sctp(fd_g_config->cnf_port, empty_conf_ep ? ((void *)0) : &fd_g_config->cnf_endpoints))' : Transport endpoint is not connected (../lib/diameter/common/init.c:116)
|
||||
10/28 06:47:41.919: [diam] ERROR: ../subprojects/freediameter/libfdcore/core.c:300 ERROR: in '((fd_servers_start()))' : Transport endpoint is not connected (../lib/diameter/common/init.c:116)
|
||||
10/28 06:47:41.920: [diam] ERROR: ../lib/diameter/common/init.c:62 ERROR: in '(fd_core_start())' : Transport endpoint is not connected (../lib/diameter/common/init.c:116)
|
||||
10/28 06:47:41.920: [diam] INFO: [6]: ../subprojects/freediameter/libfdcore/core.c:329 Initiating freeDiameter shutdown sequence (2) (../lib/diameter/common/init.c:127)
|
||||
10/28 06:47:42.057: [hss] FATAL: hss_fd_init: Assertion `ret == 0' failed. (../src/hss/hss-fd-path.c:681)
|
||||
```
|
||||
|
||||
The SCTP module is not included in the QEMU kernel. I believe that if the Linux kernel installed on your target platform contains an SCTP module, it will work normally.
|
||||
{: .notice--warning}
|
||||
@@ -315,7 +315,7 @@ target prot opt source destination
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
|
||||
### Add NAT Rule
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 45.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
**Note:** For the first time, it is a good condition if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add a rule differently.
|
||||
|
||||
1269
docs/_docs/tutorial/02-VoLTE-setup.md
Normal file
1269
docs/_docs/tutorial/02-VoLTE-setup.md
Normal file
File diff suppressed because it is too large
Load Diff
249
docs/_docs/tutorial/03-VoLTE-dockerized.md
Normal file
249
docs/_docs/tutorial/03-VoLTE-dockerized.md
Normal file
@@ -0,0 +1,249 @@
|
||||
---
|
||||
title: Dockerized VoLTE Setup
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
Setup description:
|
||||
- MCC: 001, MNC: 01
|
||||
- Docker-compose
|
||||
- srsENB + USRP B210 or a commercial eNB
|
||||
- Sysmocom USIM - sysmoUSIM-SJS1
|
||||
- UE: Mi 9 Pro 5G. Other UE are being tested.
|
||||
{: .blue}
|
||||
|
||||
#### 0. Introduction
|
||||
|
||||
This tutorial introduces an install-and-run lab for Open5GS + Kamailio IMS
|
||||
VoLTE study, a follow-up project of [Open5GS Tutorial: VoLTE Setup with Kamailio IMS and Open5GS](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/).
|
||||
The tutorial is based on Herle Supreeth's [docker_open5gs](https://github.com/herlesupreeth/docker_open5gs) and his fork of Open5GS and Kamailio.
|
||||
|
||||
The main purpose is to save researchers' and students' time to debug for a
|
||||
minimum-viable environment before actual study can be proceeded.
|
||||
|
||||
**Important notice before you start**
|
||||
|
||||
1. Herle Supreeth's fork of Kamailio is used to support IPsec.
|
||||
1. Java 7 is downloaded from an alternative location. You have to agree with
|
||||
Oracle's term of service and have an Oracle account, to legally use Java SDK
|
||||
7u80. By using this repo, I assume you have the legal right to use it and
|
||||
hold no liability.
|
||||
|
||||
You have to prepare IMSI, Ki, OP (yes, not **OPc**), SQN of your SIM cards.
|
||||
Even though Open5GS supports OPc, FHoSS merely takes OP. You may also want to
|
||||
disable SQN checking in the SIM card (even though we are not sure whether it is
|
||||
effective.) Check out https://github.com/herlesupreeth/sysmo-usim-tool for a
|
||||
slightly modified sysmo-usim-tool.
|
||||
|
||||
|
||||
#### 1. Prepare SIM cards for VoLTE
|
||||
|
||||
**N.B.**
|
||||
1. Wrong KIC / KID / KIK bricks your SIM card.
|
||||
1. Use MCC = 001, MNC = 01 for a testing network, unless you know your MCC/MNC is supported by Android Carrier Privileges.
|
||||
|
||||
Refer to: https://osmocom.org/projects/cellular-infrastructure/wiki/VoLTE_IMS_Android_Carrier_Privileges
|
||||
* gp --key-enc KIC1 --key-mac KID1 --key-dek KIK1 -lvi
|
||||
* gp --key-enc KIC1 --key-mac KID1 --key-dek KIK1 --unlock
|
||||
* gp --install applet.cap
|
||||
* gp -a 00A4040009A00000015141434C0000 -a 80E2900033F031E22FE11E4F06FFFFFFFFFFFFC114E46872F28B350B7E1F140DE535C2A8D5804F0BE3E30DD00101DB080000000000000001
|
||||
* gp --acr-list
|
||||
|
||||
If you use gp.jar from Herle Supreeth's [CoSIM Wiki](https://github.com/herlesupreeth/CoIMS_Wiki), replace `gp --acr-list` with `gp --acr-list-aram`.
|
||||
|
||||
|
||||
#### 2. Build Open5GS, Kamailio with docker-compose
|
||||
|
||||
Mandatory requirements:
|
||||
* [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu)
|
||||
* [docker-compose](https://docs.docker.com/compose)
|
||||
|
||||
Install docker-compose and make sure it works before going forward.
|
||||
|
||||
Clone the repository and build base docker images of open5gs and Kamailio:
|
||||
|
||||
```
|
||||
git clone https://github.com/miaoski/docker_open5gs
|
||||
cd docker_open5gs/base
|
||||
docker build --no-cache --force-rm -t docker_open5gs .
|
||||
|
||||
cd ../kamailio_base
|
||||
docker build --no-cache --force-rm -t open5gs_kamailio .
|
||||
|
||||
cd ..
|
||||
docker-compose build --no-cache
|
||||
|
||||
# Copy DNS setting to containers. Do this whenever you change IP in .env
|
||||
./copy-env.sh
|
||||
|
||||
# Start MySQL and MongoDB first, in order to initialize the databases
|
||||
docker-compose up mongo mysql dns
|
||||
|
||||
# To start Open5GS core network without IMS
|
||||
docker-compose up hss mme pcrf pgw sgw
|
||||
|
||||
# To start IMS
|
||||
docker-compose up rtpengine fhoss pcscf icscf scscf
|
||||
|
||||
# To test whether DNS is properly running
|
||||
./test-dns.sh
|
||||
```
|
||||
|
||||
You may want to review `.env` for IP allocation.
|
||||
|
||||
|
||||
#### 3. (Optional) Run srsENB in a separate container
|
||||
|
||||
I use srsENB and USRP B210 in the lab. Sometimes you may want to restart
|
||||
srsENB while keeping the core network running. It is thus recommended to run
|
||||
srsENB separately.
|
||||
|
||||
Edit `.env` first to set EARFCN, TX_GAIN, RX_GAIN. Thereafter,
|
||||
|
||||
```
|
||||
docker-compose -f srsenb.yaml build --no-cache
|
||||
docker-compose -f srsenb.yaml up
|
||||
```
|
||||
|
||||
|
||||
#### 4. Configuration and register two UE
|
||||
|
||||
The configuration files for each of the Core Network component can be found
|
||||
under their respective folder. Edit the .yaml files of the components and run
|
||||
`docker-compose build` again.
|
||||
|
||||
Open (http://<DOCKER_HOST_IP>:3000) in a web browser, where <DOCKER_HOST_IP> is
|
||||
the IP of the machine/VM running the open5gs containers. Login with following
|
||||
credentials
|
||||
|
||||
```
|
||||
Username : admin
|
||||
Password : 1423
|
||||
```
|
||||
|
||||
Follow the instructions in [VoLTE Setup](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/):
|
||||
- Step 18, set IMSI, Ki, OP, SQN and APN of your SIM cards.
|
||||
**Important!** Set the type of both APN to IPv4. Kamailio does not support VoLTE over
|
||||
IPv6 at the moment. (See the screenshot below.)
|
||||
- Step 20, add IMS subscriptions to FHoSS.
|
||||
|
||||

|
||||
|
||||
For already running systems, copy SQN from Open5GS and type it in FHoSS. You
|
||||
can type SQN in decimal. FHoSS will automagically convert it to hex.
|
||||
|
||||
Pay special attention to copy/paste. You might have leading or trailing spaces
|
||||
in FHoSS, resulting in failed connections!
|
||||
|
||||
|
||||
|
||||
#### 5. Debugging with Wireshark
|
||||
|
||||
Thanks to Open5GS, the topology is super similar to [SAE on Wikipedia](https://en.wikipedia.org/wiki/System_Architecture_Evolution#/media/File:Evolved_Packet_Core.svg).
|
||||
|
||||

|
||||
|
||||
|
||||
**APN**
|
||||
|
||||
On your cellphone, there should be *internet* and *ims*.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/apn-on-cellphone.jpg" width="320" />
|
||||
|
||||
CoIMS should look like the one below. If you don't know what CoIMS is, please
|
||||
refer to step 23 of VoLTE Setup.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/coims.jpg" width="320" />
|
||||
|
||||
|
||||
**Networking issues**
|
||||
|
||||
PCAP files of successful calls can be found on [VoLTE Setup](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/).
|
||||
|
||||
When DNS is not properly set, you may end up with 478 Unresolvable destination (478/SL):
|
||||
|
||||

|
||||
|
||||
If the port if not open, or DNS is not properly configured, the phone cannot
|
||||
reach P-CSCF and fails.
|
||||
|
||||

|
||||
|
||||
If your cellphone stuck on ipsec (like mine), the PCAP looks like the one
|
||||
below. However, it means almost every function in the system works (only
|
||||
RTPEngine and FHoSS are not tested.)
|
||||
|
||||

|
||||
|
||||
|
||||
#### 6. Successful calls
|
||||
|
||||
Herle Supreeth has shared PCAP files of successful calls, including
|
||||
- [IPSec UE registration for VoLTE]({{ site.url }}{{ site.baseurl }}/assets/pcapng/ipsec_reg.pcapng)
|
||||
- [Non-IPSec UE registration for VoLTE]({{ site.url }}{{ site.baseurl }}/assets/pcapng/nonipsec_reg.pcapng)
|
||||
- [IPSec UE to IPSec UE calling]({{ site.url }}{{ site.baseurl }}/assets/pcapng/ipsec_to_ipsec_call.pcapng)
|
||||
- [Non-IPSec UE to IPSec UE calling]({{ site.url }}{{ site.baseurl }}/assets/pcapng/nonipsec_to_ipsec_call.pcapng)
|
||||
- [IPSec UE to Non-IPSec UE calling]({{ site.url }}{{ site.baseurl }}/assets/pcapng/ipsec_to_nonipsec_call.pcapng)
|
||||
|
||||
The successful calls were made with a commercial eNB (in his case a Casa
|
||||
smallcell), while srsENB the ACK takes a very long time to reach the UE,
|
||||
resulting in disconnected calls.
|
||||
|
||||
**UE registration**
|
||||
|
||||

|
||||
|
||||
From the screenshot, we see a UE that supports IPSec got a response from
|
||||
S-CSCF, indicating that ipsec-3gpp is supported, protocol is ESP (ethernet
|
||||
proto 50, IPSec). Client port (port-c) is 5100 and server port (port-s) 6100.
|
||||
Refer to [IMS/SIP - Basic Procedures](https://www.sharetechnote.com/html/IMS_SIP_Procedure_Reg_Auth_IPSec.html) if you want to know more.
|
||||
Also, notice that packets after 401 Unauthorized are transmitted over ESP.
|
||||
|
||||
If a UE does not support IPSec, you don't see the "security-server", as shown below:
|
||||
|
||||

|
||||
|
||||
|
||||
**VoLTE calls**
|
||||
|
||||

|
||||
|
||||
The Wireshark above shows that after several IPSec (ESP) packets, S-CSCF is
|
||||
sending a SIP INVITE for UE 03 to UE 04. To be more precise,
|
||||
|
||||
```
|
||||
Request-Line: INVITE sip:0398765432100;phone-context=0498765432100@0498765432100;user=phone SIP/2.0
|
||||
...
|
||||
Record-Route URI: sip:mo@10.4.128.21:6101;lr=on;ftag=7b3fae13;rm=8;did=078.654
|
||||
```
|
||||
|
||||
The SIP port of the caller (`contact`) will also be passed to the callee,
|
||||
```
|
||||
Contact URI: sip:0498765432100@192.168.101.3:6400;alias=192.168.101.3~6401~1
|
||||
```
|
||||
|
||||
After S-CSCF forwarded the INVITE to P-CSCF, it returns a 100 Trying, and contacts with the callee via IPSec:
|
||||
|
||||

|
||||
|
||||
This can be contrasted when the callee does not support IPSec. After 100
|
||||
Trying, a UE that does not support IPSec is sent a SIP INVITE in clear text:
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
#### 7. Known issues
|
||||
|
||||
- IPv6 is not supported.
|
||||
- If your cellphone mandates IPsec (such as Xiaomi Mi 9 Pro 5G), it might not work.
|
||||
However, you should at least see SIP REGISTRATION and a couple of 401 Unauthorized.
|
||||
|
||||
If anyone successfully made a VoLTE call by using this repo, please submit an
|
||||
issue and let me know!
|
||||
|
||||
|
||||
#### 8. References
|
||||
|
||||
- [https://github.com/onmyway133/blog/issues/284](https://github.com/onmyway133/blog/issues/284)
|
||||
- [https://realtimecommunication.wordpress.com/2015/05/26/at-your-service/](https://realtimecommunication.wordpress.com/2015/05/26/at-your-service/)
|
||||
- [https://www.sharetechnote.com/html/Handbook_LTE_VoLTE.html](https://www.sharetechnote.com/html/Handbook_LTE_VoLTE.html)
|
||||
@@ -9,7 +9,7 @@ Open5GS is a C-language Open Source implementation of the 3GPP Evolved Packet Co
|
||||
#### Supported Features
|
||||
---
|
||||
|
||||
- LTE release 14 complient
|
||||
- LTE release 14 compliant
|
||||
- AES, Snow3G, ZUC algorithms for encryption
|
||||
- Support of USIM cards using Milenage
|
||||
- Multiple PDN support
|
||||
|
||||
@@ -9,10 +9,16 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
- [Quickstart](guide/01-quickstart)
|
||||
- [Building Open5GS from Sources](guide/02-building-open5gs-from-sources)
|
||||
- [Splitting Network Elements](guide/03-splitting-network-elements)
|
||||
- [Setting up Kamailio IMS](guide/04-setting-up-kamailio-IMS)
|
||||
|
||||
- Tutorials
|
||||
- [Your First LTE](tutorial/01-your-first-lte)
|
||||
- [VoLTE Setup with Kamailio IMS and Open5GS](tutorial/02-VoLTE-setup)
|
||||
- [Dockerized VoLTE Setup](tutorial/03-VoLTE-dockerized)
|
||||
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
|
||||
|
||||
- Troubleshooting
|
||||
- [Simple Issues](troubleshoot/01-simple-issues)
|
||||
- [Now in Github Issues](troubleshoot/02-now-in-github-issues)
|
||||
|
||||
- Platform Specific Notes
|
||||
- [Debian/Ubuntu](platform/01-debian-ubuntu)
|
||||
|
||||
@@ -4,468 +4,18 @@ title: FAQ
|
||||
permalink: /faq/
|
||||
---
|
||||
|
||||
#### Is it possible to setup IP/NAT table along with Docker?
|
||||
#### What are the Open5GS license terms?
|
||||
|
||||
Enable IP Forward.
|
||||
```
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
```
|
||||
Open5GS is licensed under the GNU Affero General Public License (AGPL), Version 3.0.
|
||||
There is no dual-licensing; open5gs is not available under any other license terms.
|
||||
|
||||
The following is the default docker IP/NAT table.
|
||||
#### Are there any companies providing commercial support for Open5GS?
|
||||
|
||||
```
|
||||
$ sudo iptables-save
|
||||
# Generated by iptables-save v1.6.1 on Sat Jun 1 23:43:50 2019
|
||||
*nat
|
||||
:PREROUTING ACCEPT [74:4820]
|
||||
:INPUT ACCEPT [4:208]
|
||||
:OUTPUT ACCEPT [49:3659]
|
||||
:POSTROUTING ACCEPT [49:3659]
|
||||
:DOCKER - [0:0]
|
||||
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
|
||||
-A DOCKER -i docker0 -j RETURN
|
||||
COMMIT
|
||||
# Completed on Sat Jun 1 23:43:50 2019
|
||||
# Generated by iptables-save v1.6.1 on Sat Jun 1 23:43:50 2019
|
||||
*filter
|
||||
:INPUT ACCEPT [651:514108]
|
||||
:FORWARD DROP [70:4612]
|
||||
:OUTPUT ACCEPT [590:63846]
|
||||
:DOCKER - [0:0]
|
||||
:DOCKER-ISOLATION-STAGE-1 - [0:0]
|
||||
:DOCKER-ISOLATION-STAGE-2 - [0:0]
|
||||
:DOCKER-USER - [0:0]
|
||||
-A FORWARD -j DOCKER-USER
|
||||
-A FORWARD -j DOCKER-ISOLATION-STAGE-1
|
||||
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
-A FORWARD -o docker0 -j DOCKER
|
||||
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
|
||||
-A FORWARD -i docker0 -o docker0 -j ACCEPT
|
||||
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
|
||||
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
|
||||
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
|
||||
-A DOCKER-ISOLATION-STAGE-2 -j RETURN
|
||||
-A DOCKER-USER -j RETURN
|
||||
COMMIT
|
||||
# Completed on Sat Jun 1 23:43:50 2019
|
||||
```
|
||||
[sysmocom](https://sysmocom.de/) is providing commercial services around Open5GS,
|
||||
including support, development, consulting, training and system integration.
|
||||
|
||||
Create **newtables** file as below.
|
||||
Please contact [Harald Welte \<sales@sysmocom.de\>](mailto:sales@sysmocom.de) for any related inquiries.
|
||||
|
||||
```diff
|
||||
$ diff -u oldtables newtables
|
||||
--- oldtables 2019-06-01 23:43:50.354974226 +0900
|
||||
+++ newtables 2019-06-01 23:44:16.110931684 +0900
|
||||
@@ -8,6 +8,7 @@
|
||||
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
|
||||
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
|
||||
+-A POSTROUTING -s 45.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
-A DOCKER -i docker0 -j RETURN
|
||||
COMMIT
|
||||
# Completed on Sat Jun 1 23:43:50 2019
|
||||
@@ -26,6 +27,10 @@
|
||||
-A FORWARD -o docker0 -j DOCKER
|
||||
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
|
||||
-A FORWARD -i docker0 -o docker0 -j ACCEPT
|
||||
+-A FORWARD -o ogstun -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
+-A FORWARD -o ogstun -j DOCKER
|
||||
+-A FORWARD -i ogstun ! -o ogstun -j ACCEPT
|
||||
+-A FORWARD -i ogstun -o ogstun -j ACCEPT
|
||||
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
|
||||
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
|
||||
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
|
||||
```
|
||||
#### Are there any success stories about Open5GS deployments?
|
||||
|
||||
And then, apply **newtables** as below.
|
||||
```
|
||||
$ sudo iptables-restore < newtables
|
||||
```
|
||||
|
||||
The above operation is the same as described in the following manuals.
|
||||
```
|
||||
### Check IP Tables
|
||||
$ sudo iptables -L
|
||||
Chain INPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain FORWARD (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain OUTPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
### Check NAT Tables
|
||||
$ sudo iptables -L -t nat
|
||||
Chain PREROUTING (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain INPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain OUTPUT (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
Chain POSTROUTING (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
|
||||
### Enable IPv4 Forwarding
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
|
||||
### Add NAT Rule
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 45.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
#### How to use a different APN for each PGW
|
||||
|
||||
By default, MME selects the PGW as the first PGW node. To use a different APN for each PGW, specify gtpc.apn as the APN name. If the HSS uses WebUI to set the PGW IP for each UE, you can use a specific PGW node for each UE.
|
||||
|
||||
See the following example.
|
||||
|
||||
```
|
||||
### For reference, see `pgw.yaml`
|
||||
#------------------------ MME --------------------------
|
||||
#
|
||||
# o Two PGW are defined. 127.0.0.3:2123 is used.
|
||||
# [fe80::3%lo]:2123 is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%lo
|
||||
#
|
||||
# o One PGW is defined. if prefer_ipv4 is not true,
|
||||
# [fe80::3%lo] is selected.
|
||||
# gtpc:
|
||||
# - addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%lo
|
||||
#
|
||||
# o Two PGW are defined with a different APN.
|
||||
# - Note that if PGW IP for UE is configured in HSS,
|
||||
# the following configurion for this UE is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# apn: internet
|
||||
# - addr: 127.0.0.5
|
||||
# apn: volte
|
||||
#
|
||||
# o If APN is omitted, the default APN uses the first PGW node.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: 127.0.0.5
|
||||
# apn: volte
|
||||
#
|
||||
```
|
||||
|
||||
The IP address of the UE can also use a different UE pool depending on the APN.
|
||||
|
||||
```
|
||||
### For reference, see `pgw.yaml`
|
||||
#
|
||||
# <UE Pool>
|
||||
#
|
||||
# o IPv4 Pool
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# addr: 45.45.0.1/16
|
||||
#
|
||||
# o IPv4/IPv6 Pool
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 45.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
#
|
||||
#
|
||||
# o Specific APN(e.g 'volte') uses 45.46.0.1/16, cafe:2::1/64
|
||||
# All other APNs use 45.45.0.1/16, cafe:1::1/64
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 45.46.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
# $ sudo ip addr add cafe:2::1/64 dev ogstun
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 45.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# - addr: 45.46.0.1/16
|
||||
# apn: volte
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
#
|
||||
# o Multiple Devices (default: ogstun)
|
||||
# $ sudo ip addr add 45.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun2
|
||||
# $ sudo ip addr add 45.46.0.1/16 dev ogstun3
|
||||
# $ sudo ip addr add cafe:2::1/64 dev ogstun3
|
||||
#
|
||||
# ue_pool:
|
||||
# - addr: 45.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# dev: ogstun2
|
||||
# - addr: 45.46.0.1/16
|
||||
# apn: volte
|
||||
# dev: ogstun3
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
# dev: ogstun3
|
||||
#
|
||||
```
|
||||
|
||||
#### How to connect MongoDB server
|
||||
|
||||
If you do not start MongoDB, you will get the following error:
|
||||
|
||||
```bash
|
||||
$ ./install/bin/open5gs-hssd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
10/27 16:45:00.371: [app] INFO: Configuration: '/Users/acetcom/Documents/git/open5gs/install/etc/open5gs/hss.yaml' (../src/main.c:54)
|
||||
10/27 16:45:00.372: [app] INFO: File Logging: '/Users/acetcom/Documents/git/open5gs/install/var/log/open5gs/hss.log' (../src/main.c:57)
|
||||
10/27 16:45:00.377: [dbi] ERROR: Failed to connect to server [mongodb://localhost/open5gs] (../lib/dbi/ogs-mongoc.c:91)
|
||||
10/27 16:45:00.377: [app] ERROR: Failed to intialize HSS (../src/hss/app-init.c:28)
|
||||
```
|
||||
|
||||
You can start MongoDB using systemctl.
|
||||
```bash
|
||||
$ sudo systemctl start mongodb
|
||||
```
|
||||
|
||||
#### Failing to run `./open5gs-mmed`
|
||||
|
||||
You might be getting the following error after running `./open5gs-mmed`.
|
||||
```bash
|
||||
$ ./build/src/mme/open5gs-mmed
|
||||
10/27 16:45:41.912: [app] FATAL: cannot open file `/Users/acetcom/Documents/git/open5gs/install/etc/open5gs/mme.yaml` (../lib/app/ogs-config.c:67)
|
||||
10/27 16:45:41.912: [app] FATAL: Open5GS initialization failed. Aborted (../src/main.c:211)
|
||||
```
|
||||
|
||||
You should perform **the installation process**.
|
||||
|
||||
```bash
|
||||
$ make install
|
||||
```
|
||||
|
||||
#### I have some error when running `./build/test/simple/simple`
|
||||
|
||||
Did you see the following error after executing `./build/test/simple/simple`?
|
||||
```bash
|
||||
$ ./build/test/simple/simple
|
||||
s1setup_test : SUCCESS
|
||||
attach_test : -Line 134: Condition is false, but expected true
|
||||
\04/09 15:49:09.285: [esm] FATAL: esm_handle_pdn_connectivity_request: Assertion `SECURITY_CONTEXT_IS_VALID(mme_ue)' failed. (esm_handler.c:29)
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/lib/ogslib/src/core/.libs/libogscore-1.0.so.0(ogs_abort+0x2b)[0x7f608518271b]
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/test/.libs/testcomplex(+0x92121)[0x55dc9e274121]
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/test/.libs/testcomplex(+0x4f5b9)[0x55dc9e2315b9]
|
||||
```
|
||||
|
||||
|
||||
Remove all subscriber information using MongoDB Client
|
||||
```
|
||||
$ mongo
|
||||
> db.subscribers.find() ### Check the test subscriber
|
||||
> db.subscribers.drop() ### Remove all subscriber
|
||||
> db.subscribers.find() ### Check that all subscribers are empty
|
||||
```
|
||||
|
||||
Kill all processes.
|
||||
```bash
|
||||
$ ps -ef | grep simple
|
||||
$ ps -ef | grep open5gs
|
||||
$ sudo pkill -9 simple
|
||||
$ sudo pkill -9 open5gs-mmed ...
|
||||
```
|
||||
|
||||
Execute `./build/test/simple/simple`
|
||||
```bash
|
||||
$ ./build/test/simple/simple
|
||||
```
|
||||
|
||||
#### My eNB does not support IPv6.
|
||||
|
||||
Your eNodeB don't have to support IPv6.
|
||||
|
||||
If the sgw.gtpu configuration does not have an IPv6 address, the eNodeB can use IPv4 to connect to the MME and SGW. If the sgw.gtpu setting has an IPv6 address, you can disable the IPv6 address as shown below.
|
||||
|
||||
```yaml
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
```
|
||||
|
||||
**Note:** This parameter `no_ipv6` is only applied to EPC Elements such as MME, SGW, and so on. The parameter `no_ipv6` does not affect to UE. So, IPv6-enabled UE can connect to Open5GS LTE network.
|
||||
{: .notice--warning}
|
||||
|
||||
#### Unable to add new user by WebUI
|
||||
|
||||
It might be a CSRF token mismatch error.
|
||||
Please, delete corresponding cookies, cache, session data etc.
|
||||
|
||||
#### Change Domain from localdomain to anything else
|
||||
|
||||
You should configure the domain name on your computer. Otherwise, freeDiameter raise an error.
|
||||
|
||||
#### How many of UEs can Open5GS support?
|
||||
|
||||
See the [lib/core/ogs-3gpp-types.h](https://github.com/{{ site.github_username }}/open5gs/blob/master/lib/core/ogs-3gpp-types.h).
|
||||
|
||||
```
|
||||
#define MAX_NUM_OF_ENB 128
|
||||
#define MAX_NUM_OF_UE 128
|
||||
#define MAX_NUM_OF_SESS 4
|
||||
#define MAX_NUM_OF_BEARER 4
|
||||
#define MAX_NUM_OF_TUNNEL 3 /* Num of Tunnel per Bearer */
|
||||
#define MAX_NUM_OF_PF 16 /* Num of Packet Filter per Bearer */
|
||||
|
||||
#define MAX_POOL_OF_UE (MAX_NUM_OF_ENB * MAX_NUM_OF_UE)
|
||||
#define MAX_POOL_OF_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)
|
||||
#define MAX_POOL_OF_BEARER (MAX_POOL_OF_SESS * MAX_NUM_OF_BEARER)
|
||||
#define MAX_POOL_OF_TUNNEL (MAX_POOL_OF_BEARER * MAX_NUM_OF_TUNNEL)
|
||||
#define MAX_POOL_OF_PF (MAX_POOL_OF_BEARER * MAX_NUM_OF_PF)
|
||||
#define MAX_POOL_OF_DIAMETER_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)
|
||||
```
|
||||
|
||||
Currently, the number of UE is limited to `128*128`.
|
||||
|
||||
#### What is the Default Configuration?
|
||||
|
||||
- Network
|
||||
|
||||
```
|
||||
* MME
|
||||
S1AP: listen on all address avaiable in system
|
||||
GTP-C: listen on the first IP address in system
|
||||
DIAMETER: 127.0.0.2 (No TLS)
|
||||
|
||||
* SGW
|
||||
GTP-C: 127.0.0.2
|
||||
GTP-U: listen on the first IP address in system
|
||||
|
||||
* PGW
|
||||
GTP-C: Both 127.0.0.3 and [::1]
|
||||
GTP-U: Both 127.0.0.3 and [::1]
|
||||
DIAMETER: 127.0.0.3 (No TLS)
|
||||
|
||||
* HSS
|
||||
DIAMETER: 127.0.0.4 (No TLS)
|
||||
|
||||
* PCRF
|
||||
DIAMETER: 127.0.0.5 (No TLS)
|
||||
```
|
||||
|
||||
- GUMMEI, PLMN and TAC
|
||||
|
||||
```
|
||||
* GUMMEI
|
||||
PLMN ID - MNC: 001, MCC: 01
|
||||
MME Group : 2
|
||||
MME Code : 1
|
||||
|
||||
* TAI
|
||||
PLMN ID - MNC: 001, MCC: 01
|
||||
TAC : 12345
|
||||
```
|
||||
|
||||
- Security
|
||||
|
||||
```
|
||||
* Integrity : EIA1 - Snow 3G
|
||||
* Ciphering : EEA0 - Nothing
|
||||
```
|
||||
|
||||
- UE Network
|
||||
|
||||
```
|
||||
* IPv4 : 45.45.0.1/16
|
||||
* IPv6 : cafe::1/64
|
||||
```
|
||||
|
||||
- DNS
|
||||
|
||||
```
|
||||
* IPv4
|
||||
Primary : 8.8.8.8
|
||||
Secondary : 8.8.4.4
|
||||
|
||||
* IPv6
|
||||
Primary : 2001:4860:4860::8888
|
||||
Secondary : 2001:4860:4860::8844
|
||||
```
|
||||
|
||||
#### The parsing errors are caused by tab spaces in the configuration files.
|
||||
|
||||
YAML forbids tabs. You should use space instead of tab in Open5GS configuration file.
|
||||
|
||||
```markdown
|
||||
YAML FAQ: Why does YAML forbid tabs?
|
||||
|
||||
Tabs have been outlawed since they are treated differently by different editors and tools. And since indentation is so critical to proper interpretation of YAML, this issue is just too tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs in Python source is a headache for many people and that were he to design Python again, he would forbid them.
|
||||
```
|
||||
|
||||
#### Cross compilation setup
|
||||
|
||||
By default, Open5GS is designed to support the Embedding System. To do so, we introduced pool-based memory management. Unfortunately, we have not tested Open5GS in an embedded environment. I tried to compile on the ARM architecture using Docker and run it with QEMU for your reference.
|
||||
|
||||
- We'll use Debian Docker Environment.
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/acetcom/open5gs
|
||||
$ cd open5gs/docker
|
||||
$ DIST=debian docker-compose run dev
|
||||
```
|
||||
|
||||
- In Docker Container
|
||||
|
||||
```bash
|
||||
$ sudo dpkg --add-architecture armel
|
||||
$ sudo apt update
|
||||
$ sudo apt install libsctp-dev:armel libyaml-dev:armel libgnutls28-dev:armel libgcrypt-dev:armel libidn11-dev:armel libssl-dev:armel libmongoc-dev:armel libbson-dev:armel
|
||||
$ sudo apt install crossbuild-essential-armel
|
||||
$ sudo apt install qemu
|
||||
$ git clone https://github.com/acetcom/open5gs
|
||||
$ cd open5gs/
|
||||
|
||||
$ cat << EOF > cross_file.txt
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
||||
|
||||
[binaries]
|
||||
c = '/usr/bin/arm-linux-gnueabi-gcc'
|
||||
ar = '/usr/bin/arm-linux-gnueabi-ar'
|
||||
strip = '/usr/bin/arm-linux-gnueabi-strip'
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'
|
||||
exe_wrapper = 'qemu'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
EOF
|
||||
|
||||
$ meson build --prefix=`pwd`/install --cross-file cross_file.txt
|
||||
$ ninja -C build
|
||||
$ ./install/bin/open5gs-sgwd
|
||||
./install/bin/open5gs-sgwd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
10/27 08:37:33.158: [app] INFO: Configuration: '/home/acetcom/git/open5gs/install/etc/open5gs/sgw.yaml' (../src/main.c:54)
|
||||
10/27 08:37:33.166: [app] INFO: File Logging: '/home/acetcom/git/open5gs/install/var/log/open5gs/sgw.log' (../src/main.c:57)
|
||||
Unknown QEMU_IFLA_INFO_KIND ipip
|
||||
Unknown QEMU_IFLA_INFO_KIND ip6tnl
|
||||
10/27 08:37:33.225: [app] INFO: SGW initialize...done (../src/sgw/app-init.c:31)
|
||||
10/27 08:37:33.263: [gtp] INFO: gtp_server() [127.0.0.2]:2123 (../lib/gtp/path.c:32)
|
||||
10/27 08:37:33.265: [gtp] INFO: gtp_server() [172.20.0.4]:2152 (../lib/gtp/path.c:32)
|
||||
|
||||
./install/bin/open5gs-hssd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
10/27 08:37:45.754: [app] INFO: Configuration: '/home/acetcom/git/open5gs/install/etc/open5gs/hss.yaml' (../src/main.c:54)
|
||||
10/27 08:37:45.762: [app] INFO: File Logging: '/home/acetcom/git/open5gs/install/var/log/open5gs/hss.log' (../src/main.c:57)
|
||||
10/27 08:37:45.868: [dbi] INFO: MongoDB URI: 'mongodb://mongodb/open5gs' (../lib/dbi/ogs-mongoc.c:99)
|
||||
^Cgetsockopt level=132 optname=0 not yet supported
|
||||
```
|
||||
|
||||
The SCTP module is not included in the QEMU kernel. I believe that if the Linux kernel installed on your target platform contains an SCTP module, it will work normally.
|
||||
{: .notice--warning}
|
||||
See [https://github.com/open5gs/open5gs/issues/360](https://github.com/open5gs/open5gs/issues/360)
|
||||
|
||||
46
docs/_posts/2019-12-06-release-v1.1.0.md
Normal file
46
docs/_posts/2019-12-06-release-v1.1.0.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: "v1.1.0 - Stabilize Open5GS Packages"
|
||||
date: 2019-12-06 20:16:00 +0900
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### New Feature
|
||||
- Support for Static IP address ([#306](https://github.com/open5gs/open5gs/pull/306)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
|
||||
#### Enhancement
|
||||
- Upgrade `freeDiameter` to version 1.3.2
|
||||
- Build with `usrsctp` using MESON subproject
|
||||
- Changes default prefix ([#307](https://github.com/open5gs/open5gs/pull/307)) -- [aleksander0m](https://github.com/aleksander0m)
|
||||
- ogs_assert() to ogs_expect() ([#314](https://github.com/open5gs/open5gs/pull/314)) -- [laf0rge](https://github.com/laf0rge), [spencersevilla](https://github.com/spencersevilla)
|
||||
|
||||
#### Specification Issues
|
||||
- Include PGW-C/U F-TEID on SGW S11 Create Session Response ([#300](https://github.com/open5gs/open5gs/issues/300)) -- [gusbourg](https://github.com/gusbourg)
|
||||
- Include Bearer Context IE(with Cause) on SGW S11 Modify Bearer Response ([#301](https://github.com/open5gs/open5gs/issues/301)) -- [gusbourg](https://github.com/gusbourg)
|
||||
- Include IMEISV Request on Security-mode command
|
||||
|
||||
#### Bug fixes
|
||||
- Remove NAS timer related S1AP message ([#256](https://github.com/open5gs/open5gs/issues/256)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- Fix the MME crashes on receiving unknown TEID ([#258](https://github.com/open5gs/open5gs/issues/258)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- Map S6A diameter codes to EMM codes ([#263](https://github.com/open5gs/open5gs/issues/263)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- Fix the WebUI installation script ([#299](https://github.com/open5gs/open5gs/issues/299))
|
||||
- Add SGsAP-SERVICE-REQUEST in MT-SMS-ACTIVE ([#312](https://github.com/open5gs/open5gs/issues/312)) -- [EugeneBogush](https://github.com/EugeneBogush)
|
||||
|
||||
#### Rollback
|
||||
- MME uses single UE context to handle two attach procedure for the same UE([#203](https://github.com/open5gs/open5gs/issues/203)) -- [lezixiao](https://github.com/lezixiao)
|
||||
|
||||
#### Document
|
||||
- Add Additional troubleshooting document ([#309](https://github.com/open5gs/open5gs/pull/309)) -- [sudheesh001](https://github.com/sudheesh001), [nickvsnetworking](https://github.com/nickvsnetworking)
|
||||
|
||||
#### Miscellaneous
|
||||
- Add statistics for UE/eNB/Sessions ([#303](https://github.com/open5gs/open5gs/pull/303)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
- MongoDB CLI tool ([#305](https://github.com/open5gs/open5gs/pull/305)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
- An easy install script for MacOSX build [sudheesh001](https://github.com/sudheesh001)
|
||||
|
||||
|
||||
Download -- [v1.1.0.tar.gz](https://github.com/open5gs/open5gs/archive/v1.1.0.tar.gz)
|
||||
{: .notice--info}
|
||||
42
docs/_posts/2020-01-12-release-v1.2.0.md
Normal file
42
docs/_posts/2020-01-12-release-v1.2.0.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "v1.2.0 - VoLTE Now Works"
|
||||
date: 2020-01-12 23:13:00 +0900
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Document
|
||||
- VoLTE setup guide with Kamailio IMS ([#333](https://github.com/open5gs/open5gs/pull/333)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Changes Mac OSX build guide as below: ([Commit 8749c2d](https://github.com/open5gs/open5gs/commit/8749c2d666b9e2c3f0be44597001030204092c6c))
|
||||
```
|
||||
$ meson build --prefix=`pwd`/install -D c_std=c99
|
||||
```
|
||||
|
||||
#### OpenSUSE Installation in MESON Build
|
||||
[Martin Hauke](https://build.opensuse.org/user/show/mnhauke) packaged Open5GS for *openSUSE* on [OBS](https://build.opensuse.org/package/show/home:mnhauke:open5gs/open5gs).
|
||||
```bash
|
||||
$ sudo zypper addrepo -f obs://home:mnhauke:open5gs home:mnhauke:open5gs
|
||||
$ sudo zypper install mongodb-server mongodb-shell
|
||||
$ sudo zypper install open5gs
|
||||
```
|
||||
|
||||
#### New Feature
|
||||
- Handling Bearer Resource Modification ([#336](https://github.com/open5gs/open5gs/issues/336)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
#### Enhancement
|
||||
- The WebUI supports the option to select PDN Type(IPv4/IPv6/IPv4v6) ([#346](https://github.com/open5gs/open5gs/pull/346)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
- enb_use_add() assigns enb_ue_s1ap_id ([#326](https://github.com/open5gs/open5gs/pull/326)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
- Change ogs_assert() to ogs_expect() ([#323](https://github.com/open5gs/open5gs/pull/323)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
|
||||
#### Bug fixes
|
||||
- Fix PGW crashes upon receiving STR from P-CSCF ([#342](https://github.com/open5gs/open5gs/issues/342)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Fix conversion flow rule from `RX(permit in)` to `GX(permit out)` ([#338](https://github.com/open5gs/open5gs/issues/338)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Fix the bug the GTP transaction during 'Request Duplicated ([Commit e35bc4c](https://github.com/open5gs/open5gs/commit/e35bc4cc0d87811205af561daffdbd2788874787))
|
||||
|
||||
|
||||
Download -- [v1.2.0.tar.gz](https://github.com/open5gs/open5gs/archive/v1.2.0.tar.gz)
|
||||
{: .notice--info}
|
||||
28
docs/_posts/2020-02-07-release-v1.2.1.md
Normal file
28
docs/_posts/2020-02-07-release-v1.2.1.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: "v1.2.1 - Improve GTP-U Performance for many UEs"
|
||||
date: 2020-02-07 15:05:00 +0900
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Enhancement
|
||||
- Improve GTP-U Performance for many UEs
|
||||
- Add other TFT codes to support Video call ([#358](https://github.com/open5gs/open5gs/issues/358)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
#### Debian(Buster) Installation
|
||||
Debian Buster has renamed MongoDB package from 'mongodb' to 'mongodb-org'. Therefore, Open5GS package installations including WebUI do not work properly. Now, the relevant patch has been applied to this version.
|
||||
{: .notice--warning}
|
||||
|
||||
#### Document
|
||||
- More VoLTE calling changes ([#354](https://github.com/open5gs/open5gs/pull/354)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
#### Bug fixes
|
||||
- Fix PTI mismatch ([#355](https://github.com/open5gs/open5gs/issues/355)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Send PDN error cause if needed ([#352](https://github.com/open5gs/open5gs/issues/352)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
|
||||
Download -- [v1.2.1.tar.gz](https://github.com/open5gs/open5gs/archive/v1.2.1.tar.gz)
|
||||
{: .notice--info}
|
||||
108
docs/_posts/2020-03-25-release-v1.2.2.md
Normal file
108
docs/_posts/2020-03-25-release-v1.2.2.md
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
title: "v1.2.2 - Created by Working Together"
|
||||
date: 2020-03-25 15:05:00 -0600
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Document
|
||||
- Kubernetes Open5GS Development ([#375](https://github.com/open5gs/open5gs/issus/375)) -- [infinitydon](https://github.com/infinitydon)
|
||||
|
||||
#### UE address subnet
|
||||
- Change default UE address subnet from 45.45.0.1/16 to 10.45.0.1/16 ([#369](https://github.com/open5gs/open5gs/pull/369)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
|
||||
#### New Features
|
||||
|
||||
###### Provide SGW GTP(S1) address to be advertised inside S1AP messages ([#367](https://github.com/open5gs/open5gs/pull/367)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
This feature is useful in scenarios where SGW is run inside a container or openstack vm i.e. behind 1-to-1 mapping NAT. In docker/openstack environment, we often have 1-to-1 mapped NAT IP address in order for eNB to reach SGW. But, this 1-to-1 mapping NAT IP address is not seen on SGW host and hence non UDP socket bindable. Since SGW can only bind to IP address visible in it's host (usually a private IP beind a NAT), it advertises the same to UE in S1AP message resulting in eNB not able to reach SGW on Uplink. This commit solves this issue by providing a means to advertise a different IP address than the one SGW UDP socket is bound to.
|
||||
|
||||
Example of sgw.yaml to use this feature:
|
||||
|
||||
```
|
||||
logger:
|
||||
file: /var/log/open5gs/sgw.log
|
||||
level: debug
|
||||
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
|
||||
sgw:
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gtpu:
|
||||
dev: ens3
|
||||
advertise_addr:
|
||||
- 172.24.15.30
|
||||
- fe80::f816:3eff:fe15:fe34
|
||||
|
||||
OR
|
||||
|
||||
gtpu:
|
||||
addr: 10.4.128.21
|
||||
advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
|
||||
OR
|
||||
|
||||
gtpu:
|
||||
dev: ens3
|
||||
advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
```
|
||||
|
||||
###### Provide MTU size to be advertised in PCO options ([#376](https://github.com/open5gs/open5gs/pull/376)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
This feature can be used for provisioning a limit on the size of the packets
|
||||
sent by the MS to avoid packet fragmentation in the backbone network between
|
||||
the MS and the GGSN/PGW and/or across the (S)Gi reference point) when some
|
||||
of the backbone links does not support packets larger then 1500 octets
|
||||
(ETSI TS 123 060 V15.5.0 Annex C)
|
||||
|
||||
Example of pgw.yaml to use this feature:
|
||||
|
||||
```
|
||||
logger:
|
||||
file: /var/log/open5gs/pgw.log
|
||||
|
||||
parameter:
|
||||
|
||||
pgw:
|
||||
freeDiameter: /etc/open5gs/freeDiameter/pgw.conf
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
```
|
||||
|
||||
|
||||
#### Enhancement
|
||||
- Add GTPv2 Echo Request/Response message ([#378](https://github.com/open5gs/open5gs/issues/378)) -- [BGOtura](https://github.com/BGOtura)
|
||||
- Add 'open5gs-dbctl' script in debain package ([#388](https://github.com/open5gs/open5gs/pull/388)) -- [spencersevilla](https://github.com/spencersevilla)
|
||||
- Add editing subscribers with PythonAPI interface -- [nickvsnetworking](https://github.com/nickvsnetworking)
|
||||
|
||||
|
||||
#### Bug Fixed
|
||||
- Check Session-Context before Sending InitialContextSetupRequest ([#384](https://github.com/open5gs/open5gs/issues/384)) -- [EugeneBogush](https://github.com/EugeneBogush)
|
||||
- Fix for the systemd reload ([#393](https://github.com/open5gs/open5gs/pull/393)) -- [EugeneBogush](https://github.com/EugeneBogush)
|
||||
- Fix the systemd unit file for Debian ([#377](https://github.com/open5gs/open5gs/pull/377)) -- [rafael2k](https://github.com/rafael2k)
|
||||
- Add build dependancy to 'git' ([#373](https://github.com/open5gs/open5gs/pull/373)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- Add PGW dependancy to 'systemd-networkd' -- [spencersevilla](https://github.com/spencersevilla)
|
||||
- Fix the WebUI installation script for Debian
|
||||
|
||||
|
||||
Download -- [v1.2.2.tar.gz](https://github.com/open5gs/open5gs/archive/v1.2.2.tar.gz)
|
||||
{: .notice--info}
|
||||
23
docs/_posts/2020-04-04-release-v1.2.3.md
Normal file
23
docs/_posts/2020-04-04-release-v1.2.3.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: "v1.2.3 - Hotfix for MTU Handling"
|
||||
date: 2020-04-04 06:13:00 -0600
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Bug Fixed
|
||||
- PGW GTP fragmentation ([#398](https://github.com/open5gs/open5gs/issues/398)) -- [kbarlee](https://github.com/kbarlee)
|
||||
|
||||
#### Document
|
||||
- Various Document Improving(BuildingSource & FAQ) ([#396](https://github.com/open5gs/open5gs/pull/396)) -- [laf0rge](https://github.com/laf0rge)
|
||||
|
||||
#### Adding Sanity Check
|
||||
- Check if Length of Authentication response parameter is Zero
|
||||
|
||||
|
||||
Download -- [v1.2.3.tar.gz](https://github.com/open5gs/open5gs/archive/v1.2.3.tar.gz)
|
||||
{: .notice--info}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
BIN
docs/assets/pcapng/ipsec_reg.pcapng
Normal file
BIN
docs/assets/pcapng/ipsec_reg.pcapng
Normal file
Binary file not shown.
BIN
docs/assets/pcapng/ipsec_to_ipsec_call.pcapng
Normal file
BIN
docs/assets/pcapng/ipsec_to_ipsec_call.pcapng
Normal file
Binary file not shown.
BIN
docs/assets/pcapng/ipsec_to_nonipsec_call.pcapng
Normal file
BIN
docs/assets/pcapng/ipsec_to_nonipsec_call.pcapng
Normal file
Binary file not shown.
BIN
docs/assets/pcapng/nonipsec_reg.pcapng
Normal file
BIN
docs/assets/pcapng/nonipsec_reg.pcapng
Normal file
Binary file not shown.
BIN
docs/assets/pcapng/nonipsec_to_ipsec_call.pcapng
Normal file
BIN
docs/assets/pcapng/nonipsec_to_ipsec_call.pcapng
Normal file
Binary file not shown.
BIN
docs/assets/pcapng/volte.pcapng
Normal file
BIN
docs/assets/pcapng/volte.pcapng
Normal file
Binary file not shown.
@@ -10,7 +10,7 @@
|
||||
#
|
||||
|
||||
PACKAGE="open5gs"
|
||||
VERSION="1.0.0"
|
||||
VERSION="1.2.0"
|
||||
|
||||
print_status() {
|
||||
echo
|
||||
@@ -77,12 +77,12 @@ exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
|
||||
exec_cmd "rm -rf /usr/lib/node_modules/${PACKAGE}"
|
||||
}
|
||||
|
||||
install() {
|
||||
setup() {
|
||||
|
||||
PRE_INSTALL_PKGS=""
|
||||
|
||||
if [ ! -x /usr/bin/mongod ]; then
|
||||
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} mongodb"
|
||||
if [ ! -x /usr/bin/lsb_release ]; then
|
||||
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} lsb-release"
|
||||
fi
|
||||
|
||||
if [ ! -x /usr/bin/node ] && [ ! -x /usr/bin/wget ]; then
|
||||
@@ -93,27 +93,140 @@ if [ ! -x /usr/bin/curl ] && [ ! -x /usr/bin/wget ]; then
|
||||
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} curl"
|
||||
fi
|
||||
|
||||
if [ ! -x /usr/bin/gpg ]; then
|
||||
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} gnupg"
|
||||
fi
|
||||
|
||||
print_status "Populating apt-get cache..."
|
||||
exec_cmd 'apt-get update'
|
||||
|
||||
if [ "X${PRE_INSTALL_PKGS}" != "X" ]; then
|
||||
print_status "Installing packages required for setup:${PRE_INSTALL_PKGS}..."
|
||||
# This next command needs to be redirected to /dev/null or the script will bork
|
||||
# in some environments
|
||||
exec_cmd "apt-get install -y${PRE_INSTALL_PKGS} > /dev/null 2>&1"
|
||||
fi
|
||||
|
||||
uninstall
|
||||
DISTRO=$(lsb_release -c -s)
|
||||
|
||||
check_alt() {
|
||||
if [ "X${DISTRO}" == "X${2}" ]; then
|
||||
echo
|
||||
echo "## You seem to be using ${1} version ${DISTRO}."
|
||||
echo "## This maps to ${3} \"${4}\"... Adjusting for you..."
|
||||
DISTRO="${4}"
|
||||
fi
|
||||
}
|
||||
|
||||
check_alt "SolydXK" "solydxk-9" "Debian" "stretch"
|
||||
check_alt "Kali" "sana" "Debian" "jessie"
|
||||
check_alt "Kali" "kali-rolling" "Debian" "jessie"
|
||||
check_alt "Sparky Linux" "Tyche" "Debian" "stretch"
|
||||
check_alt "Sparky Linux" "Nibiru" "Debian" "buster"
|
||||
check_alt "MX Linux 17" "Horizon" "Debian" "stretch"
|
||||
check_alt "MX Linux 18" "Continuum" "Debian" "stretch"
|
||||
check_alt "MX Linux 19" "patito feo" "Debian" "buster"
|
||||
check_alt "Linux Mint" "maya" "Ubuntu" "precise"
|
||||
check_alt "Linux Mint" "qiana" "Ubuntu" "trusty"
|
||||
check_alt "Linux Mint" "rafaela" "Ubuntu" "trusty"
|
||||
check_alt "Linux Mint" "rebecca" "Ubuntu" "trusty"
|
||||
check_alt "Linux Mint" "rosa" "Ubuntu" "trusty"
|
||||
check_alt "Linux Mint" "sarah" "Ubuntu" "xenial"
|
||||
check_alt "Linux Mint" "serena" "Ubuntu" "xenial"
|
||||
check_alt "Linux Mint" "sonya" "Ubuntu" "xenial"
|
||||
check_alt "Linux Mint" "sylvia" "Ubuntu" "xenial"
|
||||
check_alt "Linux Mint" "tara" "Ubuntu" "bionic"
|
||||
check_alt "Linux Mint" "tessa" "Ubuntu" "bionic"
|
||||
check_alt "Linux Mint" "tina" "Ubuntu" "bionic"
|
||||
check_alt "Linux Mint" "tricia" "Ubuntu" "bionic"
|
||||
check_alt "LMDE" "betsy" "Debian" "jessie"
|
||||
check_alt "LMDE" "cindy" "Debian" "stretch"
|
||||
check_alt "elementaryOS" "luna" "Ubuntu" "precise"
|
||||
check_alt "elementaryOS" "freya" "Ubuntu" "trusty"
|
||||
check_alt "elementaryOS" "loki" "Ubuntu" "xenial"
|
||||
check_alt "elementaryOS" "juno" "Ubuntu" "bionic"
|
||||
check_alt "elementaryOS" "hera" "Ubuntu" "bionic"
|
||||
check_alt "Trisquel" "toutatis" "Ubuntu" "precise"
|
||||
check_alt "Trisquel" "belenos" "Ubuntu" "trusty"
|
||||
check_alt "Trisquel" "flidas" "Ubuntu" "xenial"
|
||||
check_alt "Uruk GNU/Linux" "lugalbanda" "Ubuntu" "xenial"
|
||||
check_alt "BOSS" "anokha" "Debian" "wheezy"
|
||||
check_alt "BOSS" "anoop" "Debian" "jessie"
|
||||
check_alt "BOSS" "drishti" "Debian" "stretch"
|
||||
check_alt "bunsenlabs" "bunsen-hydrogen" "Debian" "jessie"
|
||||
check_alt "bunsenlabs" "helium" "Debian" "stretch"
|
||||
check_alt "Tanglu" "chromodoris" "Debian" "jessie"
|
||||
check_alt "PureOS" "green" "Debian" "sid"
|
||||
check_alt "Devuan" "jessie" "Debian" "jessie"
|
||||
check_alt "Devuan" "ascii" "Debian" "stretch"
|
||||
check_alt "Devuan" "beowulf" "Debian" "buster"
|
||||
check_alt "Devuan" "ceres" "Debian" "sid"
|
||||
check_alt "Deepin" "panda" "Debian" "sid"
|
||||
check_alt "Deepin" "unstable" "Debian" "sid"
|
||||
check_alt "Deepin" "stable" "Debian" "buster"
|
||||
check_alt "Pardus" "onyedi" "Debian" "stretch"
|
||||
check_alt "Liquid Lemur" "lemur-3" "Debian" "stretch"
|
||||
|
||||
if [ "X${DISTRO}" == "Xdebian" ]; then
|
||||
print_status "Unknown Debian-based distribution, checking /etc/debian_version..."
|
||||
NEWDISTRO=$([ -e /etc/debian_version ] && cut -d/ -f1 < /etc/debian_version)
|
||||
if [ "X${NEWDISTRO}" == "X" ]; then
|
||||
print_status "Could not determine distribution from /etc/debian_version..."
|
||||
else
|
||||
DISTRO=$NEWDISTRO
|
||||
print_status "Found \"${DISTRO}\" in /etc/debian_version..."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "X${DISTRO}" == "Xbuster" ]; then
|
||||
if [ -f "/etc/apt/sources.list.d/mongodb-org.list" ]; then
|
||||
print_status 'Removing Launchpad PPA Repository for MongoDB...'
|
||||
exec_cmd "rm -f /etc/apt/sources.list.d/mongodb-org.list"
|
||||
fi
|
||||
|
||||
print_status 'Adding the MongoDB signing key to your keyring...'
|
||||
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
exec_cmd 'curl -s https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -'
|
||||
else
|
||||
exec_cmd 'wget -qO- https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -'
|
||||
fi
|
||||
|
||||
print_status "Creating apt sources list file for the MongoDB repo..."
|
||||
|
||||
exec_cmd "echo 'deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main' > /etc/apt/sources.list.d/mongodb-org.list"
|
||||
|
||||
if [ ! -x /usr/bin/mongod ]; then
|
||||
MONGODB_INSTALL_PKGS="${MONGODB_INSTALL_PKGS} mongodb-org"
|
||||
fi
|
||||
else
|
||||
if [ ! -x /usr/bin/mongod ]; then
|
||||
MONGODB_INSTALL_PKGS="${MONGODB_INSTALL_PKGS} mongodb"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "X${MONGODB_INSTALL_PKGS}" != "X" ]; then
|
||||
print_status "Populating apt-get cache..."
|
||||
exec_cmd 'apt-get update'
|
||||
|
||||
print_status "Installing packages required for setup:${MONGODB_INSTALL_PKGS}..."
|
||||
exec_cmd "apt-get install -y${MONGODB_INSTALL_PKGS} > /dev/null 2>&1"
|
||||
fi
|
||||
}
|
||||
|
||||
install() {
|
||||
print_status "Download the Open5GS Source Code (v${VERSION})..."
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
exec_cmd "curl -sLf 'https://github.com/acetcom/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
exec_cmd "curl -sLf 'https://github.com/open5gs/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
RC=$?
|
||||
else
|
||||
exec_cmd "wget -qO- /dev/null 'https://github.com/acetcom/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
exec_cmd "wget -qO- /dev/null 'https://github.com/open5gs/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
RC=$?
|
||||
fi
|
||||
|
||||
if [[ $RC != 0 ]]; then
|
||||
print_status "Failed to download: https://github.com/open5gs/${PACKAGE}/archive/v${VERSION}.tar.gz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_status "Build the Open5GS WebUI..."
|
||||
exec_cmd "cd ./${PACKAGE}-${VERSION}/webui && npm install && npm run build"
|
||||
|
||||
@@ -148,4 +261,5 @@ exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
|
||||
}
|
||||
|
||||
## Defer setup until we have the complete script
|
||||
setup
|
||||
install
|
||||
|
||||
@@ -248,6 +248,7 @@ libcore_sources = files('''
|
||||
ogs-poll.h
|
||||
ogs-notify.h
|
||||
ogs-tlv.h
|
||||
ogs-tlv-msg.h
|
||||
ogs-env.h
|
||||
ogs-fsm.h
|
||||
ogs-hash.h
|
||||
@@ -281,6 +282,7 @@ libcore_sources = files('''
|
||||
ogs-poll.c
|
||||
ogs-notify.c
|
||||
ogs-tlv.c
|
||||
ogs-tlv-msg.c
|
||||
ogs-env.c
|
||||
ogs-fsm.c
|
||||
ogs-hash.c
|
||||
|
||||
@@ -40,6 +40,10 @@ extern "C" {
|
||||
#define OGS_MAX_IMSI_LEN \
|
||||
OGS_BCD_TO_BUFFER_LEN(OGS_MAX_IMSI_BCD_LEN)
|
||||
|
||||
#define OGS_MAX_IMEISV_BCD_LEN 16
|
||||
#define OGS_MAX_IMEISV_LEN \
|
||||
OGS_BCD_TO_BUFFER_LEN(OGS_MAX_IMEISV_BCD_LEN)
|
||||
|
||||
#define OGS_MAX_NUM_OF_HOSTNAME 16
|
||||
#define OGS_MAX_APN_LEN 100
|
||||
#define OGS_MAX_PCO_LEN 251
|
||||
@@ -54,6 +58,8 @@ extern "C" {
|
||||
#define OGS_TIME_TO_BCD(x) \
|
||||
(((((x) % 10) << 4) & 0xf0) | (((x) / 10) & 0x0f))
|
||||
|
||||
#define OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED 0
|
||||
|
||||
/**********************************
|
||||
* PLMN_ID Structure */
|
||||
typedef struct ogs_plmn_id_s {
|
||||
@@ -255,10 +261,10 @@ typedef struct ogs_pcc_rule_s {
|
||||
typedef struct ogs_pdn_s {
|
||||
uint32_t context_identifier;
|
||||
char apn[OGS_MAX_APN_LEN+1];
|
||||
#define OGS_HSS_PDN_TYPE_IPV4 0
|
||||
#define OGS_HSS_PDN_TYPE_IPV6 1
|
||||
#define OGS_HSS_PDN_TYPE_IPV4V6 2
|
||||
#define OGS_HSS_PDN_TYPE_IPV4_OR_IPV6 3
|
||||
#define OGS_DIAM_PDN_TYPE_IPV4 0
|
||||
#define OGS_DIAM_PDN_TYPE_IPV6 1
|
||||
#define OGS_DIAM_PDN_TYPE_IPV4V6 2
|
||||
#define OGS_DIAM_PDN_TYPE_IPV4_OR_IPV6 3
|
||||
int pdn_type;
|
||||
|
||||
ogs_qos_t qos;
|
||||
@@ -283,10 +289,12 @@ int ogs_fqdn_parse(char *dst, char *src, int len);
|
||||
#define OGS_PCO_ID_CHALLENGE_HANDSHAKE_AUTHENTICATION_PROTOCOL 0xc223
|
||||
#define OGS_PCO_ID_P_CSCF_IPV6_ADDRESS_REQUEST 0x0001
|
||||
#define OGS_PCO_ID_DNS_SERVER_IPV6_ADDRESS_REQUEST 0x0003
|
||||
#define OGS_PCO_ID_MS_SUPPORTS_BCM 0x0005
|
||||
#define OGS_PCO_ID_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING 0x000a
|
||||
#define OGS_PCO_ID_P_CSCF_IPV4_ADDRESS_REQUEST 0x000c
|
||||
#define OGS_PCO_ID_DNS_SERVER_IPV4_ADDRESS_REQUEST 0x000d
|
||||
#define OGS_PCO_ID_IPV4_LINK_MTU_REQUEST 0x0010
|
||||
#define OGS_PCO_ID_MS_SUPPORT_LOCAL_ADDR_TFT_INDICATOR 0x0011
|
||||
typedef struct ogs_pco_ipcp_options_s {
|
||||
uint8_t type;
|
||||
uint8_t len;
|
||||
|
||||
@@ -30,18 +30,13 @@ void *ogs_ascii_to_hex(char *in, int in_len, void *out, int out_len)
|
||||
int i = 0, j = 0, k = 0, hex;
|
||||
uint8_t *out_p = out;
|
||||
|
||||
while(i < in_len && j < out_len)
|
||||
{
|
||||
if (!isspace(in[i]))
|
||||
{
|
||||
while(i < in_len && j < out_len) {
|
||||
if (!isspace(in[i])) {
|
||||
hex = isdigit(in[i]) ? in[i] - '0' :
|
||||
islower(in[i]) ? in[i] - 'a' + 10 : in[i] - 'A' + 10;
|
||||
if ((k & 0x1) == 0)
|
||||
{
|
||||
if ((k & 0x1) == 0) {
|
||||
out_p[j] = (hex << 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
out_p[j] |= hex;
|
||||
j++;
|
||||
}
|
||||
@@ -62,8 +57,7 @@ void *ogs_hex_to_ascii(void *in, int in_len, void *out, int out_len)
|
||||
p[0] = 0;
|
||||
|
||||
l = (in_len - off) > out_len ? out_len : in_len - off;
|
||||
for (i = 0; i < l; i++)
|
||||
{
|
||||
for (i = 0; i < l; i++) {
|
||||
p += sprintf(p, "%02X", ((char*)in)[off+i] & 0xff);
|
||||
if ((i & 0x3) == 3 && (i != (l-1))) p += sprintf(p, " ");
|
||||
}
|
||||
@@ -87,8 +81,7 @@ uint64_t ogs_buffer_to_uint64(void *buffer, int size)
|
||||
uint8_t *buffer_p = buffer;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
for (i = 0; i < size; i++) {
|
||||
num |= (((uint64_t)buffer_p[i]) << ((size-1-i) * 8));
|
||||
}
|
||||
|
||||
@@ -101,8 +94,7 @@ void *ogs_bcd_to_buffer(const char *in, void *out, int *out_len)
|
||||
uint8_t *out_p = out;
|
||||
int in_len = strlen(in);
|
||||
|
||||
for (i = 0; i < in_len; i++)
|
||||
{
|
||||
for (i = 0; i < in_len; i++) {
|
||||
if (i & 0x01)
|
||||
out_p[i>>1] = out_p[i>>1] | (((in[i] - 0x30) << 4) & 0xF0);
|
||||
else
|
||||
@@ -110,8 +102,7 @@ void *ogs_bcd_to_buffer(const char *in, void *out, int *out_len)
|
||||
}
|
||||
|
||||
*out_len = (in_len + 1) / 2;
|
||||
if (in_len & 0x01)
|
||||
{
|
||||
if (in_len & 0x01) {
|
||||
out_p[(*out_len)-1] |= 0xF0;
|
||||
}
|
||||
|
||||
@@ -123,19 +114,15 @@ void *ogs_buffer_to_bcd(uint8_t *in, int in_len, void *out)
|
||||
int i = 0;
|
||||
uint8_t *out_p = out;
|
||||
|
||||
for (i = 0; i < in_len-1; i++)
|
||||
{
|
||||
for (i = 0; i < in_len-1; i++) {
|
||||
out_p[i*2] = 0x30 + (in[i] & 0x0F);
|
||||
out_p[i*2+1] = 0x30 + ((in[i] & 0xF0) >> 4);
|
||||
}
|
||||
|
||||
if ((in[i] & 0xF0) == 0xF0)
|
||||
{
|
||||
if ((in[i] & 0xF0) == 0xF0) {
|
||||
out_p[i*2] = 0x30 + (in[i] & 0x0F);
|
||||
out_p[i*2+1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
out_p[i*2] = 0x30 + (in[i] & 0x0F);
|
||||
out_p[i*2+1] = 0x30 + ((in[i] & 0xF0) >> 4);
|
||||
out_p[i*2+2] = 0;
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "core/ogs-poll.h"
|
||||
#include "core/ogs-notify.h"
|
||||
#include "core/ogs-tlv.h"
|
||||
#include "core/ogs-tlv-msg.h"
|
||||
#include "core/ogs-env.h"
|
||||
#include "core/ogs-fsm.h"
|
||||
#include "core/ogs-hash.h"
|
||||
|
||||
@@ -35,8 +35,7 @@ ogs_pollset_t *ogs_pollset_create(void)
|
||||
|
||||
ogs_pool_init(&pollset->pool, ogs_core()->socket.pool);
|
||||
|
||||
if (ogs_pollset_actions_initialized == false)
|
||||
{
|
||||
if (ogs_pollset_actions_initialized == false) {
|
||||
#if defined(HAVE_KQUEUE)
|
||||
ogs_pollset_actions = ogs_kqueue_actions;;
|
||||
#elif defined(HAVE_EPOLL)
|
||||
|
||||
@@ -66,7 +66,7 @@ typedef unsigned int ogs_index_t;
|
||||
|
||||
#define ogs_pool_index(pool, node) (((node) - (pool)->array)+1)
|
||||
#define ogs_pool_find(pool, _index) \
|
||||
(_index > 0) ? (pool)->index[_index-1] : NULL
|
||||
(_index > 0 && _index <= (pool)->size) ? (pool)->index[_index-1] : NULL
|
||||
|
||||
#define ogs_pool_alloc(pool, node) do { \
|
||||
*(node) = NULL; \
|
||||
|
||||
@@ -155,15 +155,11 @@ int ogs_copyaddrinfo(ogs_sockaddr_t **dst, const ogs_sockaddr_t *src)
|
||||
ogs_sockaddr_t *d;
|
||||
const ogs_sockaddr_t *s;
|
||||
|
||||
for (*dst = d = NULL, s = src; s; s = s->next)
|
||||
{
|
||||
if (!d)
|
||||
{
|
||||
for (*dst = d = NULL, s = src; s; s = s->next) {
|
||||
if (!d) {
|
||||
d = ogs_calloc(1, sizeof *s);
|
||||
*dst = memcpy(d, s, sizeof *s);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
d->next = ogs_calloc(1, sizeof(ogs_sockaddr_t));
|
||||
d = memcpy(d->next, s, sizeof *s);
|
||||
}
|
||||
@@ -355,8 +351,7 @@ bool ogs_sockaddr_is_equal(void *p, void *q)
|
||||
&a->sin6.sin6_addr, &b->sin6.sin6_addr, sizeof(struct in6_addr)) == 0)
|
||||
return true;
|
||||
else {
|
||||
ogs_fatal("Unknown family(%d)", a->ogs_sa_family);
|
||||
ogs_abort();
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -278,6 +278,7 @@ ssize_t ogs_recvfrom(ogs_socket_t fd,
|
||||
ogs_assert(fd != INVALID_SOCKET);
|
||||
ogs_assert(from);
|
||||
|
||||
memset(from, 0, sizeof *from);
|
||||
size = recvfrom(fd, buf, len, flags, &from->sa, &addrlen);
|
||||
if (size < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
|
||||
@@ -51,10 +51,8 @@ void ogs_socknode_free(ogs_socknode_t *node)
|
||||
ogs_assert(node);
|
||||
|
||||
ogs_freeaddrinfo(node->addr);
|
||||
if (node->pollin.poll)
|
||||
ogs_pollset_remove(node->pollin.poll);
|
||||
if (node->pollout.poll)
|
||||
ogs_pollset_remove(node->pollout.poll);
|
||||
if (node->poll)
|
||||
ogs_pollset_remove(node->poll);
|
||||
if (node->sock) {
|
||||
if (node->cleanup)
|
||||
node->cleanup(node->sock);
|
||||
@@ -67,23 +65,18 @@ void ogs_socknode_free(ogs_socknode_t *node)
|
||||
ogs_socknode_t *ogs_socknode_add(
|
||||
ogs_list_t *list, int family, ogs_sockaddr_t *addr)
|
||||
{
|
||||
int rv;
|
||||
ogs_socknode_t *node = NULL;
|
||||
ogs_sockaddr_t *dup = NULL;
|
||||
|
||||
ogs_assert(list);
|
||||
ogs_assert(addr);
|
||||
|
||||
if (family != AF_UNSPEC) {
|
||||
rv = ogs_filteraddrinfo(&addr, family);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
}
|
||||
|
||||
if (addr) {
|
||||
node = ogs_calloc(1, sizeof(ogs_socknode_t));
|
||||
ogs_assert(node);
|
||||
|
||||
node->addr = addr;
|
||||
ogs_copyaddrinfo(&dup, addr);
|
||||
if (family != AF_UNSPEC)
|
||||
ogs_filteraddrinfo(&dup, family);
|
||||
|
||||
if (dup) {
|
||||
node = ogs_socknode_new(dup);
|
||||
ogs_list_add(list, node);
|
||||
}
|
||||
|
||||
@@ -280,45 +273,15 @@ void ogs_socknode_set_cleanup(
|
||||
node->cleanup = cleanup;
|
||||
}
|
||||
|
||||
void ogs_socknode_set_poll(ogs_socknode_t *node,
|
||||
ogs_pollset_t *set, short when, void *handler, void *data)
|
||||
ogs_sock_t *ogs_socknode_sock_first(ogs_list_t *list)
|
||||
{
|
||||
ogs_assert(node);
|
||||
ogs_assert(set);
|
||||
ogs_assert(handler);
|
||||
ogs_socknode_t *snode = NULL;
|
||||
|
||||
if (when == OGS_POLLIN) {
|
||||
node->pollin.set = set;
|
||||
node->pollin.handler = handler;
|
||||
node->pollin.data = data;
|
||||
} else if (when == OGS_POLLOUT) {
|
||||
node->pollout.set = set;
|
||||
node->pollout.handler = handler;
|
||||
node->pollout.data = data;
|
||||
ogs_assert(list);
|
||||
ogs_list_for_each(list, snode) {
|
||||
if (snode->sock)
|
||||
return snode->sock;
|
||||
}
|
||||
}
|
||||
|
||||
void ogs_socknode_install_poll(ogs_socknode_t *node)
|
||||
{
|
||||
ogs_assert(node);
|
||||
|
||||
if (node->pollin.handler) {
|
||||
ogs_assert(node->sock);
|
||||
ogs_assert(node->pollin.set);
|
||||
ogs_assert(node->pollin.handler);
|
||||
|
||||
node->pollin.poll = ogs_pollset_add(node->pollin.set,
|
||||
OGS_POLLIN, node->sock->fd, node->pollin.handler, node->pollin.data);
|
||||
ogs_assert(node->pollin.poll);
|
||||
}
|
||||
if (node->pollout.handler) {
|
||||
ogs_assert(node->sock);
|
||||
ogs_assert(node->pollout.set);
|
||||
ogs_assert(node->pollout.handler);
|
||||
|
||||
node->pollout.poll = ogs_pollset_add(node->pollout.set,
|
||||
OGS_POLLOUT, node->sock->fd, node->pollout.handler, node->pollout.data);
|
||||
ogs_assert(node->pollout.poll);
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -55,13 +55,7 @@ typedef struct ogs_socknode_s {
|
||||
|
||||
ogs_sock_t *sock;
|
||||
void (*cleanup)(ogs_sock_t *sock);
|
||||
|
||||
struct {
|
||||
ogs_pollset_t *set;
|
||||
ogs_poll_t *poll;
|
||||
void *handler;
|
||||
void *data;
|
||||
} pollin, pollout;
|
||||
ogs_poll_t *poll;
|
||||
|
||||
ogs_sockopt_t option;
|
||||
} ogs_socknode_t;
|
||||
@@ -84,9 +78,8 @@ void ogs_socknode_linger(ogs_socknode_t *node, int onoff, int linger);
|
||||
|
||||
void ogs_socknode_set_cleanup(
|
||||
ogs_socknode_t *node, void (*cleanup)(ogs_sock_t *));
|
||||
void ogs_socknode_set_poll(ogs_socknode_t *node,
|
||||
ogs_pollset_t *set, short when, void *handler, void *data);
|
||||
void ogs_socknode_install_poll(ogs_socknode_t *node);
|
||||
|
||||
ogs_sock_t *ogs_socknode_sock_first(ogs_list_t *list);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -63,8 +63,6 @@ ogs_sock_t *ogs_tcp_server(ogs_socknode_t *node)
|
||||
|
||||
node->sock = new;
|
||||
|
||||
ogs_socknode_install_poll(node);
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
@@ -102,7 +100,5 @@ ogs_sock_t *ogs_tcp_client(ogs_socknode_t *node)
|
||||
|
||||
node->sock = new;
|
||||
|
||||
ogs_socknode_install_poll(node);
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ogs-gtp.h"
|
||||
#include "ogs-core.h"
|
||||
|
||||
ogs_tlv_desc_t ogs_tlv_desc_more1 = {
|
||||
OGS_TLV_MORE, "More", 0, 1, 0, 0, { NULL } };
|
||||
@@ -253,13 +253,12 @@ static uint32_t tlv_add_compound(ogs_tlv_t **root, ogs_tlv_t *parent_tlv,
|
||||
return count;
|
||||
}
|
||||
|
||||
int ogs_tlv_build_msg(ogs_pkbuf_t **pkbuf, ogs_tlv_desc_t *desc, void *msg,
|
||||
int mode)
|
||||
ogs_pkbuf_t *ogs_tlv_build_msg(ogs_tlv_desc_t *desc, void *msg, int mode)
|
||||
{
|
||||
ogs_tlv_t *root = NULL;
|
||||
uint32_t r, length, rendlen;
|
||||
ogs_pkbuf_t *pkbuf = NULL;
|
||||
|
||||
ogs_assert(pkbuf);
|
||||
ogs_assert(desc);
|
||||
ogs_assert(msg);
|
||||
|
||||
@@ -270,17 +269,17 @@ int ogs_tlv_build_msg(ogs_pkbuf_t **pkbuf, ogs_tlv_desc_t *desc, void *msg,
|
||||
ogs_assert(r > 0 && root);
|
||||
|
||||
length = ogs_tlv_calc_length(root, mode);
|
||||
*pkbuf = ogs_pkbuf_alloc(NULL, OGS_TLV_MAX_HEADROOM+length);
|
||||
ogs_assert(*pkbuf);
|
||||
ogs_pkbuf_reserve(*pkbuf, OGS_TLV_MAX_HEADROOM);
|
||||
ogs_pkbuf_put(*pkbuf, length);
|
||||
pkbuf = ogs_pkbuf_alloc(NULL, OGS_TLV_MAX_HEADROOM+length);
|
||||
ogs_assert(pkbuf);
|
||||
ogs_pkbuf_reserve(pkbuf, OGS_TLV_MAX_HEADROOM);
|
||||
ogs_pkbuf_put(pkbuf, length);
|
||||
|
||||
rendlen = ogs_tlv_render(root, (*pkbuf)->data, length, mode);
|
||||
rendlen = ogs_tlv_render(root, pkbuf->data, length, mode);
|
||||
ogs_assert(rendlen == length);
|
||||
|
||||
ogs_tlv_free_all(root);
|
||||
|
||||
return OGS_OK;
|
||||
return pkbuf;
|
||||
}
|
||||
|
||||
static ogs_tlv_desc_t* tlv_find_desc(uint8_t *desc_index,
|
||||
@@ -17,16 +17,16 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_GTP_INSIDE) && !defined(OGS_GTP_COMPILATION)
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
#error "This header cannot be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef OGS_GTP_TLV_H
|
||||
#define OGS_GTP_TLV_H
|
||||
#ifndef OGS_TLV_MSG_H
|
||||
#define OGS_TLV_MSG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
|
||||
#define OGS_TLV_MAX_HEADROOM 16
|
||||
#define OGS_TLV_VARIABLE_LEN 0
|
||||
@@ -155,11 +155,9 @@ typedef struct ogs_tlv_null_s {
|
||||
ogs_tlv_presence_t presence;
|
||||
} ogs_tlv_null_t;
|
||||
|
||||
int ogs_tlv_build_msg(ogs_pkbuf_t **pkbuf, ogs_tlv_desc_t *desc, void *msg,
|
||||
int mode);
|
||||
|
||||
int ogs_tlv_parse_msg(void *msg, ogs_tlv_desc_t *desc, ogs_pkbuf_t *pkbuf,
|
||||
int mode);
|
||||
ogs_pkbuf_t *ogs_tlv_build_msg(ogs_tlv_desc_t *desc, void *msg, int mode);
|
||||
int ogs_tlv_parse_msg(
|
||||
void *msg, ogs_tlv_desc_t *desc, ogs_pkbuf_t *pkbuf, int mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -24,6 +24,10 @@
|
||||
#ifndef OGS_TLV_H
|
||||
#define OGS_TLV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OGS_TLV_MODE_T1_L1 1
|
||||
#define OGS_TLV_MODE_T1_L2 2
|
||||
#define OGS_TLV_MODE_T1_L2_I1 3
|
||||
|
||||
@@ -71,8 +71,6 @@ ogs_sock_t *ogs_udp_server(ogs_socknode_t *node)
|
||||
|
||||
node->sock = new;
|
||||
|
||||
ogs_socknode_install_poll(node);
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
@@ -110,8 +108,6 @@ ogs_sock_t *ogs_udp_client(ogs_socknode_t *node)
|
||||
|
||||
node->sock = new;
|
||||
|
||||
ogs_socknode_install_poll(node);
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ int ogs_diam_init(int mode, const char *conffile, ogs_diam_config_t *fd_config);
|
||||
void ogs_diam_final(void);
|
||||
|
||||
int ogs_diam_config_init(ogs_diam_config_t *fd_config);
|
||||
bool ogs_diam_peer_connected(void);
|
||||
|
||||
int fd_avp_search_avp ( struct avp * groupedavp,
|
||||
struct dict_object * what, struct avp ** avp );
|
||||
|
||||
147
lib/diameter/common/dict.c
Normal file
147
lib/diameter/common/dict.c
Normal file
@@ -0,0 +1,147 @@
|
||||
/*********************************************************************************************************
|
||||
* Software License Agreement (BSD License) *
|
||||
* Author: Thomas Klausner <tk@giga.or.at> *
|
||||
* *
|
||||
* Copyright (c) 2013, Thomas Klausner *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Written under contract by nfotex IT GmbH, http://nfotex.com/ *
|
||||
* *
|
||||
* Redistribution and use of this software in source and binary forms, with or without modification, are *
|
||||
* permitted provided that the following conditions are met: *
|
||||
* *
|
||||
* * Redistributions of source code must retain the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer. *
|
||||
* *
|
||||
* * Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer in the documentation and/or other *
|
||||
* materials provided with the distribution. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
|
||||
*********************************************************************************************************/
|
||||
|
||||
#include <freeDiameter/extension.h>
|
||||
|
||||
|
||||
/* The content of this file follows the same structure as dict_base_proto.c */
|
||||
|
||||
#define CHECK_dict_new( _type, _data, _parent, _ref ) \
|
||||
CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) );
|
||||
|
||||
#define CHECK_dict_search( _type, _criteria, _what, _result ) \
|
||||
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
|
||||
|
||||
struct local_rules_definition {
|
||||
struct dict_avp_request avp_vendor_plus_name;
|
||||
enum rule_position position;
|
||||
int min;
|
||||
int max;
|
||||
};
|
||||
|
||||
#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 )
|
||||
|
||||
/* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */
|
||||
#define PARSE_loc_rules( _rulearray, _parent) { \
|
||||
int __ar; \
|
||||
for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \
|
||||
struct dict_rule_data __data = { NULL, \
|
||||
(_rulearray)[__ar].position, \
|
||||
0, \
|
||||
(_rulearray)[__ar].min, \
|
||||
(_rulearray)[__ar].max}; \
|
||||
__data.rule_order = RULE_ORDER(__data.rule_position); \
|
||||
CHECK_FCT( fd_dict_search( \
|
||||
fd_g_config->cnf_dict, \
|
||||
DICT_AVP, \
|
||||
AVP_BY_NAME_AND_VENDOR, \
|
||||
&(_rulearray)[__ar].avp_vendor_plus_name, \
|
||||
&__data.rule_avp, 0 ) ); \
|
||||
if ( !__data.rule_avp ) { \
|
||||
TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \
|
||||
return ENOENT; \
|
||||
} \
|
||||
CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \
|
||||
{ \
|
||||
TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \
|
||||
(_rulearray)[__ar].avp_vendor_plus_name.avp_name); \
|
||||
return EINVAL; \
|
||||
} ); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define enumval_def_u32( _val_, _str_ ) \
|
||||
{ _str_, { .u32 = _val_ }}
|
||||
|
||||
#define enumval_def_os( _len_, _val_, _str_ ) \
|
||||
{ _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}}
|
||||
|
||||
|
||||
int ogs_dict_common_entry(char *conffile)
|
||||
{
|
||||
/* Applications section */
|
||||
{
|
||||
{
|
||||
struct dict_vendor_data vendor_data = { 13019, "ETSI" };
|
||||
CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL));
|
||||
}
|
||||
}
|
||||
|
||||
struct dict_object * UTF8String_type;
|
||||
|
||||
CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type);
|
||||
|
||||
/* Logical-Access-ID */
|
||||
{
|
||||
struct dict_avp_data data = {
|
||||
302, /* Code */
|
||||
13019, /* Vendor */
|
||||
"Logical-Access-ID", /* Name */
|
||||
AVP_FLAG_VENDOR, /* Fixed flags */
|
||||
AVP_FLAG_VENDOR, /* Fixed flag values */
|
||||
AVP_TYPE_OCTETSTRING /* base type of data */
|
||||
};
|
||||
CHECK_dict_new(DICT_AVP, &data, NULL, NULL);
|
||||
};
|
||||
|
||||
/* Physical-Access-ID */
|
||||
{
|
||||
struct dict_avp_data data = {
|
||||
313, /* Code */
|
||||
13019, /* Vendor */
|
||||
"Physical-Access-ID", /* Name */
|
||||
AVP_FLAG_VENDOR, /* Fixed flags */
|
||||
AVP_FLAG_VENDOR, /* Fixed flag values */
|
||||
AVP_TYPE_OCTETSTRING /* base type of data */
|
||||
};
|
||||
CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL);
|
||||
};
|
||||
|
||||
/* Reservation-Priority */
|
||||
{
|
||||
struct dict_avp_data data = {
|
||||
458, /* Code */
|
||||
13019, /* Vendor */
|
||||
"Reservation-Priority", /* Name */
|
||||
AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */
|
||||
AVP_FLAG_VENDOR, /* Fixed flag values */
|
||||
AVP_TYPE_UNSIGNED32 /* base type of data */
|
||||
};
|
||||
CHECK_dict_new(DICT_AVP, &data, NULL, NULL);
|
||||
};
|
||||
|
||||
LOG_D( "Extension 'Dictionary definitions for DCCA 3GPP' initialized");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0 /* modified by acetcom */
|
||||
EXTENSION_ENTRY("dict_ogs_common", ogs_dict_common_entry, "dict_dcca_3gpp");
|
||||
#endif
|
||||
@@ -23,21 +23,33 @@ libdiameter_common_sources = files('''
|
||||
base.h
|
||||
|
||||
libapp_sip.c
|
||||
dict.c
|
||||
message.c
|
||||
logger.c
|
||||
config.c
|
||||
util.c
|
||||
init.c
|
||||
'''.split())
|
||||
|
||||
libdiameter_common_inc = include_directories('.')
|
||||
|
||||
freediameter_proj = subproject('freediameter')
|
||||
libfdcore_dep = freediameter_proj.get_variable('libfdcore_dep')
|
||||
# At this point, Open5GS always use the subproject of freeDiameter
|
||||
freeDiameter_proj = subproject('freeDiameter')
|
||||
libfdcore_dep = freeDiameter_proj.get_variable('libfdcore_dep')
|
||||
|
||||
libdiameter_common_cc_flags = ['-DOGS_DIAM_COMPILATION']
|
||||
libdiameter_common_cc_flags += cc.get_supported_arguments([
|
||||
'-Wno-missing-prototypes',
|
||||
'-Wno-missing-declarations',
|
||||
'-Wno-discarded-qualifiers',
|
||||
'-Wno-incompatible-pointer-types',
|
||||
'-Wno-strict-prototypes',
|
||||
])
|
||||
|
||||
libdiameter_common = library('ogsdiameter-common',
|
||||
sources : libdiameter_common_sources,
|
||||
version : libogslib_version,
|
||||
c_args : '-DOGS_DIAM_COMPILATION',
|
||||
c_args : libdiameter_common_cc_flags,
|
||||
include_directories : [libdiameter_common_inc, libinc],
|
||||
dependencies : [libcore_dep, libfdcore_dep],
|
||||
install : true)
|
||||
|
||||
@@ -44,10 +44,14 @@ struct dict_object *ogs_diam_mip_home_agent_address = NULL;
|
||||
struct dict_object *ogs_diam_vendor = NULL;
|
||||
struct dict_object *ogs_diam_vendor_id = NULL;
|
||||
|
||||
extern int ogs_dict_common_entry(char *conffile);
|
||||
|
||||
int ogs_diam_message_init()
|
||||
{
|
||||
vendor_id_t id = OGS_3GPP_VENDOR_ID;
|
||||
|
||||
ogs_assert(ogs_dict_common_entry(NULL) == 0);
|
||||
|
||||
CHECK_dict_search( DICT_VENDOR, VENDOR_BY_ID, (void *)&id, &ogs_diam_vendor);
|
||||
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Vendor-Id", &ogs_diam_vendor_id);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user