mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-24 16:43:44 +00:00
Compare commits
95 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a80f5cb77c | ||
|
|
dbb7ae2de9 | ||
|
|
b54ab2923c | ||
|
|
fdfce08b68 | ||
|
|
f78ca3c483 | ||
|
|
f42b45a061 | ||
|
|
7bb1c7055f | ||
|
|
997b716cda | ||
|
|
d711b26dfa | ||
|
|
dd67b1e533 | ||
|
|
a71d2ee3db | ||
|
|
8ddbb03f65 | ||
|
|
c7d87c9180 | ||
|
|
3b0db8c384 | ||
|
|
ad12949469 | ||
|
|
7343941a50 | ||
|
|
d9743286c5 | ||
|
|
8afc4b7887 | ||
|
|
fae342ecce | ||
|
|
5eabfc8275 | ||
|
|
3c6711c9c8 | ||
|
|
7e29e7486f | ||
|
|
2dfeade346 | ||
|
|
70d02a3b8b | ||
|
|
ca4ee27e84 | ||
|
|
da364e03b7 | ||
|
|
01b69e046f | ||
|
|
85555daa15 | ||
|
|
6e84ac670d | ||
|
|
d652075ab9 | ||
|
|
a7280c2fcb | ||
|
|
300123d990 | ||
|
|
ee41a751f0 | ||
|
|
8487a2b4b3 | ||
|
|
e6ecaaa4fc | ||
|
|
99f7b3ce35 | ||
|
|
4b906b3010 | ||
|
|
b35c2277be | ||
|
|
bcd02b1f33 | ||
|
|
c54e85c5c0 | ||
|
|
dbee687a75 | ||
|
|
20008b6a13 | ||
|
|
7f19916f05 | ||
|
|
a381c89f2e | ||
|
|
e514316493 | ||
|
|
41ff775a37 | ||
|
|
8702605b5f | ||
|
|
72370ff0b2 | ||
|
|
0c0241d5e5 | ||
|
|
1494cd9fec | ||
|
|
9bfb4591ea | ||
|
|
6ef5a746e5 | ||
|
|
c534d47a78 | ||
|
|
68dba64d0d | ||
|
|
7ba5e31c80 | ||
|
|
6f6800b52e | ||
|
|
3c3aec340e | ||
|
|
a9eaed18aa | ||
|
|
3b19cd85cc | ||
|
|
dbf3e17fda | ||
|
|
1fd3f48860 | ||
|
|
d0673e3066 | ||
|
|
46f20cc979 | ||
|
|
4e01d270eb | ||
|
|
00ec906b0c | ||
|
|
82eebc3b80 | ||
|
|
cde847c53d | ||
|
|
e6ee163140 | ||
|
|
ae75f43a88 | ||
|
|
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 |
@@ -12,15 +12,8 @@ Voice and text chat available in Open5GS's [Discord](https://discordapp.com/) wo
|
||||
|
||||
## Contributing
|
||||
|
||||
Open5GS is a pure/classic FOSS project, open to contributions from anyone.
|
||||
|
||||
[Pull requests](https://github.com/open5gs/open5gs/pulls) are always welcome, and I appreciates any help the community can give to help make Open5GS better.
|
||||
|
||||
Do you want to be a committer? Please [send me an email](mailto:acetcom@gmail.com). You will be added as a committer to this project. However, if someone consistently causes difficulties with these source repositories due to poor behavior or other serious problems then commit access may be revoked.
|
||||
If you're contributing through a pull request to Open5GS project on GitHub, please read the [Contributor License Agreement](https://open5gs.org/open5gs/cla/) in advance.
|
||||
|
||||
## License
|
||||
|
||||
Open5GS source files are made available under the terms of the GNU Affero General Public License (GNU AGPLv3).
|
||||
|
||||
When you contribute code for Open5GS, the same license applies.
|
||||
|
||||
|
||||
101
configs/00101.yaml.in
Normal file
101
configs/00101.yaml.in
Normal file
@@ -0,0 +1,101 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.2
|
||||
port: 7777
|
||||
ngap:
|
||||
- addr: 127.0.0.2
|
||||
guami:
|
||||
- plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
amf_id:
|
||||
region: 1
|
||||
set: 1
|
||||
pointer: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
tac: 81
|
||||
plmn:
|
||||
- plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
integrity_order : [ NIA2, NIA1, NIA0 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
amf_name: open5gs-amf0
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.3
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
pdn:
|
||||
- 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
|
||||
freeDiameter:
|
||||
identity: pgw.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.5
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
gtpu:
|
||||
- addr:
|
||||
- 127.0.0.4
|
||||
- ::1
|
||||
pdn:
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
|
||||
udm:
|
||||
sbi:
|
||||
- addr: 127.0.0.6
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.7
|
||||
port: 7777
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
126
configs/23504.yaml.in
Normal file
126
configs/23504.yaml.in
Normal file
@@ -0,0 +1,126 @@
|
||||
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:
|
||||
addr: 127.0.0.1
|
||||
gtpc:
|
||||
addr: 127.0.0.1
|
||||
gummei:
|
||||
plmn_id:
|
||||
mcc: 235
|
||||
mnc: 04
|
||||
mme_gid: 32769
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
mcc: 235
|
||||
mnc: 04
|
||||
tac: 1
|
||||
security:
|
||||
integrity_order : [ EIA2, EIA1, 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:
|
||||
addr: 127.0.0.2
|
||||
|
||||
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:
|
||||
connect:
|
||||
- identity: pcrf.localdomain
|
||||
addr: 127.0.0.5
|
||||
|
||||
gtpc:
|
||||
- addr:
|
||||
- 127.0.0.3
|
||||
- ::1
|
||||
- addr:
|
||||
- 127.0.0.4
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pdn:
|
||||
- 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
|
||||
100
configs/5gc-sample.yaml.in
Normal file
100
configs/5gc-sample.yaml.in
Normal file
@@ -0,0 +1,100 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.2
|
||||
port: 7777
|
||||
ngap:
|
||||
- addr: 127.0.0.2
|
||||
guami:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
tac: 1
|
||||
plmn:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
integrity_order : [ NIA1, NIA2, NIA0 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
amf_name: open5gs-amf0
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.3
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
pdn:
|
||||
- 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
|
||||
freeDiameter:
|
||||
identity: pgw.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.5
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
gtpu:
|
||||
- addr:
|
||||
- 127.0.0.4
|
||||
- ::1
|
||||
pdn:
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
|
||||
udm:
|
||||
sbi:
|
||||
- addr: 127.0.0.6
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.7
|
||||
port: 7777
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
96
configs/5gc.yaml.in
Normal file
96
configs/5gc.yaml.in
Normal file
@@ -0,0 +1,96 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.2
|
||||
port: 7777
|
||||
ngap:
|
||||
guami:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
tac: 1
|
||||
plmn:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
integrity_order : [ NIA1, NIA2, NIA0 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
amf_name: open5gs-amf0
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.3
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
pdn:
|
||||
- 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
|
||||
freeDiameter:
|
||||
identity: pgw.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.5
|
||||
upf:
|
||||
pfcp:
|
||||
addr: 127.0.0.4
|
||||
gtpu:
|
||||
pdn:
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
|
||||
udm:
|
||||
sbi:
|
||||
- addr: 127.0.0.6
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.7
|
||||
port: 7777
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
@@ -128,7 +128,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
|
||||
136
configs/cups.yaml.in
Normal file
136
configs/cups.yaml.in
Normal file
@@ -0,0 +1,136 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
|
||||
mme:
|
||||
freeDiameter:
|
||||
identity: mme.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.4
|
||||
|
||||
s1ap:
|
||||
addr: 127.0.0.1
|
||||
gtpc:
|
||||
addr: 127.0.0.1
|
||||
gummei:
|
||||
plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
tac: 12345
|
||||
security:
|
||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
|
||||
hss:
|
||||
freeDiameter:
|
||||
identity: hss.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.2
|
||||
|
||||
sgw:
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gtpu:
|
||||
addr: 127.0.0.2
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.3
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
pdn:
|
||||
- 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
|
||||
freeDiameter:
|
||||
identity: pgw.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.5
|
||||
nrf:
|
||||
sbi:
|
||||
addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
gtpu:
|
||||
- addr:
|
||||
- 127.0.0.4
|
||||
- ::1
|
||||
pdn:
|
||||
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.3
|
||||
- identity: pcscf.open-ims.test
|
||||
addr: 127.0.0.1
|
||||
@@ -92,7 +92,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
61
configs/epc-fdconf.yaml.in
Normal file
61
configs/epc-fdconf.yaml.in
Normal file
@@ -0,0 +1,61 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/open5gs.log
|
||||
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
|
||||
mme:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/mme.conf
|
||||
s1ap:
|
||||
gtpc:
|
||||
sgsap:
|
||||
gummei:
|
||||
plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
tac: 12345
|
||||
|
||||
security:
|
||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
|
||||
hss:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/hss.conf
|
||||
|
||||
sgw:
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gtpu:
|
||||
|
||||
pgw:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/pgw.conf
|
||||
gtpc:
|
||||
addr:
|
||||
- 127.0.0.3
|
||||
- ::1
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pdn:
|
||||
- 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: @sysconfdir@/freeDiameter/pcrf.conf
|
||||
@@ -94,7 +94,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
@@ -1,589 +0,0 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/open5gs.log
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,s1ap,nas,fd,gtp,mme,emm,esm,sgw,pgw,hss,pcrf,event,tlv,mem,sock
|
||||
#
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
#
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
|
||||
#
|
||||
# sctp:
|
||||
#
|
||||
# o heartbit_interval : 5000 (5secs)
|
||||
# o rto_initial : 3000 (3secs)
|
||||
# o rto_min : 1000 (1sec)
|
||||
# o rto_max : 5000 (5secs)
|
||||
# o max_num_of_ostreams : 30
|
||||
# o max_num_of_istreams : 65535
|
||||
# o max_attempts : 4
|
||||
# o max_initial_timeout : 8000(8secs)
|
||||
# o usrsctp_udp_port : 9899
|
||||
sctp:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of SGW per MME
|
||||
# sgw: 32
|
||||
# o Maximum Number of PGW per MME
|
||||
# pgw: 32
|
||||
# o Maximum Number of VLR per MME
|
||||
# vlr: 32
|
||||
# o Maximum Number of eNodeB per MME
|
||||
# enb: 32
|
||||
# o Maximum Number of UE per eNodeB
|
||||
# ue: 128
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in SGW
|
||||
# - SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
pool:
|
||||
|
||||
mme:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/mme.conf
|
||||
|
||||
#
|
||||
# <S1AP Server>>
|
||||
#
|
||||
# o S1AP Server(all address avaiable)
|
||||
# s1ap:
|
||||
#
|
||||
# o S1AP Server(0.0.0.0:36412)
|
||||
# s1ap:
|
||||
# addr: 0.0.0.0
|
||||
#
|
||||
# o S1AP Server(127.0.0.1:36412, [::1]:36412)
|
||||
# s1ap:
|
||||
# - addr: 127.0.0.1
|
||||
# - addr: ::1
|
||||
|
||||
# o S1AP Server(different port)
|
||||
# s1ap:
|
||||
# - addr: 127.0.0.1
|
||||
# port: 36413
|
||||
#
|
||||
# o S1AP Server(address avaiable in `eth0` interface)
|
||||
# s1ap:
|
||||
# dev: eth0
|
||||
#
|
||||
s1ap:
|
||||
|
||||
#
|
||||
# <GTP-C Server>>
|
||||
#
|
||||
# o GTP-C Server(all address avaiable)
|
||||
# gtpc:
|
||||
#
|
||||
# o GTP-C Server(127.0.0.1:2123, [::1]:2123)
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.1
|
||||
# - addr: ::1
|
||||
#
|
||||
gtpc:
|
||||
|
||||
#
|
||||
# <sgsap>
|
||||
#
|
||||
# o Single MSC/VLR(127.0.0.2)
|
||||
# sgsap:
|
||||
# addr: 127.0.0.2
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4130
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# lac: 43690
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4132
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43692
|
||||
#
|
||||
# o Multiple MSC/VLR
|
||||
# sgsap:
|
||||
# - addr: 127.0.0.2
|
||||
# port: 29119
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4131
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# lac: 43691
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4132
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43692
|
||||
# - addr
|
||||
# - 127.0.0.3
|
||||
# - fe80::2%@loopback_devname@
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4132
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43692
|
||||
# - name: msc.open5gs.org
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4133
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43693
|
||||
#
|
||||
sgsap:
|
||||
|
||||
|
||||
#
|
||||
# <GUMMEI>
|
||||
#
|
||||
# o Multiple GUMMEI
|
||||
# gummei:
|
||||
# - plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# mme_gid: 2
|
||||
# mme_code: 1
|
||||
# - plmn_id:
|
||||
# - mcc: 002
|
||||
# mnc: 02
|
||||
# - mcc: 003
|
||||
# mnc: 03
|
||||
# mme_gid: [3, 4]
|
||||
# mme_code:
|
||||
# - 2
|
||||
# - 3
|
||||
#
|
||||
gummei:
|
||||
plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
|
||||
#
|
||||
# <TAI>
|
||||
#
|
||||
# o Multiple TAI
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: [1, 2, 3]
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4
|
||||
# - plmn_id:
|
||||
# mcc: 003
|
||||
# mnc: 03
|
||||
# tac: 5
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 004
|
||||
# mnc: 04
|
||||
# tac: [6, 7]
|
||||
# - plmn_id:
|
||||
# mcc: 005
|
||||
# mnc: 05
|
||||
# tac: 8
|
||||
# - plmn_id:
|
||||
# mcc: 006
|
||||
# mnc: 06
|
||||
# tac: [9, 10]
|
||||
#
|
||||
tai:
|
||||
plmn_id:
|
||||
mcc: 001
|
||||
mnc: 01
|
||||
tac: 12345
|
||||
|
||||
security:
|
||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
|
||||
#
|
||||
# <Network Name>
|
||||
# network_name:
|
||||
# full: Open5GS
|
||||
# short: Next
|
||||
#
|
||||
|
||||
network_name:
|
||||
full: Open5GS
|
||||
|
||||
hss:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/hss.conf
|
||||
|
||||
sgw:
|
||||
#
|
||||
# ------------------------ MME --------------------------
|
||||
#
|
||||
# o Specify SGW addresses the GTP-C must connect to
|
||||
#
|
||||
# o One SGW is defined. If prefer_ipv4 is not true, [fe80::2%@loopback_devname@] is selected.
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.2
|
||||
# - fe80::2%@loopback_devname@
|
||||
#
|
||||
# o Two SGW are defined. MME selects SGW with round-robin manner per UE
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# - addr: fe80::2%@loopback_devname@
|
||||
#
|
||||
# o Three SGW are defined. MME selects SGW with round-robin manner per UE
|
||||
# gtpc:
|
||||
# - addr
|
||||
# - 127.0.0.2
|
||||
# - fe80::2%@loopback_devname@
|
||||
# - addr
|
||||
# - 127.0.0.12
|
||||
# - fe80::12%@loopback_devname@
|
||||
# - name: sgw3.open5gs.org
|
||||
#
|
||||
# ------------------------ SGW --------------------------
|
||||
#
|
||||
# o GTP-C Server(127.0.0.2:2123, [fe80::2%@loopback_devname@]:2123)
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.2
|
||||
# - fe80::2%@loopback_devname@
|
||||
#
|
||||
# o On SGW, Same Configuration(127.0.0.2:2123, [fe80::2%@loopback_devname@]:2123) as below.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# - addr: fe80::2%@loopback_devname@
|
||||
#
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
|
||||
#
|
||||
# <SGW Selection Mode>
|
||||
#
|
||||
# o Round-Robin
|
||||
# (If `selection_mode` is omitted, the default mode is Round-Robin)
|
||||
#
|
||||
# selection_mode: rr
|
||||
# gtpc:
|
||||
# addr: 127.0.0.2
|
||||
# addr: 127.0.2.2
|
||||
# addr: 127.0.4.2
|
||||
#
|
||||
# o SGW selection by eNodeB TAC
|
||||
#
|
||||
# selection_mode: tac
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# tac: 26000
|
||||
# - addr: 127.0.2.2
|
||||
# tac: [25000, 27000, 28000]
|
||||
#
|
||||
|
||||
#
|
||||
# <GTP-U Server>
|
||||
#
|
||||
# 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:
|
||||
|
||||
pgw:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/pgw.conf
|
||||
|
||||
#
|
||||
# ------------------------ MME --------------------------
|
||||
#
|
||||
# o By default, the PGW uses 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 eacho UE,
|
||||
# you can use a specific PGW node for each UE.
|
||||
#
|
||||
# o Two PGW are defined. 127.0.0.3:2123 is used.
|
||||
# [fe80::3%@loopback_devname@]:2123 is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%@loopback_devname@
|
||||
#
|
||||
# o One PGW is defined. if prefer_ipv4 is not true,
|
||||
# [fe80::3%@loopback_devname@] is selected.
|
||||
# gtpc:
|
||||
# - addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%@loopback_devname@
|
||||
#
|
||||
# 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
|
||||
# ------------------------ PGW --------------------------
|
||||
#
|
||||
# o GTP-C Server(127.0.0.3:2123, [fe80::3%@loopback_devname@]:2123)
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%@loopback_devname@
|
||||
#
|
||||
# o On PGW, Same configuration(127.0.0.3:2123, [fe80::3%@loopback_devname@]:2123).
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%@loopback_devname@
|
||||
#
|
||||
gtpc:
|
||||
addr:
|
||||
- 127.0.0.3
|
||||
- ::1
|
||||
|
||||
#
|
||||
# <GTP-U Server>>
|
||||
#
|
||||
# o GTP-U Server(127.0.0.3:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: ::1
|
||||
#
|
||||
# o Same configuration(127.0.0.3:2152, [::1]:2152) as below.
|
||||
# gtpu:
|
||||
# name: localhost
|
||||
#
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
|
||||
#
|
||||
# <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
|
||||
#
|
||||
# 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: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
|
||||
#
|
||||
# <Domain Name Server>
|
||||
#
|
||||
# o Primary/Secondary can be configured. Others are ignored.
|
||||
#
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 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>
|
||||
#
|
||||
# o Proxy Call Session Control Function
|
||||
#
|
||||
# p-cscf:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
#
|
||||
|
||||
pcrf:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/pcrf.conf
|
||||
@@ -34,13 +34,19 @@ else
|
||||
endif
|
||||
|
||||
example_conf = '''
|
||||
simple.yaml
|
||||
installed.yaml
|
||||
split.yaml
|
||||
5gc.yaml
|
||||
5gc-sample.yaml
|
||||
00101.yaml
|
||||
23504.yaml
|
||||
minimal.yaml
|
||||
epc.yaml
|
||||
epc-fdconf.yaml
|
||||
epc-custom.yaml
|
||||
mnc3.yaml
|
||||
csfb.yaml
|
||||
volte.yaml
|
||||
srslte.yaml
|
||||
cups.yaml
|
||||
'''.split()
|
||||
|
||||
foreach file : example_conf
|
||||
|
||||
103
configs/minimal.yaml.in
Normal file
103
configs/minimal.yaml.in
Normal file
@@ -0,0 +1,103 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.2
|
||||
port: 7777
|
||||
ngap:
|
||||
- addr: 127.0.0.2
|
||||
guami:
|
||||
- plmn_id:
|
||||
mcc: 208
|
||||
mnc: 93
|
||||
amf_id:
|
||||
region: 202
|
||||
set: 1016
|
||||
tai:
|
||||
- plmn_id:
|
||||
mcc: 208
|
||||
mnc: 93
|
||||
tac: 1
|
||||
plmn:
|
||||
- plmn_id:
|
||||
mcc: 208
|
||||
mnc: 93
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
sd: 010203
|
||||
- sst: 1
|
||||
sd: 112233
|
||||
security:
|
||||
integrity_order : [ NIA2, NIA1 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
amf_name: open5gs-amf0
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.3
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
pdn:
|
||||
- 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
|
||||
freeDiameter:
|
||||
identity: pgw.open-ims.test
|
||||
realm: open-ims.test
|
||||
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.open-ims.test
|
||||
addr: 127.0.0.5
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
gtpu:
|
||||
- addr:
|
||||
- 127.0.0.4
|
||||
- ::1
|
||||
pdn:
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
|
||||
udm:
|
||||
sbi:
|
||||
- addr: 127.0.0.6
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.7
|
||||
port: 7777
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
@@ -98,7 +98,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
|
||||
303
configs/open5gs/amf.yaml.in
Normal file
303
configs/open5gs/amf.yaml.in
Normal file
@@ -0,0 +1,303 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,pfcp,fd,gtp,amf,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/amf.log
|
||||
#
|
||||
# amf:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:80)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: amf.key
|
||||
# pem: amf.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.2:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.2
|
||||
# tls:
|
||||
# key: amf.key
|
||||
# pem: amf.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://amf.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: amf.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.2:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.2
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
# <NGAP Server>>
|
||||
#
|
||||
# o NGAP Server(all address avaiable)
|
||||
# ngap:
|
||||
#
|
||||
# o NGAP Server(0.0.0.0:38412)
|
||||
# ngap:
|
||||
# addr: 0.0.0.0
|
||||
#
|
||||
# o NGAP Server(127.0.0.1:38412, [::1]:38412)
|
||||
# ngap:
|
||||
# - addr: 127.0.0.1
|
||||
# - addr: ::1
|
||||
#
|
||||
# o NGAP Server(different port)
|
||||
# ngap:
|
||||
# - addr: 127.0.0.1
|
||||
# port: 38413
|
||||
#
|
||||
# o NGAP Server(address avaiable in `eth0` interface)
|
||||
# ngap:
|
||||
# dev: eth0
|
||||
#
|
||||
# <GUAMI>
|
||||
#
|
||||
# o Multiple GUAMI
|
||||
# guami:
|
||||
# - plmn_id:
|
||||
# mcc: 901
|
||||
# mnc: 70
|
||||
# amf_id:
|
||||
# region: 2
|
||||
# set: 1
|
||||
# pointer: 4
|
||||
# - plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# amf_id:
|
||||
# region: 5
|
||||
# set: 2
|
||||
#
|
||||
# <TAI>
|
||||
#
|
||||
# o Multiple TAI
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: [1, 2, 3]
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4
|
||||
# - plmn_id:
|
||||
# mcc: 003
|
||||
# mnc: 03
|
||||
# tac: 5
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 004
|
||||
# mnc: 04
|
||||
# tac: [6, 7]
|
||||
# - plmn_id:
|
||||
# mcc: 005
|
||||
# mnc: 05
|
||||
# tac: 8
|
||||
# - plmn_id:
|
||||
# mcc: 006
|
||||
# mnc: 06
|
||||
# tac: [9, 10]
|
||||
#
|
||||
# <PLMN Support>
|
||||
#
|
||||
# o Multiple PLMN Support
|
||||
# plmn:
|
||||
# - plmn_id:
|
||||
# mcc: 901
|
||||
# mnc: 70
|
||||
# s_nssai:
|
||||
# - sst: 1
|
||||
# - sd: 010000
|
||||
# - plmn_id:
|
||||
# mcc: 901
|
||||
# mnc: 70
|
||||
# s_nssai:
|
||||
# - sst: 1
|
||||
#
|
||||
# <Network Name>
|
||||
#
|
||||
# network_name:
|
||||
# full: Open5GS
|
||||
# short: Next
|
||||
#
|
||||
# <AMF Name>
|
||||
#
|
||||
# amf_name: amf1.open5gs.amf.5gc.mnc70.mcc901.3gppnetwork.org
|
||||
#
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.2
|
||||
port: 7777
|
||||
ngap:
|
||||
- addr: 127.0.0.2
|
||||
guami:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
tac: 1
|
||||
plmn:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
integrity_order : [ NIA1, NIA2, NIA0 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
amf_name: open5gs-amf0
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Client>>
|
||||
#
|
||||
# o SBI Client(http://127.0.0.1:7777)
|
||||
# sbi:
|
||||
# addr: 127.0.0.1
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Client(https://127.0.0.1:443, http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Client(http://[fe80::1%@loopback_devname@]:80)
|
||||
# If prefer_ipv4 is true, http://127.0.0.1:80 is selected.
|
||||
#
|
||||
# sbi:
|
||||
# addr:
|
||||
# - 127.0.0.1
|
||||
# - fe80::1%@loopback_devname@
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per AMF
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
time:
|
||||
179
configs/open5gs/ausf.yaml.in
Normal file
179
configs/open5gs/ausf.yaml.in
Normal file
@@ -0,0 +1,179 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,pfcp,fd,gtp,ausf,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/ausf.log
|
||||
#
|
||||
# ausf:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:80)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: ausf.key
|
||||
# pem: ausf.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.5:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.5
|
||||
# tls:
|
||||
# key: ausf.key
|
||||
# pem: ausf.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://ausf.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: ausf.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.5:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.5
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
ausf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Client>>
|
||||
#
|
||||
# o SBI Client(http://127.0.0.1:7777)
|
||||
# sbi:
|
||||
# addr: 127.0.0.1
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Client(https://127.0.0.1:443, http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Client(http://[fe80::1%@loopback_devname@]:80)
|
||||
# If prefer_ipv4 is true, http://127.0.0.1:80 is selected.
|
||||
#
|
||||
# sbi:
|
||||
# addr:
|
||||
# - 127.0.0.1
|
||||
# - fe80::1%@loopback_devname@
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per AMF
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
time:
|
||||
@@ -1,9 +1,95 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,fd,hss,event,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/hss.log
|
||||
|
||||
parameter:
|
||||
|
||||
hss:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/hss.conf
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of SGW per MME
|
||||
# sgw: 32
|
||||
# o Maximum Number of PGW per MME
|
||||
# pgw: 32
|
||||
# o Maximum Number of VLR per MME
|
||||
# vlr: 32
|
||||
# o Maximum Number of eNodeB per MME
|
||||
# enb: 32
|
||||
# o Maximum Number of UE per eNodeB
|
||||
# ue: 128
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
@@ -25,6 +25,14 @@ open5gs_conf = '''
|
||||
sgw.yaml
|
||||
pgw.yaml
|
||||
pcrf.yaml
|
||||
|
||||
nrf.yaml
|
||||
udr.yaml
|
||||
udm.yaml
|
||||
ausf.yaml
|
||||
upf.yaml
|
||||
smf.yaml
|
||||
amf.yaml
|
||||
'''.split()
|
||||
|
||||
foreach file : open5gs_conf
|
||||
|
||||
@@ -1,8 +1,206 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,s1ap,nas,fd,gtp,mme,emm,esm,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/mme.log
|
||||
|
||||
parameter:
|
||||
|
||||
#
|
||||
# mme:
|
||||
#
|
||||
# <S1AP Server>>
|
||||
#
|
||||
# o S1AP Server(all address avaiable)
|
||||
# s1ap:
|
||||
#
|
||||
# o S1AP Server(0.0.0.0:36412)
|
||||
# s1ap:
|
||||
# addr: 0.0.0.0
|
||||
#
|
||||
# o S1AP Server(127.0.0.1:36412, [::1]:36412)
|
||||
# s1ap:
|
||||
# - addr: 127.0.0.1
|
||||
# - addr: ::1
|
||||
#
|
||||
# o S1AP Server(different port)
|
||||
# s1ap:
|
||||
# - addr: 127.0.0.1
|
||||
# port: 36413
|
||||
#
|
||||
# o S1AP Server(address avaiable in `eth0` interface)
|
||||
# s1ap:
|
||||
# dev: eth0
|
||||
#
|
||||
# <GTP-C Server>>
|
||||
#
|
||||
# o GTP-C Server(all address avaiable)
|
||||
# gtpc:
|
||||
#
|
||||
# o GTP-C Server(127.0.0.1:2123, [::1]:2123)
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.1
|
||||
# - addr: ::1
|
||||
#
|
||||
# <SGsAP>
|
||||
#
|
||||
# o Single MSC/VLR(127.0.0.2)
|
||||
# sgsap:
|
||||
# addr: 127.0.0.2
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4130
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# lac: 43690
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4132
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43692
|
||||
#
|
||||
# o Multiple MSC/VLR
|
||||
# sgsap:
|
||||
# - addr: 127.0.0.2
|
||||
# port: 29119
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4131
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# lac: 43691
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4132
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43692
|
||||
# - addr
|
||||
# - 127.0.0.3
|
||||
# - fe80::2%@loopback_devname@
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4132
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43692
|
||||
# - name: msc.open5gs.org
|
||||
# map:
|
||||
# tai:
|
||||
# plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: 4133
|
||||
# lai:
|
||||
# plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# lac: 43693
|
||||
#
|
||||
#
|
||||
# <GUMMEI>
|
||||
#
|
||||
# o Multiple GUMMEI
|
||||
# gummei:
|
||||
# - plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# mme_gid: 2
|
||||
# mme_code: 1
|
||||
# - plmn_id:
|
||||
# - mcc: 002
|
||||
# mnc: 02
|
||||
# - mcc: 003
|
||||
# mnc: 03
|
||||
# mme_gid: [3, 4]
|
||||
# mme_code:
|
||||
# - 2
|
||||
# - 3
|
||||
#
|
||||
#
|
||||
# <TAI>
|
||||
#
|
||||
# o Multiple TAI
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 001
|
||||
# mnc: 01
|
||||
# tac: [1, 2, 3]
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 002
|
||||
# mnc: 02
|
||||
# tac: 4
|
||||
# - plmn_id:
|
||||
# mcc: 003
|
||||
# mnc: 03
|
||||
# tac: 5
|
||||
# tai:
|
||||
# - plmn_id:
|
||||
# mcc: 004
|
||||
# mnc: 04
|
||||
# tac: [6, 7]
|
||||
# - plmn_id:
|
||||
# mcc: 005
|
||||
# mnc: 05
|
||||
# tac: 8
|
||||
# - plmn_id:
|
||||
# mcc: 006
|
||||
# mnc: 06
|
||||
# tac: [9, 10]
|
||||
#
|
||||
#
|
||||
# <Network Name>
|
||||
#
|
||||
# network_name:
|
||||
# full: Open5GS
|
||||
# short: Next
|
||||
#
|
||||
# <MME Name>
|
||||
#
|
||||
# mme_name: open5gs-mme0
|
||||
#
|
||||
mme:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/mme.conf
|
||||
s1ap:
|
||||
@@ -23,13 +221,190 @@ mme:
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
mme_name: open5gs-mme0
|
||||
|
||||
#
|
||||
# sgw:
|
||||
#
|
||||
# <GTP-C Client>
|
||||
#
|
||||
# o Specify SGW addresses the GTP-C must connect to
|
||||
#
|
||||
# o One SGW is defined.
|
||||
# If prefer_ipv4 is not true, [fe80::2%@loopback_devname@] is selected.
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.2
|
||||
# - fe80::2%@loopback_devname@
|
||||
#
|
||||
# o Two SGW are defined. MME selects SGW with round-robin manner per UE
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# - addr: fe80::2%@loopback_devname@
|
||||
#
|
||||
# o Three SGW are defined. MME selects SGW with round-robin manner per UE
|
||||
# gtpc:
|
||||
# - addr
|
||||
# - 127.0.0.2
|
||||
# - fe80::2%@loopback_devname@
|
||||
# - addr
|
||||
# - 127.0.0.12
|
||||
# - fe80::12%@loopback_devname@
|
||||
# - name: sgw3.open5gs.org
|
||||
#
|
||||
# <SGW Selection Mode>
|
||||
#
|
||||
# o Round-Robin
|
||||
#
|
||||
# gtpc:
|
||||
# addr: 127.0.0.2
|
||||
# addr: 127.0.2.2
|
||||
# addr: 127.0.4.2
|
||||
#
|
||||
# o SGW selection by eNodeB TAC
|
||||
# (either single TAC or multiple TACs, DECIMAL representation)
|
||||
#
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# tac: 26000
|
||||
# - addr: 127.0.2.2
|
||||
# tac: [25000, 27000, 28000]
|
||||
#
|
||||
# o SGW selection by e_cell_id(28bit)
|
||||
# (either single or multiple e_cell_id, HEX representation)
|
||||
#
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# e_cell_id: abcde01
|
||||
# - addr: 127.0.2.2
|
||||
# e_cell_id: [12345, a9413, 98765]
|
||||
#
|
||||
sgw:
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
|
||||
#
|
||||
# pgw:
|
||||
#
|
||||
# <GTP-C Client>
|
||||
#
|
||||
# o By default, the PGW uses 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 eacho UE,
|
||||
# you can use a specific PGW node for each UE.
|
||||
#
|
||||
# o Two PGW are defined. 127.0.0.3:2123 is used.
|
||||
# [fe80::3%@loopback_devname@]:2123 is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%@loopback_devname@
|
||||
#
|
||||
# o One PGW is defined. if prefer_ipv4 is not true,
|
||||
# [fe80::3%@loopback_devname@] is selected.
|
||||
# gtpc:
|
||||
# - addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%@loopback_devname@
|
||||
#
|
||||
# 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
|
||||
pgw:
|
||||
gtpc:
|
||||
addr:
|
||||
- 127.0.0.3
|
||||
- ::1
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of SGW per MME
|
||||
# sgw: 32
|
||||
# o Maximum Number of PGW per MME
|
||||
# pgw: 32
|
||||
# o Maximum Number of VLR per MME
|
||||
# vlr: 32
|
||||
# o Maximum Number of eNodeB per MME
|
||||
# enb: 32
|
||||
# o Maximum Number of UE per eNodeB
|
||||
# ue: 128
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# sctp:
|
||||
#
|
||||
# o heartbit_interval : 5000 (5secs)
|
||||
# o rto_initial : 3000 (3secs)
|
||||
# o rto_min : 1000 (1sec)
|
||||
# o rto_max : 5000 (5secs)
|
||||
# o max_num_of_ostreams : 30
|
||||
# o max_num_of_istreams : 65535
|
||||
# o max_attempts : 4
|
||||
# o max_initial_timeout : 8000(8secs)
|
||||
# o usrsctp_udp_port : 9899
|
||||
#
|
||||
sctp:
|
||||
|
||||
158
configs/open5gs/nrf.yaml.in
Normal file
158
configs/open5gs/nrf.yaml.in
Normal file
@@ -0,0 +1,158 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,fd,nrf,event,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/nrf.log
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:7777)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.1:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.1:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per MME
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Validity (Default : 3600 seconds = 1 hour)
|
||||
#
|
||||
# o NF Instance Validity (10 seconds)
|
||||
# nf_instance:
|
||||
# validity: 10
|
||||
#
|
||||
# o Subscription Validity (Default : 86400 seconds = 1 day)
|
||||
#
|
||||
# o Subscription Validity (Disabled)
|
||||
# subscription:
|
||||
# validity: 0
|
||||
#
|
||||
# o Subscription Validity (3600 seconds = 1 hour)
|
||||
# subscription:
|
||||
# validity: 3600
|
||||
#
|
||||
time:
|
||||
@@ -1,9 +1,94 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,fd,pcrf,event,mem,sock
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/pcrf.log
|
||||
|
||||
parameter:
|
||||
|
||||
pcrf:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/pcrf.conf
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of SGW per MME
|
||||
# sgw: 32
|
||||
# o Maximum Number of PGW per MME
|
||||
# pgw: 32
|
||||
# o Maximum Number of VLR per MME
|
||||
# vlr: 32
|
||||
# o Maximum Number of eNodeB per MME
|
||||
# enb: 32
|
||||
# o Maximum Number of UE per eNodeB
|
||||
# ue: 128
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
@@ -1,8 +1,152 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,fd,gtp,pgw,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/pgw.log
|
||||
|
||||
parameter:
|
||||
|
||||
#
|
||||
# pgw:
|
||||
#
|
||||
# <GTP-C Server>
|
||||
#
|
||||
# o GTP-C Server(127.0.0.3:2123, [fe80::3%@loopback_devname@]:2123)
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%@loopback_devname@
|
||||
#
|
||||
# o On PGW, Same configuration
|
||||
# (127.0.0.3:2123, [fe80::3%@loopback_devname@]:2123).
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%@loopback_devname@
|
||||
#
|
||||
#
|
||||
# <GTP-U Server>>
|
||||
#
|
||||
# o GTP-U Server(127.0.0.3:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: ::1
|
||||
#
|
||||
# o Same configuration(127.0.0.3:2152, [::1]:2152) as below.
|
||||
# gtpu:
|
||||
# name: localhost
|
||||
#
|
||||
# <PDN Configuration with UE Pool>
|
||||
#
|
||||
# o IPv4 Pool
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
#
|
||||
# pdn:
|
||||
# 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
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# o Pool Range Sample
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range: 10.45.0.100-10.45.0.200
|
||||
#
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range:
|
||||
# - 10.45.0.5-10.45.0.50
|
||||
# - 10.45.0.100-
|
||||
#
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range:
|
||||
# - -10.45.0.200
|
||||
# - 10.45.0.210-10.45.0.220
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# <Domain Name Server>
|
||||
#
|
||||
# o Primary/Secondary can be configured. Others are ignored.
|
||||
#
|
||||
# <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
|
||||
#
|
||||
# <P-CSCF>
|
||||
#
|
||||
# o Proxy Call Session Control Function
|
||||
#
|
||||
# p-cscf:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
#
|
||||
pgw:
|
||||
freeDiameter: @sysconfdir@/freeDiameter/pgw.conf
|
||||
gtpc:
|
||||
@@ -11,7 +155,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
@@ -20,3 +164,71 @@ pgw:
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
mtu: 1400
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of SGW per MME
|
||||
# sgw: 32
|
||||
# o Maximum Number of PGW per MME
|
||||
# pgw: 32
|
||||
# o Maximum Number of VLR per MME
|
||||
# vlr: 32
|
||||
# o Maximum Number of eNodeB per MME
|
||||
# enb: 32
|
||||
# o Maximum Number of UE per eNodeB
|
||||
# ue: 128
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
@@ -1,10 +1,131 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,gtp,sgw,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/sgw.log
|
||||
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
|
||||
#
|
||||
# sgw:
|
||||
#
|
||||
# <GTP-C Server>
|
||||
#
|
||||
# o GTP-C Server(127.0.0.2:2123, [fe80::2%@loopback_devname@]:2123)
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.2
|
||||
# - fe80::2%@loopback_devname@
|
||||
#
|
||||
# o On SGW, Same Configuration(127.0.0.2:2123,
|
||||
# [fe80::2%@loopback_devname@]:2123) as below.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.2
|
||||
# - addr: fe80::2%@loopback_devname@
|
||||
#
|
||||
# <GTP-U Server>
|
||||
#
|
||||
# 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
|
||||
#
|
||||
sgw:
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gtpu:
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
no_ipv6: true
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of SGW per MME
|
||||
# sgw: 32
|
||||
# o Maximum Number of PGW per MME
|
||||
# pgw: 32
|
||||
# o Maximum Number of VLR per MME
|
||||
# vlr: 32
|
||||
# o Maximum Number of eNodeB per MME
|
||||
# enb: 32
|
||||
# o Maximum Number of UE per eNodeB
|
||||
# ue: 128
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
363
configs/open5gs/smf.yaml.in
Normal file
363
configs/open5gs/smf.yaml.in
Normal file
@@ -0,0 +1,363 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,pfcp,fd,gtp,smf,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/smf.log
|
||||
#
|
||||
# smf:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:80)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: smf.key
|
||||
# pem: smf.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.3:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.3
|
||||
# tls:
|
||||
# key: smf.key
|
||||
# pem: smf.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://smf.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: smf.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.3:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.3
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
# <PFCP Server>
|
||||
#
|
||||
# o PFCP Server(127.0.0.3:8805, ::1:8805)
|
||||
# pfcp:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: ::1
|
||||
#
|
||||
# <GTP-C Server>
|
||||
#
|
||||
# o GTP-C Server(127.0.0.3:2123, [fe80::3%@loopback_devname@]:2123)
|
||||
# gtpc:
|
||||
# addr:
|
||||
# - 127.0.0.3
|
||||
# - fe80::3%@loopback_devname@
|
||||
#
|
||||
# o On SMF, Same configuration
|
||||
# (127.0.0.3:2123, [fe80::3%@loopback_devname@]:2123).
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.3
|
||||
# - addr: fe80::3%@loopback_devname@
|
||||
#
|
||||
# <PDN Configuration with UE Pool>
|
||||
#
|
||||
# o IPv4 Pool
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
#
|
||||
# pdn:
|
||||
# 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
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# o Pool Range Sample
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range: 10.45.0.100-10.45.0.200
|
||||
#
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range:
|
||||
# - 10.45.0.5-10.45.0.50
|
||||
# - 10.45.0.100-
|
||||
#
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/24
|
||||
# range:
|
||||
# - -10.45.0.200
|
||||
# - 10.45.0.210-10.45.0.220
|
||||
#
|
||||
# pdn:
|
||||
# - 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
|
||||
#
|
||||
# <Domain Name Server>
|
||||
#
|
||||
# o Primary/Secondary can be configured. Others are ignored.
|
||||
#
|
||||
# <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
|
||||
#
|
||||
# <P-CSCF>
|
||||
#
|
||||
# o Proxy Call Session Control Function
|
||||
#
|
||||
# p-cscf:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
#
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.3
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
pdn:
|
||||
- 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
|
||||
freeDiameter: @sysconfdir@/freeDiameter/pgw.conf
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Client>>
|
||||
#
|
||||
# o SBI Client(http://127.0.0.1:7777)
|
||||
# sbi:
|
||||
# addr: 127.0.0.1
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Client(https://127.0.0.1:443, http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Client(http://[fe80::1%@loopback_devname@]:80)
|
||||
# If prefer_ipv4 is true, http://127.0.0.1:80 is selected.
|
||||
#
|
||||
# sbi:
|
||||
# addr:
|
||||
# - 127.0.0.1
|
||||
# - fe80::1%@loopback_devname@
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# upf:
|
||||
#
|
||||
# <PFCP Client>>
|
||||
#
|
||||
# o PFCP Client(127.0.0.4:8805)
|
||||
#
|
||||
# pfcp:
|
||||
# addr: 127.0.0.4
|
||||
#
|
||||
# <UPF_SELECTION_MODE - EPC only>
|
||||
#
|
||||
# o Round-Robin
|
||||
# upf:
|
||||
# pfcp:
|
||||
# - addr: 127.0.0.4
|
||||
# - addr: 127.0.0.12
|
||||
#
|
||||
# o UPF selection by eNodeB TAC
|
||||
# (either single TAC or multiple TACs, DECIMAL representation)
|
||||
#
|
||||
# upf:
|
||||
# pfcp:
|
||||
# - addr: 127.0.0.4
|
||||
# tac: 1
|
||||
# - addr: 127.0.0.12
|
||||
# tac: [3,5,8]
|
||||
#
|
||||
# o UPF selection by UE's DNN/APN (either single DNN/APN or multiple DNNs/APNs)
|
||||
#
|
||||
# upf:
|
||||
# pfcp:
|
||||
# - addr: 127.0.0.4
|
||||
# dnn: ims
|
||||
# - addr: 127.0.0.12
|
||||
# apn: [internet, web]
|
||||
#
|
||||
# o UPF selection by CellID(e_cell_id: 28bit, nr_cell_id: 36bit)
|
||||
# (either single enb_id or multiple enb_ids, HEX representation)
|
||||
#
|
||||
# upf:
|
||||
# pfcp:
|
||||
# - addr: 127.0.0.4
|
||||
# e_cell_id: 463
|
||||
# - addr: 127.0.0.12
|
||||
# nr_cell_id: [123456789, 9413]
|
||||
#
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per AMF
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
time:
|
||||
179
configs/open5gs/udm.yaml.in
Normal file
179
configs/open5gs/udm.yaml.in
Normal file
@@ -0,0 +1,179 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,pfcp,fd,gtp,udm,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/udm.log
|
||||
#
|
||||
# udm:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:80)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: udm.key
|
||||
# pem: udm.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.6:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.6
|
||||
# tls:
|
||||
# key: udm.key
|
||||
# pem: udm.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://udm.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: udm.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.6:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.6
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
udm:
|
||||
sbi:
|
||||
- addr: 127.0.0.6
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Client>>
|
||||
#
|
||||
# o SBI Client(http://127.0.0.1:7777)
|
||||
# sbi:
|
||||
# addr: 127.0.0.1
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Client(https://127.0.0.1:443, http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Client(http://[fe80::1%@loopback_devname@]:80)
|
||||
# If prefer_ipv4 is true, http://127.0.0.1:80 is selected.
|
||||
#
|
||||
# sbi:
|
||||
# addr:
|
||||
# - 127.0.0.1
|
||||
# - fe80::1%@loopback_devname@
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per AMF
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
time:
|
||||
181
configs/open5gs/udr.yaml.in
Normal file
181
configs/open5gs/udr.yaml.in
Normal file
@@ -0,0 +1,181 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,pfcp,fd,gtp,udr,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/udr.log
|
||||
#
|
||||
# udr:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:80)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: udr.key
|
||||
# pem: udr.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.7:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.7
|
||||
# tls:
|
||||
# key: udr.key
|
||||
# pem: udr.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://udr.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: udr.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.7:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.7
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.7
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Client>>
|
||||
#
|
||||
# o SBI Client(http://127.0.0.1:7777)
|
||||
# sbi:
|
||||
# addr: 127.0.0.1
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Client(https://127.0.0.1:443, http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.1
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Client(http://[fe80::1%@loopback_devname@]:80)
|
||||
# If prefer_ipv4 is true, http://127.0.0.1:80 is selected.
|
||||
#
|
||||
# sbi:
|
||||
# addr:
|
||||
# - 127.0.0.1
|
||||
# - fe80::1%@loopback_devname@
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per AMF
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
time:
|
||||
145
configs/open5gs/upf.yaml.in
Normal file
145
configs/open5gs/upf.yaml.in
Normal file
@@ -0,0 +1,145 @@
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,pfcp,gtp,upf,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/upf.log
|
||||
|
||||
#
|
||||
# upf:
|
||||
#
|
||||
# <PFCP Server>
|
||||
#
|
||||
# o PFCP Server(127.0.0.4:8805)
|
||||
# pfcp:
|
||||
# addr: 127.0.0.4
|
||||
#
|
||||
# <GTP-U Server>>
|
||||
#
|
||||
# o GTP-U Server(127.0.0.4:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# - addr:
|
||||
# - 127.0.0.4
|
||||
# - ::1
|
||||
#
|
||||
# o Same configuration(127.0.0.4:2152, [::1]:2152) as below.
|
||||
# gtpu:
|
||||
# name: localhost
|
||||
#
|
||||
# o User Plane IP Resource information
|
||||
# gtpu:
|
||||
# - addr:
|
||||
# - 127.0.0.4
|
||||
# - ::1
|
||||
# teid_range_indication: 4
|
||||
# teid_range: 10
|
||||
# network_instance: internet
|
||||
# source_interface: 0
|
||||
# - addr: 127.0.10.4
|
||||
# teid_range_indication: 4
|
||||
# teid_range: 5
|
||||
# network_instance: ims
|
||||
# source_interface: 1
|
||||
#
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
gtpu:
|
||||
- addr:
|
||||
- 127.0.0.4
|
||||
- ::1
|
||||
pdn:
|
||||
|
||||
#
|
||||
# smf:
|
||||
#
|
||||
# <PFCP Client>>
|
||||
#
|
||||
# o PFCP Client(127.0.0.3:8805)
|
||||
#
|
||||
# pfcp:
|
||||
# addr: 127.0.0.3
|
||||
#
|
||||
smf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of gNB per AMF
|
||||
# gnb: 32
|
||||
# o Maximum Number of UE per gNB
|
||||
# ue: 128
|
||||
# o Maximum Number of NF Instance
|
||||
# nf: 512
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
#
|
||||
# - Pool-size 128 => 8192 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 8192
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
# o Memory of Packet Buffering in UPF/SGW
|
||||
# - Maximum Number of packet(SDU size = 8Kbytes) pool in UPF/SGW
|
||||
# - UPF/SGW Memory Usage : 65536 * 8Kbytes = 512Mbytes
|
||||
#
|
||||
# packet: 65536
|
||||
pool:
|
||||
@@ -94,7 +94,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
|
||||
@@ -99,7 +99,7 @@ pgw:
|
||||
gtpu:
|
||||
- addr: 127.0.0.3
|
||||
- addr: ::1
|
||||
ue_pool:
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
|
||||
48
debian/changelog
vendored
48
debian/changelog
vendored
@@ -1,3 +1,51 @@
|
||||
open5gs (1.3.0~eoan1) eoan; urgency=medium
|
||||
|
||||
* Release-16
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 10 Jul 2020 17:33:18 -0400
|
||||
|
||||
open5gs (1.3.0~focal1) focal; urgency=medium
|
||||
|
||||
* Release-16
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 10 Jul 2020 17:32:17 -0400
|
||||
|
||||
open5gs (1.3.0~bionic1) bionic; urgency=medium
|
||||
|
||||
* Release-16
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 10 Jul 2020 17:30:57 -0400
|
||||
|
||||
open5gs (1.3.0) unstable; urgency=medium
|
||||
|
||||
* Release-16
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 10 Jul 2020 17:29:33 -0400
|
||||
|
||||
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
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -17,6 +17,8 @@ Build-Depends: debhelper (>= 11),
|
||||
libbson-dev,
|
||||
libsctp-dev,
|
||||
libyaml-dev,
|
||||
libmicrohttpd-dev,
|
||||
libcurl4-gnutls-dev,
|
||||
Standards-Version: 4.3.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://open5gs.org
|
||||
|
||||
@@ -68,6 +68,7 @@ export DEBEMAIL='acetcom@gmail.com'
|
||||
|
||||
* Version Change
|
||||
$ vi meson.build
|
||||
$ ./misc/git-version-gen . > .tarball-version 2>/dev/null
|
||||
|
||||
* Upload OpenBuildService
|
||||
$ dch -i
|
||||
|
||||
@@ -5,7 +5,7 @@ FROM ${dist}:${tag}
|
||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
|
||||
|
||||
RUN yum -y install epel-release
|
||||
RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||
#RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||
RUN yum -y update
|
||||
|
||||
RUN yum -y install \
|
||||
@@ -15,6 +15,7 @@ RUN yum -y install \
|
||||
flex \
|
||||
bison \
|
||||
git \
|
||||
meson \
|
||||
lksctp-tools-devel \
|
||||
libidn-devel \
|
||||
gnutls-devel \
|
||||
@@ -22,7 +23,7 @@ RUN yum -y install \
|
||||
openssl-devel \
|
||||
cyrus-sasl-devel \
|
||||
libyaml-devel \
|
||||
iproute \
|
||||
mongo-c-driver-devel
|
||||
|
||||
RUN pip3 install --upgrade pip && pip install meson
|
||||
mongo-c-driver-devel \
|
||||
libmicrohttpd-devel \
|
||||
libcurl-devel \
|
||||
iproute
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
8
|
||||
@@ -9,6 +9,11 @@ RUN dnf -y install epel-release && \
|
||||
dnf config-manager --set-enabled PowerTools && \
|
||||
dnf -y update
|
||||
|
||||
RUN dnf -y install \
|
||||
https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm && \
|
||||
dnf config-manager --set-enabled elrepo-testing && \
|
||||
dnf -y update
|
||||
|
||||
RUN dnf -y install \
|
||||
python3 \
|
||||
ninja-build \
|
||||
@@ -23,7 +28,9 @@ RUN dnf -y install \
|
||||
openssl-devel \
|
||||
cyrus-sasl-devel \
|
||||
libyaml-devel \
|
||||
iproute \
|
||||
mongo-c-driver-devel
|
||||
mongo-c-driver-devel \
|
||||
libmicrohttpd-devel \
|
||||
libcurl-devel \
|
||||
iproute
|
||||
|
||||
RUN pip3 install --upgrade pip && pip install meson
|
||||
RUN dnf -y install meson
|
||||
1
docker/debian/buster
Symbolic link
1
docker/debian/buster
Symbolic link
@@ -0,0 +1 @@
|
||||
../ubuntu/latest
|
||||
@@ -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
docker/fedora/31
Symbolic link
1
docker/fedora/31
Symbolic link
@@ -0,0 +1 @@
|
||||
latest
|
||||
@@ -1 +0,0 @@
|
||||
30
|
||||
@@ -18,7 +18,9 @@ RUN dnf -y install \
|
||||
openssl-devel \
|
||||
cyrus-sasl-devel \
|
||||
libyaml-devel \
|
||||
iproute \
|
||||
mongo-c-driver-devel
|
||||
mongo-c-driver-devel \
|
||||
libmicrohttpd-devel \
|
||||
libcurl-devel \
|
||||
iproute
|
||||
|
||||
RUN pip3 install --upgrade pip && pip install meson
|
||||
RUN dnf -y install meson
|
||||
@@ -6,6 +6,7 @@ FROM ${username}/${dist}-${tag}-open5gs-base
|
||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
|
||||
|
||||
RUN dnf -y install \
|
||||
findutils \
|
||||
cscope \
|
||||
vim \
|
||||
sudo \
|
||||
1
docker/ubuntu/bionic
Symbolic link
1
docker/ubuntu/bionic
Symbolic link
@@ -0,0 +1 @@
|
||||
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 \
|
||||
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 \
|
||||
iproute2 \
|
||||
ca-certificates \
|
||||
netbase \
|
||||
pkg-config && \
|
||||
apt-get clean
|
||||
RUN python3 -m pip install meson
|
||||
@@ -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,6 +6,7 @@ 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 \
|
||||
@@ -15,6 +16,7 @@ RUN apt-get update && \
|
||||
flex \
|
||||
bison \
|
||||
git \
|
||||
meson \
|
||||
libsctp-dev \
|
||||
libgnutls28-dev \
|
||||
libgcrypt-dev \
|
||||
@@ -23,10 +25,10 @@ RUN apt-get update && \
|
||||
libmongoc-dev \
|
||||
libbson-dev \
|
||||
libyaml-dev \
|
||||
libmicrohttpd-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
iproute2 \
|
||||
ca-certificates \
|
||||
netbase \
|
||||
pkg-config && \
|
||||
apt-get clean
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
RUN python3 -m pip install meson
|
||||
@@ -1 +1 @@
|
||||
bionic
|
||||
latest
|
||||
@@ -16,8 +16,8 @@
|
||||
title: Open5GS
|
||||
email: acetcom@gmail.com
|
||||
description: >- # this means to ignore newlines until "baseurl:"
|
||||
An open source implementation of the Evolved Packet Core of LTE networks
|
||||
supporting 3GPP Release 14.
|
||||
Open5GS is a C-language Open Source implementation of 5GC and EPC,
|
||||
i.e. the core network of NR/LTE network (Release-16)
|
||||
baseurl: "/open5gs" # the subpath of your site, e.g. /blog
|
||||
url: "https://open5gs.org" # the base hostname & protocol for your site, e.g. http://example.com
|
||||
author: "Sukchan Lee"
|
||||
|
||||
@@ -8,6 +8,8 @@ title: Quickstart
|
||||
### Install Open5GS with a Package Manager
|
||||
---
|
||||
|
||||
#### Ubuntu
|
||||
|
||||
*Ubuntu* makes it easy to install Open5GS as shown below,
|
||||
|
||||
```bash
|
||||
@@ -18,45 +20,51 @@ $ sudo apt update
|
||||
$ sudo apt install open5gs
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
#### Debian
|
||||
|
||||
The Open5GS packages for Debian are available on [OBS](https://build.opensuse.org/project/show/home:acetcom:open5gs). If you want to use the latest Debian version like *Debian* 10(Buster), you need to install MongoDB first.
|
||||
|
||||
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 -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
|
||||
$ 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
|
||||
```
|
||||
|
||||
On *Debian* 10(buster), you can install Open5GS as shown below,
|
||||
|
||||
```bash
|
||||
$ wget -qO - https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10/Release.key | sudo apt-key add -
|
||||
$ 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 mongodb-org
|
||||
$ sudo apt install open5gs
|
||||
```
|
||||
|
||||
Other distributions can be installed by changing the path.
|
||||
|
||||
```
|
||||
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/
|
||||
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/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_10/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_Testing/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_Unstable/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Raspbian_10/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.04/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.10/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.04/
|
||||
```
|
||||
|
||||
Nightly package build are provided by [Osmocom](https://osmocom.org) on [OBS](https://build.opensuse.org/package/show/network:osmocom:nightly/open5gs).
|
||||
|
||||
```
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Testing/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Unstable/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Raspbian_10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.10/
|
||||
```
|
||||
|
||||
#### openSUSE
|
||||
|
||||
[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
|
||||
@@ -221,7 +229,7 @@ $ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
|
||||
How to remove Open5GS package:
|
||||
|
||||
1. On *Ubuntu*:
|
||||
1. On *Ubuntu/Debian*:
|
||||
|
||||
```bash
|
||||
$ sudo apt purge open5gs
|
||||
|
||||
@@ -40,13 +40,7 @@ $ sudo ip link set ogstun up
|
||||
Install the dependencies for building the source code.
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
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 libmicrohttpd-dev libcurl4-gnutls-dev meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
@@ -75,6 +69,7 @@ You need to perform the **installation process**.
|
||||
```bash
|
||||
$ cd build
|
||||
$ ninja install
|
||||
$ cd ../
|
||||
```
|
||||
|
||||
### Configure Open5GS
|
||||
@@ -137,8 +132,31 @@ If you modify the config files while Open5GS daemons are running, please restart
|
||||
### Running Open5GS
|
||||
---
|
||||
|
||||
Specify the absolute path to the sharead library as follows.
|
||||
|
||||
```bash
|
||||
$ cd install
|
||||
$ echo $(cd $(dirname ./install/lib/x86_64-linux-gnu/) && pwd -P)/$(basename ./install/lib/x86_64-linux-gnu/)
|
||||
/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ export LD_LIBRARY_PATH=/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ ldd ./install/bin/open5gs-mmed
|
||||
...
|
||||
libogsapp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsapp.so.1 (0x00007f161ab51000)
|
||||
libogscore.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogscore.so.1 (0x00007f161a922000)
|
||||
libogssctp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogssctp.so.1 (0x00007f161a71d000)
|
||||
libogss1ap.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogss1ap.so.1 (0x00007f161a519000)
|
||||
...
|
||||
```
|
||||
|
||||
If you want to set the shared library path permanently, you can use ldconfig.
|
||||
```bash
|
||||
$ sudo sh -c "echo /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/open5gs.conf"
|
||||
$ sudo ldconfig
|
||||
```
|
||||
|
||||
Now let's get started.
|
||||
|
||||
```bash
|
||||
$ cd install/bin/
|
||||
$ ./open5gs-pcrfd
|
||||
Open5GS daemon v1.0.0
|
||||
|
||||
@@ -203,6 +221,10 @@ 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 the WebUI of Open5GS
|
||||
---
|
||||
|
||||
426
docs/_docs/new/02-installing-5g-core.md
Normal file
426
docs/_docs/new/02-installing-5g-core.md
Normal file
@@ -0,0 +1,426 @@
|
||||
---
|
||||
title: Installing 5G Core from Sources
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
This post explains how to compile and install the source code on **Debian/Ubuntu** based Linux Distribution.
|
||||
{: .blue}
|
||||
|
||||
### Getting MongoDB
|
||||
---
|
||||
|
||||
Install MongoDB with package manager. It is used as database for the UDR.
|
||||
|
||||
```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 (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 10.45.0.1/16 dev ogstun
|
||||
$ sudo ip addr add cafe::1/64 dev ogstun
|
||||
$ sudo ip link set ogstun up
|
||||
```
|
||||
|
||||
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/master/misc/netconf.sh) makes it easy to configure the TUN device as follows:
|
||||
`$ sudo ./misc/netconf.sh`
|
||||
{: .notice--info}
|
||||
|
||||
### Building Open5GS
|
||||
---
|
||||
|
||||
Install the dependencies for building the source code.
|
||||
|
||||
```bash
|
||||
$ 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 libmicrohttpd-dev libcurl4-gnutls-dev meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/{{ site.github_username }}/open5gs
|
||||
```
|
||||
|
||||
To compile with meson:
|
||||
|
||||
```bash
|
||||
$ cd open5gs
|
||||
$ meson build --prefix=`pwd`/install
|
||||
$ ninja -C build
|
||||
```
|
||||
|
||||
Check whether the compilation is correct in your environment.
|
||||
```bash
|
||||
$ cd build
|
||||
$ ./tests/registration/registration
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `./test/registration/registration` with a tool that captures packets. If you are running `wireshark`, select the `any` interface and set FILTER to `ngap || http || pfcp || gtp`.
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
```bash
|
||||
$ cd build
|
||||
$ ninja install
|
||||
$ cd ../
|
||||
```
|
||||
|
||||
### Configure Open5GS
|
||||
---
|
||||
|
||||
Modify [install/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
|
||||
|
||||
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 NGAP connection of AMF to the gNB
|
||||
|
||||
```diff
|
||||
diff -u amf.yaml.old amf.yaml
|
||||
--- amf.yaml.old 2020-06-21 23:34:14.643114779 -0400
|
||||
+++ amf.yaml 2020-06-21 23:34:28.718482095 -0400
|
||||
@@ -67,25 +67,25 @@
|
||||
- addr: 127.0.0.2
|
||||
port: 7777
|
||||
ngap:
|
||||
+ - addr: 192.168.0.100
|
||||
guami:
|
||||
- plmn_id:
|
||||
- mcc: 001
|
||||
- mnc: 01
|
||||
+ mcc: 901
|
||||
+ mnc: 70
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
- mcc: 001
|
||||
- mnc: 01
|
||||
- tac: 1
|
||||
+ mcc: 901
|
||||
+ mnc: 70
|
||||
+ tac: 7
|
||||
plmn:
|
||||
- plmn_id:
|
||||
- mcc: 001
|
||||
- mnc: 01
|
||||
+ mcc: 901
|
||||
+ mnc: 70
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
- - sd: 2
|
||||
security:
|
||||
integrity_order : [ NIA1, NIA2, NIA0 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
```
|
||||
|
||||
Modify [install/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/upf.yaml.in) to set the GTP-U IP address.
|
||||
```diff
|
||||
diff -u upf.yaml.old upf.yaml
|
||||
--- upf.yaml.old 2020-06-21 23:35:54.378631781 -0400
|
||||
+++ upf.yaml 2020-06-21 23:36:02.978245251 -0400
|
||||
@@ -61,6 +61,7 @@
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
gtpu:
|
||||
+ - addr: 192.168.0.100
|
||||
pdn:
|
||||
```
|
||||
|
||||
If you modify the config files while Open5GS daemons are running, please restart them
|
||||
|
||||
|
||||
### Running Open5GS
|
||||
---
|
||||
|
||||
Specify the absolute path to the sharead library as follows.
|
||||
|
||||
```bash
|
||||
$ echo $(cd $(dirname ./install/lib/x86_64-linux-gnu/) && pwd -P)/$(basename ./install/lib/x86_64-linux-gnu/)
|
||||
/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ export LD_LIBRARY_PATH=/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ ldd ./install/bin/open5gs-amfd
|
||||
...
|
||||
libogsapp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsapp.so.1 (0x00007f161ab51000)
|
||||
libogscore.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogscore.so.1 (0x00007f161a922000)
|
||||
libogssctp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogssctp.so.1 (0x00007f161a71d000)
|
||||
libogss1ap.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogss1ap.so.1 (0x00007f161a519000)
|
||||
...
|
||||
```
|
||||
|
||||
If you want to set the shared library path permanently, you can use ldconfig.
|
||||
```bash
|
||||
$ sudo sh -c "echo /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/open5gs.conf"
|
||||
$ sudo ldconfig
|
||||
```
|
||||
|
||||
Now let's get started.
|
||||
|
||||
```bash
|
||||
$ cd install/bin/
|
||||
$ ./install/bin/open5gs-nrfd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:37:46.749: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/nrf.yaml' (../src/main.c:54)
|
||||
06/21 23:37:46.749: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/nrf.log' (../src/main.c:57)
|
||||
06/21 23:37:46.749: [app] INFO: NRF initialize...done (../src/nrf/app.c:31)
|
||||
06/21 23:37:46.749: [sbi] INFO: sbi_server() [127.0.0.1]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:37:46.749: [sbi] INFO: sbi_server() [::1]:7777 (../lib/sbi/server.c:291
|
||||
|
||||
|
||||
$ ./install/bin/open5gs-amfd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:38:15.834: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/amf.yaml' (../src/main.c:54)
|
||||
06/21 23:38:15.834: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/amf.log' (../src/main.c:57)
|
||||
06/21 23:38:15.876: [app] INFO: AMF initialize...done (../src/amf/app.c:33)
|
||||
06/21 23:38:15.876: [sbi] INFO: sbi_server() [127.0.0.2]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:38:15.877: [amf] INFO: ngap_server() [192.168.0.11]:38412 (../src/amf/ngap-sctp.c:56)
|
||||
06/21 23:38:15.877: [amf] INFO: ngap_server() [172.19.0.1]:38412 (../src/amf/ngap-sctp.c:56)
|
||||
06/21 23:38:15.877: [amf] INFO: ngap_server() [172.17.0.1]:38412 (../src/amf/ngap-sctp.c:56)
|
||||
06/21 23:38:15.877: [amf] INFO: ngap_server() [2601:144:4100:a220:ee:f149:8f28:9572]:38412 (../src/amf/ngap-sctp.c:56)
|
||||
06/21 23:38:15.877: [amf] INFO: ngap_server() [2601:144:4100:a220:c643:4b3a:b0ee:c446]:38412 (../src/amf/ngap-sctp.c:56)
|
||||
06/21 23:38:15.877: [amf] INFO: [ce785804-b439-41ea-9c93-399fce5a75a5] NF registered (../src/amf/nf-sm.c:209)
|
||||
|
||||
$ ./install/bin/open5gs-smfd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:38:35.313: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/smf.yaml' (../src/main.c:54)
|
||||
06/21 23:38:35.313: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/smf.log' (../src/main.c:57)
|
||||
06/21 23:38:35.350: [gtp] INFO: gtp_server() [127.0.0.3]:2123 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:35.350: [gtp] INFO: gtp_server() [::1]:2123 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:35.350: [app] INFO: SMF initialize...done (../src/smf/app.c:31)
|
||||
06/21 23:38:35.350: [pfcp] INFO: pfcp_server() [127.0.0.3]:8805 (../lib/pfcp/path.c:32)
|
||||
06/21 23:38:35.350: [pfcp] INFO: pfcp_server() [::1]:8805 (../lib/pfcp/path.c:32)
|
||||
06/21 23:38:35.350: [pfcp] INFO: ogs_pfcp_connect() [127.0.0.4]:8805 (../lib/pfcp/path.c:60)
|
||||
06/21 23:38:35.351: [sbi] INFO: sbi_server() [127.0.0.3]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:38:35.352: [smf] INFO: [da15f3e2-b439-41ea-bd58-c3fe61467c94] NF registered (../src/smf/nf-sm.c:210)
|
||||
|
||||
$ ./install/bin/open5gs-upfd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:38:52.832: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/upf.yaml' (../src/main.c:54)
|
||||
06/21 23:38:52.832: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/upf.log' (../src/main.c:57)
|
||||
06/21 23:38:52.844: [app] INFO: UPF initialize...done (../src/upf/app.c:31)
|
||||
06/21 23:38:52.844: [pfcp] INFO: pfcp_server() [127.0.0.4]:8805 (../lib/pfcp/path.c:32)
|
||||
06/21 23:38:52.844: [pfcp] INFO: ogs_pfcp_connect() [127.0.0.3]:8805 (../lib/pfcp/path.c:60)
|
||||
06/21 23:38:52.846: [gtp] INFO: gtp_server() [192.168.0.11]:2152 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:52.846: [gtp] INFO: gtp_server() [172.19.0.1]:2152 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:52.846: [gtp] INFO: gtp_server() [172.17.0.1]:2152 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:52.846: [gtp] INFO: gtp_server() [2601:144:4100:a220:ee:f149:8f28:9572]:2152 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:52.846: [gtp] INFO: gtp_server() [2601:144:4100:a220:c643:4b3a:b0ee:c446]:2152 (../lib/gtp/path.c:32)
|
||||
06/21 23:38:52.848: [upf] INFO: PFCP associated (../src/upf/pfcp-sm.c:171)
|
||||
06/21 23:38:53.358: [upf] WARNING: PFCP[REQ] has already been associated (../src/upf/pfcp-sm.c:201)
|
||||
|
||||
$ ./install/bin/open5gs-ausfd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:39:11.641: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/ausf.yaml' (../src/main.c:54)
|
||||
06/21 23:39:11.641: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/ausf.log' (../src/main.c:57)
|
||||
06/21 23:39:11.641: [app] INFO: AUSF initialize...done (../src/ausf/app.c:31)
|
||||
06/21 23:39:11.642: [sbi] INFO: sbi_server() [127.0.0.5]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:39:11.643: [ausf] INFO: [efbbbe5c-b439-41ea-b95c-039d7a609671] NF registered (../src/ausf/nf-sm.c:209)
|
||||
|
||||
$ ./install/bin/open5gs-udmd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:39:28.792: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/udm.yaml' (../src/main.c:54)
|
||||
06/21 23:39:28.792: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/udm.log' (../src/main.c:57)
|
||||
06/21 23:39:28.792: [app] INFO: UDM initialize...done (../src/udm/app.c:31)
|
||||
06/21 23:39:28.793: [sbi] INFO: sbi_server() [127.0.0.6]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:39:29.390: [udm] INFO: [f9f4ce22-b439-41ea-bf29-c309f36c787f] NF registered (../src/udm/nf-sm.c:209)
|
||||
|
||||
$ ./install/bin/open5gs-udrd
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:39:41.763: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/udr.yaml' (../src/main.c:54)
|
||||
06/21 23:39:41.763: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/udr.log' (../src/main.c:57)
|
||||
06/21 23:39:41.765: [dbi] INFO: MongoDB URI: 'mongodb://localhost/open5gs' (../lib/dbi/ogs-mongoc.c:99)
|
||||
06/21 23:39:41.765: [app] INFO: UDR initialize...done (../src/udr/app.c:31)
|
||||
06/21 23:39:41.765: [sbi] INFO: sbi_server() [127.0.0.7]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:39:41.767: [udr] INFO: [01b0191e-b43a-41ea-9abb-df3b42196e0a] NF registered (../src/udr/nf-sm.c:209)
|
||||
|
||||
```
|
||||
|
||||
Several command line options are provided.
|
||||
|
||||
```bash
|
||||
$ ./install/bin/open5gs-amfd -h
|
||||
Usage: ./install/bin/open5gs-amfd [options]
|
||||
Options:
|
||||
-c filename : set configuration file
|
||||
-l filename : set logging file
|
||||
-e level : set global log-level (default:info)
|
||||
-m domain : set log-domain (e.g. mme:sgw:gtp)
|
||||
-d : print lots of debugging information
|
||||
-t : print tracing information for developer
|
||||
-D : start as a daemon
|
||||
-v : show version number and exit
|
||||
-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/
|
||||
```
|
||||
|
||||
For convenience, you can execute all NFs at once by using the following command.
|
||||
```bash
|
||||
$ cd build
|
||||
$ vi configs/5gc.yaml ## check the configuration
|
||||
$ ./test/app/5gc ## run all NFs
|
||||
```
|
||||
|
||||
### Building the WebUI of Open5GS
|
||||
---
|
||||
|
||||
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
|
||||
|
||||
```bash
|
||||
$ sudo apt install curl
|
||||
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||
$ sudo apt install nodejs
|
||||
```
|
||||
|
||||
Install the dependencies to run WebUI
|
||||
|
||||
```bash
|
||||
$ cd webui
|
||||
$ npm install
|
||||
```
|
||||
|
||||
The WebUI runs as an [npm](https://www.npmjs.com/) script.
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
### Register Subscriber Information
|
||||
---
|
||||
|
||||
Connect to `http://localhost:3000` and login with **admin** account.
|
||||
|
||||
> Username : admin
|
||||
> Password : 1423
|
||||
|
||||
**Note:**
|
||||
You can change the password in _Account_ Menu.
|
||||
{: .notice--info}
|
||||
|
||||
To add subscriber information, you can do WebUI operations in the following order:
|
||||
|
||||
1. Go to `Subscriber` Menu.
|
||||
2. Click `+` Button to add a new subscriber.
|
||||
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 restarting any daemon.
|
||||
{: .notice--warning}
|
||||
|
||||
### IP routing + NAT for UE internet connectivity
|
||||
---
|
||||
|
||||
To allow your phones to connect to the internet, you must run the following command on the host running Open5GS-PGW:
|
||||
|
||||
```bash
|
||||
### Check IP Table 'forward'
|
||||
$ 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 IP Table 'nat'
|
||||
$ 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
|
||||
```
|
||||
|
||||
**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 gNB and Phone
|
||||
---
|
||||
|
||||
- You can view the log at `$INSTALL_PREFIX/var/log/open5gs/*.log`.
|
||||
|
||||
### Troubleshooting
|
||||
---
|
||||
|
||||
If you run into any problems, please post the github issue. Providing packets using wireshark can help a lot.
|
||||
{: .blue}
|
||||
|
||||
To fix the problem yourself, debugging tools can help you troubleshoot problems.
|
||||
|
||||
- [GDB](https://www.gnu.org/software/gdb/) can be used as below:
|
||||
|
||||
```bash
|
||||
$ gdb ./open5gs-amfd
|
||||
```
|
||||
|
||||
- On *Mac OS X*, you can use the [LLDB](https://lldb.llvm.org/).
|
||||
|
||||
```bash
|
||||
$ lldb ./open5gs-amfd
|
||||
```
|
||||
|
||||
You can use the command line option[`-d`] to record more logs.
|
||||
|
||||
```bash
|
||||
$ ./test/app/5gc -d
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:44:54.500: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/build/configs/5gc.yaml' (../src/main.c:54)
|
||||
06/21 23:44:54.500: [thread] DEBUG: [0x7f3342a7d018] worker signal (../lib/core/ogs-thread.c:66)
|
||||
06/21 23:44:54.500: [thread] DEBUG: [0x7f3342a7d018] thread started (../lib/core/ogs-thread.c:101)
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:44:54.508: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/build/configs/5gc.yaml' (../src/main.c:54)
|
||||
06/21 23:44:54.508: [thread] DEBUG: [0x7f31d3620818] worker signal (../lib/core/ogs-thread.c:66)
|
||||
06/21 23:44:54.508: [nrf] DEBUG: nrf_state_initial(): INIT (../src/nrf/nrf-sm.c:25)
|
||||
06/21 23:44:54.508: [nrf] DEBUG: nrf_state_operational(): ENTRY (../src/nrf/nrf-sm.c:50)
|
||||
06/21 23:44:54.508: [thread] DEBUG: [0x7f31d3620818] thread started (../lib/core/ogs-thread.c:101)
|
||||
06/21 23:44:54.508: [app] INFO: NRF initialize...done (../src/nrf/app.c:31)
|
||||
06/21 23:44:54.509: [sbi] INFO: sbi_server() [127.0.0.1]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:44:54.509: [sbi] INFO: sbi_server() [::1]:7777 (../lib/sbi/server.c:291)
|
||||
06/21 23:44:54.551: [thread] DEBUG: [0x7f3342a7d098] worker signal (../lib/core/ogs-thread.c:66)
|
||||
06/21 23:44:54.551: [thread] DEBUG: [0x7f3342a7d098] thread started (../lib/core/ogs-thread.c:101)
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:44:54.575: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/build/configs/5gc.yaml' (../src/main.c:54)
|
||||
06/21 23:44:54.601: [thread] DEBUG: [0x7f3342a7d118] worker signal (../lib/core/ogs-thread.c:66)
|
||||
06/21 23:44:54.601: [thread] DEBUG: [0x7f3342a7d118] thread started (../lib/core/ogs-thread.c:101)
|
||||
Open5GS daemon v1.3.0
|
||||
|
||||
06/21 23:44:54.607: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/build/configs/5gc.yaml' (../src/main.c:54)
|
||||
06/21 23:44:54.608: [thread] DEBUG: [0x7f996e1b2918] worker signal (../lib/core/ogs-thread.c:66)
|
||||
06/21 23:44:54.608: [ausf] DEBUG: ausf_state_initial(): INIT (../src/ausf/ausf-sm.c:25)
|
||||
```
|
||||
@@ -23,8 +23,13 @@ EOF'
|
||||
|
||||
Install MongoDB with Package Manager.
|
||||
```bash
|
||||
sudo yum -y install mongodb-org
|
||||
sudo systemctl start mongod (if '/usr/bin/mongod' is not running)
|
||||
sudo dnf -y install mongodb-org
|
||||
```
|
||||
|
||||
Run MongoDB server.
|
||||
```bash
|
||||
$ mkdir -p ./data/db
|
||||
$ mongod --dbpath ./data/db
|
||||
```
|
||||
|
||||
### Setting up TUN device (No persistent after rebooting)
|
||||
@@ -85,15 +90,21 @@ $ sudo dnf config-manager --set-enabled PowerTools
|
||||
$ sudo update
|
||||
```
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
Configure ELRepo(with testing) package.
|
||||
```bash
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel iproute mongo-c-driver-devel
|
||||
$ sudo dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
|
||||
$ sudo dnf config-manager --set-enabled elrepo-testing
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
Install Meson using Python.
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ sudo pip3 install --upgrade pip
|
||||
$ sudo pip install meson
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel iproute
|
||||
```
|
||||
|
||||
Install Meson
|
||||
```bash
|
||||
$ sudo dnf install meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Fedora
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
This guide is based on **Fedora 30** Distribution.
|
||||
This guide is based on **Fedora 31** Distribution.
|
||||
{: .blue}
|
||||
|
||||
### Getting MongoDB
|
||||
@@ -67,13 +67,12 @@ $ ip link show
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel iproute mongo-c-driver-devel
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel iproute
|
||||
```
|
||||
|
||||
Install Meson using Python.
|
||||
Install Meson
|
||||
```bash
|
||||
$ sudo pip3 install --upgrade pip
|
||||
$ sudo pip install meson
|
||||
$ sudo dnf install meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
|
||||
@@ -45,7 +45,7 @@ $ sudo sysctl -w net.inet.ip.forwarding=1
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ sudo pkg install py36-pip ninja gcc bison gsed pkgconf git mongo-c-driver gnutls libgcrypt libidn libyaml
|
||||
$ sudo pkg install py36-pip ninja gcc bison gsed pkgconf git mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd curl
|
||||
```
|
||||
|
||||
Install Meson using Python.
|
||||
|
||||
@@ -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)
|
||||
---
|
||||
|
||||
@@ -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 libmicrohttpd curl pkg-config
|
||||
```
|
||||
|
||||
Install Meson using Homebrew.
|
||||
|
||||
@@ -11,10 +11,10 @@ Sometimes you may get a message like the one below due to a problem with the fre
|
||||
$ meson test
|
||||
|
||||
...
|
||||
5/8 open5gs:system / simple OK 7.69 s
|
||||
5/8 open5gs:epc / simple OK 7.69 s
|
||||
|
||||
--- command ---
|
||||
08:06:23 /home/parallels/open5gs/build/tests/simple/simple
|
||||
08:06:23 /home/parallels/open5gs/build/tests/epc/simple
|
||||
--- stdout ---
|
||||
s1setup-test : SUCCESS
|
||||
attach-test : SUCCESS
|
||||
@@ -123,10 +123,10 @@ ninja: no work to do.
|
||||
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
|
||||
5/8 open5gs:epc / simple OK 5.07 s
|
||||
6/8 open5gs:epc / mnc3 OK 1.18 s
|
||||
7/8 open5gs:epc / volte OK 2.99 s
|
||||
8/8 open5gs:epc / csfb OK 6.53 s
|
||||
|
||||
Ok: 8
|
||||
Expected Fail: 0
|
||||
@@ -385,17 +385,17 @@ You can start MongoDB using systemctl.
|
||||
$ sudo systemctl start mongodb
|
||||
```
|
||||
|
||||
#### I have some error when running `./build/test/simple/simple`
|
||||
#### I have some error when running `./build/test/epc/simple`
|
||||
|
||||
Did you see the following error after executing `./build/test/simple/simple`?
|
||||
Did you see the following error after executing `./build/test/epc/simple`?
|
||||
```bash
|
||||
$ ./build/test/simple/simple
|
||||
$ ./build/test/epc/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]
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/test/.libs/simple(+0x92121)[0x55dc9e274121]
|
||||
/home/acetcom/Documents/git/open5gs/open5gs/test/.libs/simple(+0x4f5b9)[0x55dc9e2315b9]
|
||||
```
|
||||
|
||||
|
||||
@@ -415,9 +415,9 @@ $ sudo pkill -9 simple
|
||||
$ sudo pkill -9 open5gs-mmed ...
|
||||
```
|
||||
|
||||
Execute `./build/test/simple/simple`
|
||||
Execute `./build/test/epc/simple`
|
||||
```bash
|
||||
$ ./build/test/simple/simple
|
||||
$ ./build/test/epc/simple
|
||||
```
|
||||
|
||||
#### My eNB does not support IPv6.
|
||||
|
||||
@@ -35,7 +35,7 @@ If you want to use GPS antenna, setup your devices in the following order:
|
||||
{: .notice--warning}
|
||||
|
||||
Then, setup the USRP B200/B210 as below:
|
||||
1. **4x Small Antennas** should be connected to USRP Rx/Tx ports (RF-A/RF-B)
|
||||
1. **Small Antennas** should be connected to USRP Rx/Tx ports (RF-A/RF-B)
|
||||
2. USRP powered via power supply or over **USB 3.0**
|
||||
3. USRP **USB 3.0** port connected to your PC
|
||||
|
||||
@@ -142,13 +142,16 @@ $ sudo apt install cmake libfftw3-dev libmbedtls-dev libboost-program-options-de
|
||||
Download and build srsLTE:
|
||||
|
||||
```bash
|
||||
➜ git git clone https://github.com/srsLTE/srsLTE.git
|
||||
➜ git cd srsLTE
|
||||
➜ srsLTE git:(master) ✗ mkdir build
|
||||
➜ srsLTE git:(master) ✗ cd build
|
||||
➜ build git:(master) ✗ cmake ../
|
||||
➜ build git:(master) ✗ make
|
||||
➜ build git:(master) ✗ make test
|
||||
$ git clone https://github.com/srsLTE/srsLTE.git
|
||||
$ cd srsLTE
|
||||
$ git checkout release_19_12
|
||||
$ git rev-parse HEAD
|
||||
d045213fb9cbf98c83c06d7c17197a9dcbfddacf
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ../
|
||||
$ make
|
||||
$ make test
|
||||
```
|
||||
|
||||
#### 3. Open5GS
|
||||
@@ -172,7 +175,7 @@ The following shows how to install the Web UI of Open5GS.
|
||||
```bash
|
||||
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||
$ sudo apt install nodejs
|
||||
$ curl -sL http://open5gs.org/static/webui/install | sudo -E bash -
|
||||
$ curl -sL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
|
||||
```
|
||||
|
||||
### Configuration & Running
|
||||
@@ -325,10 +328,10 @@ $ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
Change back to the srsENB source directory and copy the main config example as well as all additional config files for RR, SIB and DRB.
|
||||
|
||||
```bash
|
||||
➜ srsLTE git:(master) ✗ cp srsenb/enb.conf.example srsenb/enb.conf
|
||||
➜ srsLTE git:(master) ✗ cp srsenb/rr.conf.example srsenb/rr.conf
|
||||
➜ srsLTE git:(master) ✗ cp srsenb/sib.conf.example srsenb/sib.conf
|
||||
➜ srsLTE git:(master) ✗ cp srsenb/drb.conf.example srsenb/drb.conf
|
||||
$ cp srsenb/enb.conf.example srsenb/enb.conf
|
||||
$ cp srsenb/rr.conf.example srsenb/rr.conf
|
||||
$ cp srsenb/sib.conf.example srsenb/sib.conf
|
||||
$ cp srsenb/drb.conf.example srsenb/drb.conf
|
||||
```
|
||||
|
||||
You should check your phone frequency. If your phone does not support Band-3, you should use a different DL EARFCN value.
|
||||
@@ -383,52 +386,26 @@ If you do not use the GPS-DO, you should use:
|
||||
Now, run the srsENB as follows:
|
||||
|
||||
```bash
|
||||
➜ srsLTE git:(master) ✗ cd srsenb/
|
||||
➜ srsenb git:(master) ✗ sudo ../build/srsenb/src/srsenb ./enb.conf
|
||||
linux; GNU C++ version 6.2.0 20161027; Boost_106200; UHD_003.009.005-0-unknow
|
||||
$ cd srsenb/
|
||||
$ sudo ../build/srsenb/src/srsenb ./enb.conf
|
||||
|
||||
Built in Release mode using commit d045213fb on branch HEAD.
|
||||
|
||||
--- Software Radio Systems LTE eNodeB ---
|
||||
|
||||
Reading configuration file ./enb.conf...
|
||||
-- Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex...
|
||||
Opening USRP with args: "",master_clock_rate=30.72e6
|
||||
-- Detected Device: B200
|
||||
-- Loading FPGA image: /usr/share/uhd/images/usrp_b200_fpga.bin... done
|
||||
-- Operating over 'USB 2'.
|
||||
-- Detecting internal GPSDO.... 'No GPSDO found'
|
||||
-- Initialize CODEC control...
|
||||
-- Initialize Radio control...
|
||||
-- Performing register loopback test... pass
|
||||
-- Performing CODEC loopback test... pass
|
||||
-- Asking for clock rate 30.720000 MHz...
|
||||
-- Actually got clock rate 30.720000 MHz.
|
||||
-- Performing timer loopback test... pass
|
||||
Setting frequency: DL=1845.0 Mhz, UL=1750.0 MHz
|
||||
Setting Sampling frequency 11.52 MHz
|
||||
|
||||
==== eNodeB started ===
|
||||
Type <t> to view trace
|
||||
```
|
||||
If you see the `No GPSDO found`, please exit the program with Ctrl-C.
|
||||
And also, if you see the `USB 2`, it will not be working properly.
|
||||
|
||||
The following console output is the correct result of srsENB.
|
||||
```bash
|
||||
linux; GNU C++ version 6.2.0 20161027; Boost_106200; UHD_003.009.005-0-unknow
|
||||
|
||||
--- Software Radio Systems LTE eNodeB ---
|
||||
|
||||
Reading configuration file ./enb.conf...
|
||||
Opening USRP with args: "",master_clock_rate=30.72e6
|
||||
-- Detected Device: B200
|
||||
-- Operating over USB 3.
|
||||
-- Initialize CODEC control...
|
||||
-- Initialize Radio control...
|
||||
-- Performing register loopback test... pass
|
||||
-- Performing CODEC loopback test... pass
|
||||
-- Asking for clock rate 30.720000 MHz...
|
||||
-- Actually got clock rate 30.720000 MHz.
|
||||
-- Performing timer loopback test... pass
|
||||
Opening 1 RF devices with 1 RF channels...
|
||||
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501; UHD_3.14.1.1-release
|
||||
[INFO] [LOGGING] Fastpath logging disabled at runtime.
|
||||
Opening USRP with args: type=b200,master_clock_rate=23.04e6
|
||||
[INFO] [B200] Detected Device: B200
|
||||
[INFO] [B200] Operating over USB 3.
|
||||
[INFO] [B200] Initialize CODEC control...
|
||||
[INFO] [B200] Initialize Radio control...
|
||||
[INFO] [B200] Performing register loopback test...
|
||||
[INFO] [B200] Register loopback test passed
|
||||
[INFO] [B200] Asking for clock rate 23.040000 MHz...
|
||||
[INFO] [B200] Actually got clock rate 23.040000 MHz.
|
||||
Setting frequency: DL=1845.0 Mhz, UL=1750.0 MHz
|
||||
Setting Sampling frequency 11.52 MHz
|
||||
|
||||
|
||||
@@ -43,14 +43,14 @@ libssl-dev libcurl4-openssl-dev libxml2-dev libpcre3-dev bash-completion g++ aut
|
||||
libradcli4
|
||||
```
|
||||
|
||||
#### 4. Clone Kamailio repository and checkout 5.2 version of repository
|
||||
#### 4. Clone Kamailio repository and checkout 5.3 version of repository
|
||||
|
||||
```
|
||||
$ mkdir -p /usr/local/src/
|
||||
$ cd /usr/local/src/
|
||||
$ git clone https://github.com/herlesupreeth/kamailio
|
||||
$ cd kamailio
|
||||
$ git checkout -b 5.2 origin/5.2
|
||||
$ git checkout -b 5.3 origin/5.3
|
||||
```
|
||||
|
||||
#### 5. Generate build config files
|
||||
@@ -352,6 +352,10 @@ Save and exit
|
||||
|
||||
- Now try calling from either phone
|
||||
|
||||
|
||||
Upon completion of this test, set "Receive incoming calls" option to disabled state and set "Use SIP calling" to "Only for SIP calls"
|
||||
{: .notice--warning}
|
||||
|
||||
#### 13. Create new mysql database for pcscf, scscf and icscf, populate databases and grant permissions to respective users identified by a password
|
||||
|
||||
```
|
||||
@@ -700,7 +704,7 @@ $ echo 'del 1' > /proc/rtpengine/control
|
||||
$ /usr/sbin/rtpengine --table=1 --interface=10.4.128.21 --listen-ng=127.0.0.1:2224 --tos=184 --pidfile=ngcp-rtpengine-daemon2.pid --no-fallback --foreground
|
||||
```
|
||||
|
||||
#### 17. Running I-CSCF, P-CSCF and S-CSCF as separate `systemctl` process
|
||||
#### 17. Running I-CSCF, P-CSCF and S-CSCF as separate process
|
||||
|
||||
First, stop the default kamailio SIP server
|
||||
|
||||
@@ -710,74 +714,23 @@ $ systemctl disable kamailio
|
||||
$ systemctl mask kamailio
|
||||
```
|
||||
|
||||
Copy the init file each of the process you need
|
||||
Run all the process as root and NOT sudo
|
||||
{: .notice--info}
|
||||
|
||||
|
||||
```
|
||||
$ cp /etc/init.d/kamailio /etc/init.d/kamailio_icscf
|
||||
$ cp /etc/init.d/kamailio /etc/init.d/kamailio_pcscf
|
||||
$ cp /etc/init.d/kamailio /etc/init.d/kamailio_scscf
|
||||
```
|
||||
|
||||
Changes required in `/etc/init.d/kamailio_icscf`
|
||||
|
||||
```
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
|
||||
NAME="kamailio_icscf"
|
||||
CFGFILE=/etc/$NAME/kamailio_icscf.cfg
|
||||
```
|
||||
|
||||
Changes required in `/etc/init.d/kamailio_pcscf`
|
||||
|
||||
```
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
|
||||
NAME="kamailio_pcscf"
|
||||
CFGFILE=/etc/$NAME/kamailio_pcscf.cfg
|
||||
```
|
||||
|
||||
Changes required in `/etc/init.d/kamailio_scscf`
|
||||
|
||||
```
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
|
||||
NAME="kamailio_scscf"
|
||||
CFGFILE=/etc/$NAME/kamailio_scscf.cfg
|
||||
$ mkdir -p /var/run/kamailio_pcscf
|
||||
$ kamailio -f /etc/kamailio_pcscf/kamailio_pcscf.cfg -P /kamailio_pcscf.pid -DD -E -e
|
||||
```
|
||||
|
||||
```
|
||||
$ cd /etc/default/
|
||||
$ cp kamailio kamailio_icscf
|
||||
$ cp kamailio kamailio_pcscf
|
||||
$ cp kamailio kamailio_scscf
|
||||
$ mkdir -p /var/run/kamailio_scscf
|
||||
$ kamailio -f /etc/kamailio_scscf/kamailio_scscf.cfg -P /kamailio_scscf.pid -DD -E -e
|
||||
```
|
||||
|
||||
Changes required in `/etc/default/kamailio_icscf`
|
||||
|
||||
```
|
||||
CFGFILE=/etc/kamailio_icscf/kamailio_icscf.cfg
|
||||
|
||||
RUN_KAMAILIO=yes
|
||||
```
|
||||
|
||||
Changes required in `/etc/default/kamailio_pcscf`
|
||||
|
||||
```
|
||||
CFGFILE=/etc/kamailio_pcscf/kamailio_pcscf.cfg
|
||||
|
||||
RUN_KAMAILIO=yes
|
||||
```
|
||||
|
||||
Changes required in `/etc/default/kamailio_scscf`
|
||||
|
||||
```
|
||||
CFGFILE=/etc/kamailio_scscf/kamailio_scscf.cfg
|
||||
|
||||
RUN_KAMAILIO=yes
|
||||
```
|
||||
|
||||
Finally,
|
||||
|
||||
```
|
||||
$ systemctl daemon-reload
|
||||
$ systemctl start kamailio_icscf kamailio_pcscf kamailio_scscf
|
||||
$ mkdir -p /var/run/kamailio_icscf
|
||||
$ kamailio -f /etc/kamailio_icscf/kamailio_icscf.cfg -P /kamailio_icscf.pid -DD -E -e
|
||||
```
|
||||
|
||||
#### 18. Install Open5GS in the same machine as Kamailio IMS - Install Open5GS from source
|
||||
@@ -787,9 +740,6 @@ Please refer to instructions at [https://open5gs.org/open5gs/docs/guide/02-build
|
||||
If you are using OpenStack, installing Open5GS and Kamailio IMS on the same machine is very important because the **Framed-IP-Address** in the AAR request via Rx interface takes received IP address and port in ims_qos module, hence, if the Open5GS is on a separate VM/machine, the IP and port received in received_ip and received_port values seen by Kamailio IMS will be the NATed IP of the Open5GS machine resulting in failing of AAR request.
|
||||
{: .notice--danger}
|
||||
|
||||
I made some modifications in order to force UE to PS domain attach and use IPv4. You can refer to the **hacks** branch of [https://github.com/herlesupreeth/open5gs](https://github.com/herlesupreeth/open5gs)
|
||||
{: .notice--info}
|
||||
|
||||
Modify below mentioned parts of configuration files in addition to **Configure Open5GS** section. For reference, look at the configuration files at [https://github.com/herlesupreeth/Open5gs_Config](https://github.com/herlesupreeth/Open5gs_Config)
|
||||
{: .notice--warning}
|
||||
|
||||
|
||||
244
docs/_docs/tutorial/03-VoLTE-dockerized.md
Normal file
244
docs/_docs/tutorial/03-VoLTE-dockerized.md
Normal file
@@ -0,0 +1,244 @@
|
||||
---
|
||||
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 there is an NAT between PGW and P-CSCF, IPsec-NAT would not work, and the
|
||||
PCAP looks like the one below. N.B. that you need to run P-CSCF as root, in
|
||||
order to add xfrm state and policy.
|
||||
|
||||

|
||||
|
||||
|
||||
#### 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.
|
||||
|
||||
|
||||
#### 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)
|
||||
@@ -4,17 +4,17 @@ title: About
|
||||
permalink: /about/
|
||||
---
|
||||
|
||||
Open5GS is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network.
|
||||
Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core network of NR/LTE network.
|
||||
|
||||
#### Supported Features
|
||||
---
|
||||
|
||||
- LTE release 14 compliant
|
||||
- Release-16 compliant
|
||||
- AES, Snow3G, ZUC algorithms for encryption
|
||||
- Support of USIM cards using Milenage
|
||||
- Multiple PDN support
|
||||
- S1/X2 Handover
|
||||
- IPv6 support
|
||||
- Multiple PDU session resource(EPC only)
|
||||
- S1/X2 Handover(EPC only)
|
||||
- CSFB(Circuit Switched Fall Back) and SMSoS(SMS Over SGs)
|
||||
- VoLTE(Voice over LTE)
|
||||
|
||||
|
||||
30
docs/_pages/cla.md
Normal file
30
docs/_pages/cla.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
layout: page
|
||||
title: Contributor License Agreement
|
||||
permalink: /cla/
|
||||
---
|
||||
|
||||
### 1. What is a Copyright License Agreement (CLA) and why do I need one?
|
||||
|
||||
A Copyright License Agreement is a legal document in which you state you are entitled to contribute the code/documentation/translation to the project you’re contributing to and are willing to have it used in distributions and derivative works. This means that should there be any kind of legal issue in the future as to the origins and ownership of any particular piece of code, then that project has the necessary forms on file from the contributor(s) saying they were permitted to make this contribution.
|
||||
|
||||
The CLA also ensures that once you have provided a contribution, you cannot try to withdraw permission for its use at a later date. People and companies can therefore use that software, confident that they will not be asked to stop using pieces of the code at a later date.
|
||||
|
||||
The agreements used by the Open5GS project are standard documents provided by Project Harmony, a community-centered group focused on contributor agreements for free and open source software (FOSS). For more information, see [www.harmonyagreements.org](http://www.harmonyagreements.org).
|
||||
|
||||
|
||||
### 2. How do I complete and submit the CLA?
|
||||
|
||||
The Open5GS CLAs can be found as below.
|
||||
- [I am an individual]({{ site.url }}{{ site.baseurl }}/assets/cla/Open5GS-Individual.pdf)...(revision 2020-05-23)
|
||||
- [I am a legal entity (corporation)]({{ site.url }}{{ site.baseurl }}/assets/cla//Open5GS-Entity.pdf)...(revision 2020-05-23)
|
||||
|
||||
**(Email)** Download the appropriate CLA, then print, sign and scan the document before sending by email to [acetcom@gmail.com](mailto:acetcom@gmail.com).
|
||||
|
||||
**(Electronic submission)** If you're contributing through a pull request to Open5GS project on Github, please read its acceptance by going back to GitHub and accepting electronically.
|
||||
|
||||
### 3. How will my contributions to Open5GS be used?
|
||||
|
||||
Through the license agreements, we ask you to grant us permission to use your contributions within Open5GS and to continue to provide Open5GS under open-source and another licenses and within proprietary products. As we do not ask for copyright assignment, you retain complete ownership of your contributions and have the same rights to use or license those contributions which you would have had without entering into a license agreement.
|
||||
|
||||
If you have any questions about Open5GS licensing and contributions, please contact us at [acetcom@gmail.com](mailto:acetcom@gmail.com)
|
||||
@@ -5,6 +5,9 @@ permalink: /docs/
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
- What's New?
|
||||
- [Installing 5G Core](new/02-installing-5g-core)
|
||||
|
||||
- User's Guide
|
||||
- [Quickstart](guide/01-quickstart)
|
||||
- [Building Open5GS from Sources](guide/02-building-open5gs-from-sources)
|
||||
@@ -13,6 +16,7 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
- 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
|
||||
|
||||
@@ -7,7 +7,6 @@ permalink: /faq/
|
||||
#### What are the Open5GS license terms?
|
||||
|
||||
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.
|
||||
|
||||
#### Are there any companies providing commercial support for Open5GS?
|
||||
|
||||
|
||||
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 -0400
|
||||
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}
|
||||
33
docs/_posts/2020-04-26-release-v1.2.4.md
Normal file
33
docs/_posts/2020-04-26-release-v1.2.4.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "v1.2.4 - New package for Ubuntu 20.04(focal)"
|
||||
date: 2020-04-25 18:29:00 -0400
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### What's new?
|
||||
- Document for Dockerized VoLTE setup([#412](https://github.com/open5gs/open5gs/pull/412),[#413](https://github.com/open5gs/open5gs/pull/413),[#414](https://github.com/open5gs/open5gs/pull/414)) -- [miaoski](https://github.com/miaoski)
|
||||
- Binary package for Ubuntu 20.04(focal)
|
||||
|
||||
#### Enhancement
|
||||
- Handling forcing of IPv4 or IPv6 PDN connect based on HSS ([#415](https://github.com/open5gs/open5gs/pull/415)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
#### Bug Fixed
|
||||
- PGW segmentation faults on DeleteSessionRequest for unknown session([#417](https://github.com/open5gs/open5gs/issues/417)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- Fix the bug when only one DNS was configured([#404](https://github.com/open5gs/open5gs/issues/404)) -- [miaoski](https://github.com/miaoski)
|
||||
- PGW doesn't response to CreateSessionRequest on Diameter error from PCRF([#403](https://github.com/open5gs/open5gs/issues/403)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- PGW crashes without connection to PCRF([#402](https://github.com/open5gs/open5gs/issues/402)) -- [laf0rge](https://github.com/laf0rge)
|
||||
- SGW `selection_mode` crash ([#400](https://github.com/open5gs/open5gs/issues/400)) -- [kbarlee](https://github.com/kbarlee)
|
||||
- Change ULI as optional in P-GW([#399](https://github.com/open5gs/open5gs/issues/399)) -- [laf0rge](https://github.com/laf0rge)
|
||||
|
||||
#### Document
|
||||
- VoLTE Document improvement(Checkout Kamailio 5.3) ([#401](https://github.com/open5gs/open5gs/pull/401)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Building from sources improvement [nickvsnetworking](https://github.com/nickvsnetworking)
|
||||
|
||||
|
||||
Download -- [v1.2.4.tar.gz](https://github.com/open5gs/open5gs/archive/v1.2.4.tar.gz)
|
||||
{: .notice--info}
|
||||
43
docs/_posts/2020-07-10-release-v1.3.0.md
Normal file
43
docs/_posts/2020-07-10-release-v1.3.0.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: "v1.3.0 - Moving 5G Core"
|
||||
date: 2020-07-10 15:26:00 -0400
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### What's New?
|
||||
|
||||
The Open5GS project has implemented several NFs required for 5G Core(SA). Also, all messages have been changed to Release-16. Therefore, EPC can support NSA, ENDC, CUPS, etc.
|
||||
|
||||
However, the package contains only MME/SGW/PGW/HSS/PCRF. If the tests are fully verified, I will include other NFs in the package later. You'll need to compile the source code for the time being to use added features.
|
||||
- To use CUPS, you need to run NRF/SMF/UPF instead of PGW.
|
||||
- 5G Core installation is described separately in this [LINK](/open5gs/docs/new/02-installing-5g-core).
|
||||
|
||||
Next, I am considering the separation of SGW-C/SGW-U to implement full CUPS functionality. And, if I have more time, I would like to add NB-IoT function.
|
||||
|
||||
#### Enhancement
|
||||
- Select SGW/UPF ([#470](https://github.com/open5gs/open5gs/pull/470)) -- [kbarlee](https://github.com/kbarlee)
|
||||
- Add MSISDN IE to Create Session Request message ([#464](https://github.com/open5gs/open5gs/issues/464)) -- [Davied-Dh](https://github.com/Davied-Dh)
|
||||
- Add the modified Bearer level QoS if PCRF changes them ([#457](https://github.com/open5gs/open5gs/pull/457)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Adding MMEName to S1SetupResponse([#444](https://github.com/open5gs/open5gs/issues/444)) -- [Matheus-Garbelini](https://github.com/Matheus-Garbelini)
|
||||
|
||||
#### Bug Fixed
|
||||
- Remove assert for UEContextReleaseComplete ([#445](https://github.com/open5gs/open5gs/issues/445)) -- [Matheus-Garbelini](https://github.com/Matheus-Garbelini)
|
||||
- Undo the fix provided for converting Rx to Gx Flow Description ([#452](https://github.com/open5gs/open5gs/pull/452)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- Switch UL/DL Values in WebUI ([#450](https://github.com/open5gs/open5gs/pull/450)) -- [nickvsnetworking](https://github.com/nickvsnetworking)
|
||||
- SMF crash after unknown UPF peer tries to connect on N4 ([#437](https://github.com/open5gs/open5gs/issues/437)) -- [kbarlee](https://github.com/kbarlee)
|
||||
- eNB connection when maximum number of eNBs reached ([#423](https://github.com/open5gs/open5gs/pull/423)) -- [jamofer](https://github.com/jamofer)
|
||||
- PGW crashes if diameter pool is exhausted ([#420](https://github.com/open5gs/open5gs/issues/420)) -- [laf0rge](https://github.com/laf0rge)
|
||||
|
||||
#### Document
|
||||
- Update URL in WebUI installation document ([#495](https://github.com/open5gs/open5gs/issues/495)) -- [Mopoma95](https://github.com/Mopoma95)
|
||||
- Update VoLTE tutorial ([#459](https://github.com/open5gs/open5gs/pull/459)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- VoLTE Document improvement(IPsec works now) ([#424](https://github.com/open5gs/open5gs/pull/424)) -- [miaoski](https://github.com/miaoski)
|
||||
|
||||
|
||||
Download -- [v1.3.0.tar.gz](https://github.com/open5gs/open5gs/archive/v1.3.0.tar.gz)
|
||||
{: .notice--info}
|
||||
1078
docs/assets/cla/Open5GS-Entity.pdf
Normal file
1078
docs/assets/cla/Open5GS-Entity.pdf
Normal file
File diff suppressed because it is too large
Load Diff
1011
docs/assets/cla/Open5GS-Individual.pdf
Normal file
1011
docs/assets/cla/Open5GS-Individual.pdf
Normal file
File diff suppressed because it is too large
Load Diff
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.
@@ -10,7 +10,7 @@
|
||||
#
|
||||
|
||||
PACKAGE="open5gs"
|
||||
VERSION="1.2.0"
|
||||
VERSION="1.3.0"
|
||||
|
||||
print_status() {
|
||||
echo
|
||||
|
||||
@@ -57,6 +57,27 @@ void pgw_terminate(void);
|
||||
int pcrf_initialize(void);
|
||||
void pcrf_terminate(void);
|
||||
|
||||
int nrf_initialize(void);
|
||||
void nrf_terminate(void);
|
||||
|
||||
int udr_initialize(void);
|
||||
void udr_terminate(void);
|
||||
|
||||
int udm_initialize(void);
|
||||
void udm_terminate(void);
|
||||
|
||||
int ausf_initialize(void);
|
||||
void ausf_terminate(void);
|
||||
|
||||
int upf_initialize(void);
|
||||
void upf_terminate(void);
|
||||
|
||||
int smf_initialize(void);
|
||||
void smf_terminate(void);
|
||||
|
||||
int amf_initialize(void);
|
||||
void amf_terminate(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -137,12 +137,21 @@ static void recalculate_pool_size(void)
|
||||
#define MAX_NUM_OF_BEARER 4 /* Num of Bearer per APN(Session) */
|
||||
#define MAX_NUM_OF_TUNNEL 3 /* Num of Tunnel per Bearer */
|
||||
#define MAX_NUM_OF_PF 16 /* Num of PacketFilter per Bearer */
|
||||
#define MAX_NUM_OF_NF_SERVICE 16 /* Num of NF Service per NF Instance */
|
||||
#define MAX_NUM_OF_SBI_MESSAGE 8 /* Num of HTTP(s) Request/Response per NF */
|
||||
#define MAX_NUM_OF_NF_SUBSCRIPTION 4 /* Num of Subscription per NF */
|
||||
#define MAX_NUM_OF_AUTH 4 /* Num of Subscription per UE */
|
||||
|
||||
self.pool.ue = self.max.ue * self.max.enb;
|
||||
self.pool.ue = self.max.ue * self.max.gnb;
|
||||
self.pool.auth = self.pool.ue * MAX_NUM_OF_AUTH;
|
||||
self.pool.pfcp = ogs_max(self.max.smf, self.max.upf);
|
||||
self.pool.sess = self.pool.ue * OGS_MAX_NUM_OF_SESS;
|
||||
self.pool.bearer = self.pool.sess * MAX_NUM_OF_BEARER;
|
||||
self.pool.tunnel = self.pool.bearer * MAX_NUM_OF_TUNNEL;
|
||||
self.pool.pf = self.pool.bearer * MAX_NUM_OF_PF;
|
||||
self.pool.nf_service = self.max.nf * MAX_NUM_OF_NF_SERVICE;
|
||||
self.pool.sbi_message = self.max.nf * MAX_NUM_OF_SBI_MESSAGE;
|
||||
self.pool.nf_subscription = self.max.nf * MAX_NUM_OF_NF_SUBSCRIPTION;
|
||||
}
|
||||
|
||||
static int config_prepare(void)
|
||||
@@ -154,14 +163,22 @@ static int config_prepare(void)
|
||||
#define MAX_NUM_OF_PGW 32 /* Num of PGW per MME */
|
||||
#define MAX_NUM_OF_VLR 32 /* Num of VLR per MME */
|
||||
#define MAX_NUM_OF_CSMAP 128 /* Num of TAI-LAI MAP per MME */
|
||||
#define MAX_NUM_OF_ENB 32 /* Num of eNodeB per MME */
|
||||
#define MAX_NUM_OF_UE 128 /* Num of UE per eNodeB */
|
||||
|
||||
#define MAX_NUM_OF_UE 128 /* Num of UE per gNB */
|
||||
#define MAX_NUM_OF_SMF 32 /* Num of SMF per AMF */
|
||||
#define MAX_NUM_OF_UPF 32 /* Num of PGW per AMF */
|
||||
#define MAX_NUM_OF_GNB 32 /* Num of gNB per AMF */
|
||||
#define MAX_NUM_OF_NF 512 /* Num of NF Instance */
|
||||
self.max.sgw = MAX_NUM_OF_SGW;
|
||||
self.max.pgw = MAX_NUM_OF_PGW;
|
||||
self.max.vlr = MAX_NUM_OF_VLR;
|
||||
self.max.csmap = MAX_NUM_OF_CSMAP;
|
||||
self.max.enb = MAX_NUM_OF_ENB;
|
||||
|
||||
self.max.gnb = MAX_NUM_OF_GNB;
|
||||
self.max.ue = MAX_NUM_OF_UE;
|
||||
self.max.smf = MAX_NUM_OF_SMF;
|
||||
self.max.upf = MAX_NUM_OF_UPF;
|
||||
self.max.nf = MAX_NUM_OF_NF;
|
||||
|
||||
#define MAX_NUM_OF_PACKET_POOL 65536
|
||||
self.pool.packet = MAX_NUM_OF_PACKET_POOL;
|
||||
@@ -170,6 +187,10 @@ static int config_prepare(void)
|
||||
|
||||
recalculate_pool_size();
|
||||
|
||||
self.time.nf_instance.heartbeat = 10; /* 10 second */
|
||||
self.time.nf_instance.validity = 3600; /* 3600 seconds = 1 hour */
|
||||
self.time.subscription.validity = 86400; /* 86400 seconds = 1 day */
|
||||
|
||||
return OGS_OK;
|
||||
}
|
||||
|
||||
@@ -182,6 +203,15 @@ static int ogs_app_ctx_validation(void)
|
||||
return OGS_ERROR;
|
||||
}
|
||||
|
||||
if (self.time.nf_instance.validity == 0) {
|
||||
ogs_error("NF Instance validity-time should not 0");
|
||||
ogs_error("time:");
|
||||
ogs_error(" nf_instance:");
|
||||
ogs_error(" validity: 0");
|
||||
|
||||
return OGS_ERROR;
|
||||
}
|
||||
|
||||
return OGS_OK;
|
||||
}
|
||||
int ogs_config_parse()
|
||||
@@ -238,6 +268,27 @@ int ogs_config_parse()
|
||||
} else if (!strcmp(parameter_key, "no_pcrf")) {
|
||||
self.parameter.no_pcrf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_nrf")) {
|
||||
self.parameter.no_nrf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_amf")) {
|
||||
self.parameter.no_amf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_smf")) {
|
||||
self.parameter.no_smf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_upf")) {
|
||||
self.parameter.no_upf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_ausf")) {
|
||||
self.parameter.no_ausf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_udm")) {
|
||||
self.parameter.no_udm =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_udr")) {
|
||||
self.parameter.no_udr =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_ipv4")) {
|
||||
self.parameter.no_ipv4 =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
@@ -304,9 +355,13 @@ int ogs_config_parse()
|
||||
if (!strcmp(max_key, "ue")) {
|
||||
const char *v = ogs_yaml_iter_value(&max_iter);
|
||||
if (v) self.max.ue = atoi(v);
|
||||
} else if (!strcmp(max_key, "enb")) {
|
||||
} else if (!strcmp(max_key, "gnb") ||
|
||||
!strcmp(max_key, "enb")) {
|
||||
const char *v = ogs_yaml_iter_value(&max_iter);
|
||||
if (v) self.max.enb = atoi(v);
|
||||
if (v) self.max.gnb = atoi(v);
|
||||
} else if (!strcmp(max_key, "nf")) {
|
||||
const char *v = ogs_yaml_iter_value(&max_iter);
|
||||
if (v) self.max.nf = atoi(v);
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", max_key);
|
||||
}
|
||||
@@ -353,8 +408,49 @@ int ogs_config_parse()
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", pool_key);
|
||||
}
|
||||
}
|
||||
} else if (!strcmp(root_key, "time")) {
|
||||
ogs_yaml_iter_t time_iter;
|
||||
ogs_yaml_iter_recurse(&root_iter, &time_iter);
|
||||
while (ogs_yaml_iter_next(&time_iter)) {
|
||||
const char *time_key = ogs_yaml_iter_key(&time_iter);
|
||||
ogs_assert(time_key);
|
||||
if (!strcmp(time_key, "nf_instance")) {
|
||||
ogs_yaml_iter_t sbi_iter;
|
||||
ogs_yaml_iter_recurse(&time_iter, &sbi_iter);
|
||||
|
||||
while (ogs_yaml_iter_next(&sbi_iter)) {
|
||||
const char *sbi_key =
|
||||
ogs_yaml_iter_key(&sbi_iter);
|
||||
ogs_assert(sbi_key);
|
||||
|
||||
if (!strcmp(sbi_key, "heartbeat")) {
|
||||
const char *v = ogs_yaml_iter_value(&sbi_iter);
|
||||
if (v) self.time.nf_instance.heartbeat = atoi(v);
|
||||
} else if (!strcmp(sbi_key, "validity")) {
|
||||
const char *v = ogs_yaml_iter_value(&sbi_iter);
|
||||
if (v) self.time.nf_instance.validity = atoi(v);
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", sbi_key);
|
||||
}
|
||||
} else if (!strcmp(time_key, "subscription")) {
|
||||
ogs_yaml_iter_t sbi_iter;
|
||||
ogs_yaml_iter_recurse(&time_iter, &sbi_iter);
|
||||
|
||||
while (ogs_yaml_iter_next(&sbi_iter)) {
|
||||
const char *sbi_key =
|
||||
ogs_yaml_iter_key(&sbi_iter);
|
||||
ogs_assert(sbi_key);
|
||||
|
||||
if (!strcmp(sbi_key, "validity")) {
|
||||
const char *v = ogs_yaml_iter_value(&sbi_iter);
|
||||
if (v) self.time.subscription.validity = atoi(v);
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", sbi_key);
|
||||
}
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", time_key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rv = ogs_app_ctx_validation();
|
||||
|
||||
@@ -48,6 +48,14 @@ typedef struct ogs_config_s {
|
||||
int no_pgw;
|
||||
int no_pcrf;
|
||||
|
||||
int no_amf;
|
||||
int no_smf;
|
||||
int no_upf;
|
||||
int no_ausf;
|
||||
int no_udm;
|
||||
int no_udr;
|
||||
int no_nrf;
|
||||
|
||||
/* Network */
|
||||
int no_ipv4;
|
||||
int no_ipv6;
|
||||
@@ -66,8 +74,12 @@ typedef struct ogs_config_s {
|
||||
int pgw;
|
||||
int vlr;
|
||||
int csmap;
|
||||
int enb;
|
||||
|
||||
int ue;
|
||||
int smf;
|
||||
int upf;
|
||||
int gnb;
|
||||
int nf;
|
||||
} max;
|
||||
|
||||
struct {
|
||||
@@ -75,11 +87,26 @@ typedef struct ogs_config_s {
|
||||
int packet;
|
||||
|
||||
int ue;
|
||||
int auth;
|
||||
int pfcp;
|
||||
int sess;
|
||||
int bearer;
|
||||
int tunnel;
|
||||
int pf;
|
||||
int nf_service;
|
||||
int nf_subscription;
|
||||
int sbi_message;
|
||||
} pool;
|
||||
|
||||
struct {
|
||||
struct {
|
||||
int heartbeat;
|
||||
int validity;
|
||||
} nf_instance;
|
||||
struct {
|
||||
int validity;
|
||||
} subscription;
|
||||
} time;
|
||||
} ogs_config_t;
|
||||
|
||||
int ogs_config_init(void);
|
||||
|
||||
@@ -82,7 +82,7 @@ static int ANY__consume_bytes(const void *buffer, size_t size, void *key);
|
||||
int
|
||||
ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
|
||||
struct _callback_arg arg;
|
||||
asn_enc_rval_t erval;
|
||||
asn_enc_rval_t erval = {0,0,0};
|
||||
|
||||
if(!st || !td) {
|
||||
errno = EINVAL;
|
||||
|
||||
@@ -96,7 +96,7 @@ asn_enc_rval_t
|
||||
BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0, 0, 0};
|
||||
char scratch[128];
|
||||
char *p = scratch;
|
||||
char *scend = scratch + (sizeof(scratch) - 10);
|
||||
|
||||
@@ -1,492 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#include <asn_internal.h>
|
||||
#include <asn_codecs_prim.h>
|
||||
#include <BOOLEAN.h>
|
||||
|
||||
/*
|
||||
* BOOLEAN basic type description.
|
||||
*/
|
||||
static const ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2))
|
||||
};
|
||||
asn_TYPE_operation_t asn_OP_BOOLEAN = {
|
||||
BOOLEAN_free,
|
||||
BOOLEAN_print,
|
||||
BOOLEAN_compare,
|
||||
BOOLEAN_decode_ber,
|
||||
BOOLEAN_encode_der,
|
||||
BOOLEAN_decode_xer,
|
||||
BOOLEAN_encode_xer,
|
||||
#ifdef ASN_DISABLE_OER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
BOOLEAN_decode_oer,
|
||||
BOOLEAN_encode_oer,
|
||||
#endif /* ASN_DISABLE_OER_SUPPORT */
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
BOOLEAN_decode_uper, /* Unaligned PER decoder */
|
||||
BOOLEAN_encode_uper, /* Unaligned PER encoder */
|
||||
BOOLEAN_decode_aper, /* Aligned PER decoder */
|
||||
BOOLEAN_encode_aper, /* Aligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
BOOLEAN_random_fill,
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
|
||||
"BOOLEAN",
|
||||
"BOOLEAN",
|
||||
&asn_OP_BOOLEAN,
|
||||
asn_DEF_BOOLEAN_tags,
|
||||
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
|
||||
asn_DEF_BOOLEAN_tags, /* Same as above */
|
||||
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
|
||||
{ 0, 0, asn_generic_no_constraint },
|
||||
0, 0, /* No members */
|
||||
0 /* No specifics */
|
||||
};
|
||||
|
||||
/*
|
||||
* Decode BOOLEAN type.
|
||||
*/
|
||||
asn_dec_rval_t
|
||||
BOOLEAN_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td, void **bool_value,
|
||||
const void *buf_ptr, size_t size, int tag_mode) {
|
||||
BOOLEAN_t *st = (BOOLEAN_t *)*bool_value;
|
||||
asn_dec_rval_t rval;
|
||||
ber_tlv_len_t length;
|
||||
ber_tlv_len_t lidx;
|
||||
|
||||
if(st == NULL) {
|
||||
st = (BOOLEAN_t *)(*bool_value = CALLOC(1, sizeof(*st)));
|
||||
if(st == NULL) {
|
||||
rval.code = RC_FAIL;
|
||||
rval.consumed = 0;
|
||||
return rval;
|
||||
}
|
||||
}
|
||||
|
||||
ASN_DEBUG("Decoding %s as BOOLEAN (tm=%d)",
|
||||
td->name, tag_mode);
|
||||
|
||||
/*
|
||||
* Check tags.
|
||||
*/
|
||||
rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size,
|
||||
tag_mode, 0, &length, 0);
|
||||
if(rval.code != RC_OK)
|
||||
return rval;
|
||||
|
||||
ASN_DEBUG("Boolean length is %d bytes", (int)length);
|
||||
|
||||
buf_ptr = ((const char *)buf_ptr) + rval.consumed;
|
||||
size -= rval.consumed;
|
||||
if(length > (ber_tlv_len_t)size) {
|
||||
rval.code = RC_WMORE;
|
||||
rval.consumed = 0;
|
||||
return rval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute boolean value.
|
||||
*/
|
||||
for(*st = 0, lidx = 0;
|
||||
(lidx < length) && *st == 0; lidx++) {
|
||||
/*
|
||||
* Very simple approach: read bytes until the end or
|
||||
* value is already TRUE.
|
||||
* BOOLEAN is not supposed to contain meaningful data anyway.
|
||||
*/
|
||||
*st |= ((const uint8_t *)buf_ptr)[lidx];
|
||||
}
|
||||
|
||||
rval.code = RC_OK;
|
||||
rval.consumed += length;
|
||||
|
||||
ASN_DEBUG("Took %ld/%ld bytes to encode %s, value=%d",
|
||||
(long)rval.consumed, (long)length,
|
||||
td->name, *st);
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
BOOLEAN_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb,
|
||||
void *app_key) {
|
||||
asn_enc_rval_t erval;
|
||||
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
|
||||
|
||||
erval.encoded = der_write_tags(td, 1, tag_mode, 0, tag, cb, app_key);
|
||||
if(erval.encoded == -1) {
|
||||
erval.failed_type = td;
|
||||
erval.structure_ptr = sptr;
|
||||
return erval;
|
||||
}
|
||||
|
||||
if(cb) {
|
||||
uint8_t bool_value;
|
||||
|
||||
bool_value = *st ? 0xff : 0; /* 0xff mandated by DER */
|
||||
|
||||
if(cb(&bool_value, 1, app_key) < 0) {
|
||||
erval.encoded = -1;
|
||||
erval.failed_type = td;
|
||||
erval.structure_ptr = sptr;
|
||||
return erval;
|
||||
}
|
||||
}
|
||||
|
||||
erval.encoded += 1;
|
||||
|
||||
ASN__ENCODED_OK(erval);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Decode the chunk of XML text encoding INTEGER.
|
||||
*/
|
||||
static enum xer_pbd_rval
|
||||
BOOLEAN__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr,
|
||||
const void *chunk_buf, size_t chunk_size) {
|
||||
BOOLEAN_t *st = (BOOLEAN_t *)sptr;
|
||||
const char *p = (const char *)chunk_buf;
|
||||
|
||||
(void)td;
|
||||
|
||||
if(chunk_size && p[0] == 0x3c /* '<' */) {
|
||||
switch(xer_check_tag(chunk_buf, chunk_size, "false")) {
|
||||
case XCT_BOTH:
|
||||
/* "<false/>" */
|
||||
*st = 0;
|
||||
break;
|
||||
case XCT_UNKNOWN_BO:
|
||||
if(xer_check_tag(chunk_buf, chunk_size, "true")
|
||||
!= XCT_BOTH)
|
||||
return XPBD_BROKEN_ENCODING;
|
||||
/* "<true/>" */
|
||||
*st = 1; /* Or 0xff as in DER?.. */
|
||||
break;
|
||||
default:
|
||||
return XPBD_BROKEN_ENCODING;
|
||||
}
|
||||
return XPBD_BODY_CONSUMED;
|
||||
} else {
|
||||
return XPBD_BROKEN_ENCODING;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
asn_dec_rval_t
|
||||
BOOLEAN_decode_xer(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td, void **sptr,
|
||||
const char *opt_mname, const void *buf_ptr, size_t size) {
|
||||
return xer_decode_primitive(opt_codec_ctx, td,
|
||||
sptr, sizeof(BOOLEAN_t), opt_mname, buf_ptr, size,
|
||||
BOOLEAN__xer_body_decode);
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
BOOLEAN_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
|
||||
asn_enc_rval_t er = {0, 0, 0};
|
||||
|
||||
(void)ilevel;
|
||||
(void)flags;
|
||||
|
||||
if(!st) ASN__ENCODE_FAILED;
|
||||
|
||||
if(*st) {
|
||||
ASN__CALLBACK("<true/>", 7);
|
||||
} else {
|
||||
ASN__CALLBACK("<false/>", 8);
|
||||
}
|
||||
|
||||
ASN__ENCODED_OK(er);
|
||||
cb_failed:
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
|
||||
int
|
||||
BOOLEAN_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
|
||||
const char *buf;
|
||||
size_t buflen;
|
||||
|
||||
(void)td; /* Unused argument */
|
||||
(void)ilevel; /* Unused argument */
|
||||
|
||||
if(st) {
|
||||
if(*st) {
|
||||
buf = "TRUE";
|
||||
buflen = 4;
|
||||
} else {
|
||||
buf = "FALSE";
|
||||
buflen = 5;
|
||||
}
|
||||
} else {
|
||||
buf = "<absent>";
|
||||
buflen = 8;
|
||||
}
|
||||
|
||||
return (cb(buf, buflen, app_key) < 0) ? -1 : 0;
|
||||
}
|
||||
|
||||
void
|
||||
BOOLEAN_free(const asn_TYPE_descriptor_t *td, void *ptr,
|
||||
enum asn_struct_free_method method) {
|
||||
if(td && ptr) {
|
||||
switch(method) {
|
||||
case ASFM_FREE_EVERYTHING:
|
||||
FREEMEM(ptr);
|
||||
break;
|
||||
case ASFM_FREE_UNDERLYING:
|
||||
break;
|
||||
case ASFM_FREE_UNDERLYING_AND_RESET:
|
||||
memset(ptr, 0, sizeof(BOOLEAN_t));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ASN_DISABLE_PER_SUPPORT
|
||||
|
||||
asn_dec_rval_t
|
||||
BOOLEAN_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void **sptr,
|
||||
asn_per_data_t *pd) {
|
||||
asn_dec_rval_t rv;
|
||||
BOOLEAN_t *st = (BOOLEAN_t *)*sptr;
|
||||
|
||||
(void)opt_codec_ctx;
|
||||
(void)td;
|
||||
(void)constraints;
|
||||
|
||||
if(!st) {
|
||||
st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st)));
|
||||
if(!st) ASN__DECODE_FAILED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract a single bit
|
||||
*/
|
||||
switch(per_get_few_bits(pd, 1)) {
|
||||
case 1: *st = 1; break;
|
||||
case 0: *st = 0; break;
|
||||
case -1: default: ASN__DECODE_STARVED;
|
||||
}
|
||||
|
||||
ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE");
|
||||
|
||||
rv.code = RC_OK;
|
||||
rv.consumed = 1;
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
asn_enc_rval_t
|
||||
BOOLEAN_encode_uper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, const void *sptr,
|
||||
asn_per_outp_t *po) {
|
||||
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
|
||||
asn_enc_rval_t er = { 0, 0, 0 };
|
||||
|
||||
(void)constraints;
|
||||
|
||||
if(!st) ASN__ENCODE_FAILED;
|
||||
|
||||
if(per_put_few_bits(po, *st ? 1 : 0, 1))
|
||||
ASN__ENCODE_FAILED;
|
||||
|
||||
ASN__ENCODED_OK(er);
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
BOOLEAN_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
|
||||
asn_dec_rval_t rv;
|
||||
BOOLEAN_t *st = (BOOLEAN_t *)*sptr;
|
||||
|
||||
(void)opt_codec_ctx;
|
||||
(void)constraints;
|
||||
(void)td;
|
||||
|
||||
if(!st) {
|
||||
st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st)));
|
||||
if(!st) ASN__DECODE_FAILED;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract a single bit
|
||||
*/
|
||||
switch(per_get_few_bits(pd, 1)) {
|
||||
case 1:
|
||||
*st = 1;
|
||||
break;
|
||||
case 0:
|
||||
*st = 0;
|
||||
break;
|
||||
case -1:
|
||||
default:
|
||||
ASN__DECODE_STARVED;
|
||||
}
|
||||
|
||||
ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE");
|
||||
|
||||
rv.code = RC_OK;
|
||||
rv.consumed = 1;
|
||||
return rv;
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
BOOLEAN_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints,
|
||||
const void *sptr, asn_per_outp_t *po) {
|
||||
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
|
||||
asn_enc_rval_t er = { 0, 0, 0 };
|
||||
|
||||
(void)constraints;
|
||||
|
||||
if(!st) ASN__ENCODE_FAILED;
|
||||
|
||||
if(per_put_few_bits(po, *st ? 1 : 0, 1))
|
||||
ASN__ENCODE_FAILED;
|
||||
|
||||
ASN__ENCODED_OK(er);
|
||||
}
|
||||
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
|
||||
#ifndef ASN_DISABLE_OER_SUPPORT
|
||||
|
||||
/*
|
||||
* Encode as Canonical OER.
|
||||
*/
|
||||
asn_enc_rval_t
|
||||
BOOLEAN_encode_oer(const asn_TYPE_descriptor_t *td,
|
||||
const asn_oer_constraints_t *constraints, const void *sptr,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
asn_enc_rval_t er = { 1, 0, 0 };
|
||||
const BOOLEAN_t *st = sptr;
|
||||
uint8_t bool_value = *st ? 0xff : 0; /* 0xff mandated by OER */
|
||||
|
||||
(void)td;
|
||||
(void)constraints; /* Constraints are unused in OER */
|
||||
|
||||
if(cb(&bool_value, 1, app_key) < 0) {
|
||||
ASN__ENCODE_FAILED;
|
||||
} else {
|
||||
ASN__ENCODED_OK(er);
|
||||
}
|
||||
}
|
||||
|
||||
asn_dec_rval_t
|
||||
BOOLEAN_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td,
|
||||
const asn_oer_constraints_t *constraints, void **sptr,
|
||||
const void *ptr, size_t size) {
|
||||
asn_dec_rval_t ok = {RC_OK, 1};
|
||||
BOOLEAN_t *st;
|
||||
|
||||
(void)opt_codec_ctx;
|
||||
(void)td;
|
||||
(void)constraints; /* Constraints are unused in OER */
|
||||
|
||||
if(size < 1) {
|
||||
ASN__DECODE_STARVED;
|
||||
}
|
||||
|
||||
if(!(st = *sptr)) {
|
||||
st = (BOOLEAN_t *)(*sptr = CALLOC(1, sizeof(*st)));
|
||||
if(!st) ASN__DECODE_FAILED;
|
||||
}
|
||||
|
||||
*st = *(const uint8_t *)ptr;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
BOOLEAN_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||
const void *bptr) {
|
||||
const BOOLEAN_t *a = aptr;
|
||||
const BOOLEAN_t *b = bptr;
|
||||
|
||||
(void)td;
|
||||
|
||||
if(a && b) {
|
||||
if(!*a == !*b) { /* TRUE can be encoded by any non-zero byte. */
|
||||
return 0;
|
||||
} else if(!*a) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
} else if(!a) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
asn_random_fill_result_t
|
||||
BOOLEAN_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
|
||||
const asn_encoding_constraints_t *constraints,
|
||||
size_t max_length) {
|
||||
asn_random_fill_result_t result_ok = {ARFILL_OK, 1};
|
||||
asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0};
|
||||
asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0};
|
||||
BOOLEAN_t *st = *sptr;
|
||||
|
||||
if(max_length == 0) return result_skipped;
|
||||
|
||||
if(st == NULL) {
|
||||
st = (BOOLEAN_t *)(*sptr = CALLOC(1, sizeof(*st)));
|
||||
if(st == NULL) {
|
||||
return result_failed;
|
||||
}
|
||||
}
|
||||
|
||||
if(!constraints || !constraints->per_constraints)
|
||||
constraints = &td->encoding_constraints;
|
||||
if(constraints->per_constraints) {
|
||||
const asn_per_constraint_t *pc = &constraints->per_constraints->value;
|
||||
if(pc->flags & APC_CONSTRAINED) {
|
||||
*st = asn_random_between(pc->lower_bound, pc->upper_bound);
|
||||
return result_ok;
|
||||
}
|
||||
}
|
||||
|
||||
/* Simulate booleans that are sloppily set and biased. */
|
||||
switch(asn_random_between(0, 7)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
*st = 0; break;
|
||||
case 3: *st = -1; break;
|
||||
case 4: *st = 1; break;
|
||||
case 5: *st = INT_MIN; break;
|
||||
case 6: *st = INT_MAX; break;
|
||||
default:
|
||||
*st = asn_random_between(INT_MIN, INT_MAX);
|
||||
break;
|
||||
}
|
||||
return result_ok;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#ifndef _BOOLEAN_H_
|
||||
#define _BOOLEAN_H_
|
||||
|
||||
#include <asn_application.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The underlying integer may contain various values, but everything
|
||||
* non-zero is capped to 0xff by the DER encoder. The BER decoder may
|
||||
* yield non-zero values different from 1, beware.
|
||||
*/
|
||||
typedef int BOOLEAN_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN;
|
||||
extern asn_TYPE_operation_t asn_OP_BOOLEAN;
|
||||
|
||||
asn_struct_free_f BOOLEAN_free;
|
||||
asn_struct_print_f BOOLEAN_print;
|
||||
asn_struct_compare_f BOOLEAN_compare;
|
||||
ber_type_decoder_f BOOLEAN_decode_ber;
|
||||
der_type_encoder_f BOOLEAN_encode_der;
|
||||
oer_type_decoder_f BOOLEAN_decode_oer;
|
||||
oer_type_encoder_f BOOLEAN_encode_oer;
|
||||
per_type_decoder_f BOOLEAN_decode_uper;
|
||||
per_type_encoder_f BOOLEAN_encode_uper;
|
||||
per_type_decoder_f BOOLEAN_decode_aper;
|
||||
per_type_encoder_f BOOLEAN_encode_aper;
|
||||
xer_type_decoder_f BOOLEAN_decode_xer;
|
||||
xer_type_encoder_f BOOLEAN_encode_xer;
|
||||
asn_random_fill_f BOOLEAN_random_fill;
|
||||
|
||||
#define BOOLEAN_constraint asn_generic_no_constraint
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BOOLEAN_H_ */
|
||||
58
lib/asn1c/common/GraphicString.c
Normal file
58
lib/asn1c/common/GraphicString.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*-
|
||||
* Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#include <asn_internal.h>
|
||||
#include <GraphicString.h>
|
||||
|
||||
/*
|
||||
* GraphicString basic type description.
|
||||
*/
|
||||
static const ber_tlv_tag_t asn_DEF_GraphicString_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (25 << 2)), /* [UNIVERSAL 25] IMPLICIT ...*/
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_operation_t asn_OP_GraphicString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* non-ascii string */
|
||||
OCTET_STRING_compare,
|
||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_der,
|
||||
OCTET_STRING_decode_xer_hex,
|
||||
OCTET_STRING_encode_xer, /* Can't expect it to be ASCII/UTF8 */
|
||||
#ifdef ASN_DISABLE_OER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
OCTET_STRING_decode_oer,
|
||||
OCTET_STRING_encode_oer,
|
||||
#endif /* ASN_DISABLE_OER_SUPPORT */
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_uper,
|
||||
OCTET_STRING_decode_aper, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_aper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
OCTET_STRING_random_fill,
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GraphicString = {
|
||||
"GraphicString",
|
||||
"GraphicString",
|
||||
&asn_OP_GraphicString,
|
||||
asn_DEF_GraphicString_tags,
|
||||
sizeof(asn_DEF_GraphicString_tags)
|
||||
/ sizeof(asn_DEF_GraphicString_tags[0]) - 1,
|
||||
asn_DEF_GraphicString_tags,
|
||||
sizeof(asn_DEF_GraphicString_tags)
|
||||
/ sizeof(asn_DEF_GraphicString_tags[0]),
|
||||
{ 0, 0, asn_generic_unknown_constraint },
|
||||
0, 0, /* No members */
|
||||
0 /* No specifics */
|
||||
};
|
||||
|
||||
36
lib/asn1c/common/GraphicString.h
Normal file
36
lib/asn1c/common/GraphicString.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*-
|
||||
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#ifndef _GraphicString_H_
|
||||
#define _GraphicString_H_
|
||||
|
||||
#include <OCTET_STRING.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef OCTET_STRING_t GraphicString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GraphicString;
|
||||
extern asn_TYPE_operation_t asn_OP_GraphicString;
|
||||
|
||||
#define GraphicString_free OCTET_STRING_free
|
||||
#define GraphicString_print OCTET_STRING_print
|
||||
#define GraphicString_compare OCTET_STRING_compare
|
||||
#define GraphicString_constraint asn_generic_unknown_constraint
|
||||
#define GraphicString_decode_ber OCTET_STRING_decode_ber
|
||||
#define GraphicString_encode_der OCTET_STRING_encode_der
|
||||
#define GraphicString_decode_xer OCTET_STRING_decode_xer_hex
|
||||
#define GraphicString_encode_xer OCTET_STRING_encode_xer
|
||||
#define GraphicString_decode_uper OCTET_STRING_decode_uper
|
||||
#define GraphicString_encode_uper OCTET_STRING_encode_uper
|
||||
#define GraphicString_decode_aper OCTET_STRING_decode_aper
|
||||
#define GraphicString_encode_aper OCTET_STRING_encode_aper
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GraphicString_H_ */
|
||||
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2003-2014 Lev Walkin <vlm@lionet.info>.
|
||||
/*
|
||||
* Copyright (c) 2003-2019 Lev Walkin <vlm@lionet.info>.
|
||||
* All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
@@ -571,7 +571,7 @@ INTEGER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
int ilevel, enum xer_encoder_flags_e flags,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
|
||||
(void)ilevel;
|
||||
(void)flags;
|
||||
@@ -636,11 +636,11 @@ INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
/* #11.5.6 */
|
||||
ASN_DEBUG("Integer with range %d bits", ct->range_bits);
|
||||
if(ct->range_bits >= 0) {
|
||||
if((size_t)ct->range_bits > 8 * sizeof(unsigned long))
|
||||
if((size_t)ct->range_bits > 8 * sizeof(uintmax_t))
|
||||
ASN__DECODE_FAILED;
|
||||
|
||||
if(specs && specs->field_unsigned) {
|
||||
unsigned long uvalue = 0;
|
||||
uintmax_t uvalue = 0;
|
||||
if(uper_get_constrained_whole_number(pd,
|
||||
&uvalue, ct->range_bits))
|
||||
ASN__DECODE_STARVED;
|
||||
@@ -650,16 +650,16 @@ INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
if(asn_ulong2INTEGER(st, uvalue))
|
||||
ASN__DECODE_FAILED;
|
||||
} else {
|
||||
unsigned long uvalue = 0;
|
||||
long svalue;
|
||||
uintmax_t uvalue = 0;
|
||||
intmax_t svalue;
|
||||
if(uper_get_constrained_whole_number(pd,
|
||||
&uvalue, ct->range_bits))
|
||||
ASN__DECODE_STARVED;
|
||||
ASN_DEBUG("Got value %lu + low %ld",
|
||||
uvalue, ct->lower_bound);
|
||||
if(per_long_range_unrebase(uvalue, ct->lower_bound,
|
||||
if(per_imax_range_unrebase(uvalue, ct->lower_bound,
|
||||
ct->upper_bound, &svalue)
|
||||
|| asn_long2INTEGER(st, svalue)) {
|
||||
|| asn_imax2INTEGER(st, svalue)) {
|
||||
ASN__DECODE_FAILED;
|
||||
}
|
||||
}
|
||||
@@ -692,7 +692,7 @@ INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
/* #12.2.3 */
|
||||
if(ct && ct->lower_bound) {
|
||||
/*
|
||||
* TODO: replace by in-place arithmetics.
|
||||
* TODO: replace by in-place arithmetic.
|
||||
*/
|
||||
long value = 0;
|
||||
if(asn_INTEGER2long(st, &value))
|
||||
@@ -708,14 +708,14 @@ asn_enc_rval_t
|
||||
INTEGER_encode_uper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, const void *sptr,
|
||||
asn_per_outp_t *po) {
|
||||
const asn_INTEGER_specifics_t *specs =
|
||||
(const asn_INTEGER_specifics_t *)td->specifics;
|
||||
asn_enc_rval_t er;
|
||||
const asn_INTEGER_specifics_t *specs =
|
||||
(const asn_INTEGER_specifics_t *)td->specifics;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
const uint8_t *buf;
|
||||
const uint8_t *end;
|
||||
const asn_per_constraint_t *ct;
|
||||
long value = 0;
|
||||
intmax_t value = 0;
|
||||
|
||||
if(!st || st->size == 0) ASN__ENCODE_FAILED;
|
||||
|
||||
@@ -727,16 +727,16 @@ INTEGER_encode_uper(const asn_TYPE_descriptor_t *td,
|
||||
if(ct) {
|
||||
int inext = 0;
|
||||
if(specs && specs->field_unsigned) {
|
||||
unsigned long uval;
|
||||
if(asn_INTEGER2ulong(st, &uval))
|
||||
uintmax_t uval;
|
||||
if(asn_INTEGER2umax(st, &uval))
|
||||
ASN__ENCODE_FAILED;
|
||||
/* Check proper range */
|
||||
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
||||
if(uval < (unsigned long)ct->lower_bound)
|
||||
if(uval < (uintmax_t)ct->lower_bound)
|
||||
inext = 1;
|
||||
} else if(ct->range_bits >= 0) {
|
||||
if(uval < (unsigned long)ct->lower_bound
|
||||
|| uval > (unsigned long)ct->upper_bound)
|
||||
if(uval < (uintmax_t)ct->lower_bound
|
||||
|| uval > (uintmax_t)ct->upper_bound)
|
||||
inext = 1;
|
||||
}
|
||||
ASN_DEBUG("Value %lu (%02x/%" ASN_PRI_SIZE ") lb %lu ub %lu %s",
|
||||
@@ -745,7 +745,7 @@ INTEGER_encode_uper(const asn_TYPE_descriptor_t *td,
|
||||
inext ? "ext" : "fix");
|
||||
value = uval;
|
||||
} else {
|
||||
if(asn_INTEGER2long(st, &value))
|
||||
if(asn_INTEGER2imax(st, &value))
|
||||
ASN__ENCODE_FAILED;
|
||||
/* Check proper range */
|
||||
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
||||
@@ -773,16 +773,28 @@ INTEGER_encode_uper(const asn_TYPE_descriptor_t *td,
|
||||
|
||||
/* X.691-11/2008, #13.2.2, test if constrained whole number */
|
||||
if(ct && ct->range_bits >= 0) {
|
||||
unsigned long v;
|
||||
uintmax_t v;
|
||||
/* #11.5.6 -> #11.3 */
|
||||
ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits",
|
||||
value, value - ct->lower_bound, ct->range_bits);
|
||||
if(per_long_range_rebase(value, ct->lower_bound, ct->upper_bound, &v)) {
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
if(specs && specs->field_unsigned) {
|
||||
if ( ((uintmax_t)ct->lower_bound > (uintmax_t)(ct->upper_bound)
|
||||
|| ((uintmax_t)value < (uintmax_t)ct->lower_bound))
|
||||
|| ((uintmax_t)value > (uintmax_t)ct->upper_bound)
|
||||
) {
|
||||
ASN_DEBUG("Value %lu to-be-encoded is outside the bounds [%lu, %lu]!",
|
||||
value, ct->lower_bound, ct->upper_bound);
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
v = (uintmax_t)value - (uintmax_t)ct->lower_bound;
|
||||
} else {
|
||||
if(per_imax_range_rebase(value, ct->lower_bound, ct->upper_bound, &v)) {
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
}
|
||||
if(uper_put_constrained_whole_number_u(po, v, ct->range_bits))
|
||||
ASN__ENCODE_FAILED;
|
||||
ASN__ENCODED_OK(er);
|
||||
ASN__ENCODE_FAILED;
|
||||
ASN__ENCODED_OK(er);
|
||||
}
|
||||
|
||||
if(ct && ct->lower_bound) {
|
||||
@@ -961,7 +973,7 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints,
|
||||
const void *sptr, asn_per_outp_t *po) {
|
||||
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
const uint8_t *buf;
|
||||
const uint8_t *end;
|
||||
@@ -1031,7 +1043,8 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||
v = value - ct->lower_bound;
|
||||
|
||||
/* #12 <= 8 -> alignment ? */
|
||||
if (ct->range_bits < 8) {
|
||||
int range = ct->upper_bound - ct->lower_bound + 1;
|
||||
if (ct->range_bits < 8 || (ct->range_bits == 8 && range < 256)) {
|
||||
if(per_put_few_bits(po, 0x00 | v, ct->range_bits))
|
||||
ASN__ENCODE_FAILED;
|
||||
} else if (ct->range_bits == 8) {
|
||||
@@ -1089,12 +1102,14 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||
}
|
||||
|
||||
for(buf = st->buf, end = st->buf + st->size; buf < end;) {
|
||||
ssize_t mayEncode = aper_put_length(po, -1, end - buf);
|
||||
int need_eom = 0;
|
||||
ssize_t mayEncode = aper_put_length(po, -1, end - buf, &need_eom);
|
||||
if(mayEncode < 0)
|
||||
ASN__ENCODE_FAILED;
|
||||
if(per_put_many_bits(po, buf, 8 * mayEncode))
|
||||
ASN__ENCODE_FAILED;
|
||||
buf += mayEncode;
|
||||
if(need_eom && aper_put_length(po, -1, 0, 0)) ASN__ENCODE_FAILED;
|
||||
}
|
||||
|
||||
ASN__ENCODED_OK(er);
|
||||
@@ -1416,64 +1431,71 @@ asn_int642INTEGER(INTEGER_t *st, int64_t value) {
|
||||
*/
|
||||
enum asn_strtox_result_e
|
||||
asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) {
|
||||
int sign = 1;
|
||||
intmax_t value;
|
||||
int sign = 1;
|
||||
intmax_t value;
|
||||
|
||||
#define ASN1_INTMAX_MAX ((~(uintmax_t)0) >> 1)
|
||||
const intmax_t upper_boundary = ASN1_INTMAX_MAX / 10;
|
||||
intmax_t last_digit_max = ASN1_INTMAX_MAX % 10;
|
||||
#undef ASN1_INTMAX_MAX
|
||||
const intmax_t asn1_intmax_max = ((~(uintmax_t)0) >> 1);
|
||||
const intmax_t upper_boundary = asn1_intmax_max / 10;
|
||||
intmax_t last_digit_max = asn1_intmax_max % 10;
|
||||
|
||||
if(str >= *end) return ASN_STRTOX_ERROR_INVAL;
|
||||
if(str >= *end) return ASN_STRTOX_ERROR_INVAL;
|
||||
|
||||
switch(*str) {
|
||||
case '-':
|
||||
last_digit_max++;
|
||||
sign = -1;
|
||||
/* FALL THROUGH */
|
||||
case '+':
|
||||
str++;
|
||||
if(str >= *end) {
|
||||
*end = str;
|
||||
return ASN_STRTOX_EXPECT_MORE;
|
||||
}
|
||||
}
|
||||
switch(*str) {
|
||||
case '-':
|
||||
last_digit_max++;
|
||||
sign = -1;
|
||||
/* FALL THROUGH */
|
||||
case '+':
|
||||
str++;
|
||||
if(str >= *end) {
|
||||
*end = str;
|
||||
return ASN_STRTOX_EXPECT_MORE;
|
||||
}
|
||||
}
|
||||
|
||||
for(value = 0; str < (*end); str++) {
|
||||
switch(*str) {
|
||||
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34:
|
||||
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: {
|
||||
int d = *str - '0';
|
||||
if(value < upper_boundary) {
|
||||
value = value * 10 + d;
|
||||
} else if(value == upper_boundary) {
|
||||
if(d <= last_digit_max) {
|
||||
if(sign > 0) {
|
||||
value = value * 10 + d;
|
||||
} else {
|
||||
sign = 1;
|
||||
value = -value * 10 - d;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
default:
|
||||
*end = str;
|
||||
*intp = sign * value;
|
||||
return ASN_STRTOX_EXTRA_DATA;
|
||||
}
|
||||
}
|
||||
for(value = 0; str < (*end); str++) {
|
||||
if(*str >= 0x30 && *str <= 0x39) {
|
||||
int d = *str - '0';
|
||||
if(value < upper_boundary) {
|
||||
value = value * 10 + d;
|
||||
} else if(value == upper_boundary) {
|
||||
if(d <= last_digit_max) {
|
||||
if(sign > 0) {
|
||||
value = value * 10 + d;
|
||||
} else {
|
||||
sign = 1;
|
||||
value = -value * 10 - d;
|
||||
}
|
||||
str += 1;
|
||||
if(str < *end) {
|
||||
// If digits continue, we're guaranteed out of range.
|
||||
*end = str;
|
||||
if(*str >= 0x30 && *str <= 0x39) {
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
} else {
|
||||
*intp = sign * value;
|
||||
return ASN_STRTOX_EXTRA_DATA;
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
*intp = sign * value;
|
||||
return ASN_STRTOX_EXTRA_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
*end = str;
|
||||
*intp = sign * value;
|
||||
return ASN_STRTOX_OK;
|
||||
*end = str;
|
||||
*intp = sign * value;
|
||||
return ASN_STRTOX_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1484,56 +1506,63 @@ asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) {
|
||||
*/
|
||||
enum asn_strtox_result_e
|
||||
asn_strtoumax_lim(const char *str, const char **end, uintmax_t *uintp) {
|
||||
uintmax_t value;
|
||||
uintmax_t value;
|
||||
|
||||
#define ASN1_UINTMAX_MAX ((~(uintmax_t)0))
|
||||
const uintmax_t upper_boundary = ASN1_UINTMAX_MAX / 10;
|
||||
uintmax_t last_digit_max = ASN1_UINTMAX_MAX % 10;
|
||||
#undef ASN1_UINTMAX_MAX
|
||||
const uintmax_t asn1_uintmax_max = ((~(uintmax_t)0));
|
||||
const uintmax_t upper_boundary = asn1_uintmax_max / 10;
|
||||
uintmax_t last_digit_max = asn1_uintmax_max % 10;
|
||||
|
||||
if(str >= *end) return ASN_STRTOX_ERROR_INVAL;
|
||||
|
||||
switch(*str) {
|
||||
case '-':
|
||||
switch(*str) {
|
||||
case '-':
|
||||
return ASN_STRTOX_ERROR_INVAL;
|
||||
case '+':
|
||||
str++;
|
||||
if(str >= *end) {
|
||||
*end = str;
|
||||
return ASN_STRTOX_EXPECT_MORE;
|
||||
}
|
||||
}
|
||||
case '+':
|
||||
str++;
|
||||
if(str >= *end) {
|
||||
*end = str;
|
||||
return ASN_STRTOX_EXPECT_MORE;
|
||||
}
|
||||
}
|
||||
|
||||
for(value = 0; str < (*end); str++) {
|
||||
switch(*str) {
|
||||
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34:
|
||||
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: {
|
||||
unsigned int d = *str - '0';
|
||||
if(value < upper_boundary) {
|
||||
value = value * 10 + d;
|
||||
} else if(value == upper_boundary) {
|
||||
if(d <= last_digit_max) {
|
||||
for(value = 0; str < (*end); str++) {
|
||||
if(*str >= 0x30 && *str <= 0x39) {
|
||||
unsigned int d = *str - '0';
|
||||
if(value < upper_boundary) {
|
||||
value = value * 10 + d;
|
||||
} else if(value == upper_boundary) {
|
||||
if(d <= last_digit_max) {
|
||||
value = value * 10 + d;
|
||||
str += 1;
|
||||
if(str < *end) {
|
||||
// If digits continue, we're guaranteed out of range.
|
||||
*end = str;
|
||||
if(*str >= 0x30 && *str <= 0x39) {
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
} else {
|
||||
*uintp = value;
|
||||
return ASN_STRTOX_EXTRA_DATA;
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
default:
|
||||
*end = str;
|
||||
*uintp = value;
|
||||
return ASN_STRTOX_EXTRA_DATA;
|
||||
}
|
||||
}
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
return ASN_STRTOX_ERROR_RANGE;
|
||||
}
|
||||
} else {
|
||||
*end = str;
|
||||
*uintp = value;
|
||||
return ASN_STRTOX_EXTRA_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
*end = str;
|
||||
*uintp = value;
|
||||
return ASN_STRTOX_OK;
|
||||
*end = str;
|
||||
*uintp = value;
|
||||
return ASN_STRTOX_OK;
|
||||
}
|
||||
|
||||
enum asn_strtox_result_e
|
||||
|
||||
@@ -83,8 +83,8 @@ enum asn_strtox_result_e {
|
||||
ASN_STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */
|
||||
ASN_STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */
|
||||
ASN_STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */
|
||||
ASN_STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */
|
||||
ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */
|
||||
ASN_STRTOX_OK = 0, /* Conversion succeeded, number ends at (*end) */
|
||||
ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeeded, but the string has extra stuff */
|
||||
};
|
||||
enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end,
|
||||
long *l);
|
||||
|
||||
@@ -104,7 +104,7 @@ INTEGER_encode_oer(const asn_TYPE_descriptor_t *td,
|
||||
const asn_oer_constraints_t *constraints, const void *sptr,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
const INTEGER_t *st = sptr;
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
struct asn_oer_constraint_number_s ct = {0, 0};
|
||||
const uint8_t *buf;
|
||||
const uint8_t *end;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <asn_internal.h>
|
||||
#include <asn_codecs_prim.h>
|
||||
#include <NULL.h>
|
||||
#include <BOOLEAN.h> /* Implemented in terms of BOOLEAN type */
|
||||
|
||||
/*
|
||||
* NULL basic type description.
|
||||
@@ -14,10 +13,10 @@ static const ber_tlv_tag_t asn_DEF_NULL_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (5 << 2))
|
||||
};
|
||||
asn_TYPE_operation_t asn_OP_NULL = {
|
||||
BOOLEAN_free,
|
||||
NULL_free,
|
||||
NULL_print,
|
||||
NULL_compare,
|
||||
BOOLEAN_decode_ber, /* Implemented in terms of BOOLEAN */
|
||||
NULL_decode_ber,
|
||||
NULL_encode_der, /* Special handling of DER encoding */
|
||||
NULL_decode_xer,
|
||||
NULL_encode_xer,
|
||||
@@ -55,10 +54,69 @@ asn_TYPE_descriptor_t asn_DEF_NULL = {
|
||||
0 /* No specifics */
|
||||
};
|
||||
|
||||
void
|
||||
NULL_free(const asn_TYPE_descriptor_t *td, void *ptr,
|
||||
enum asn_struct_free_method method) {
|
||||
if(td && ptr) {
|
||||
switch(method) {
|
||||
case ASFM_FREE_EVERYTHING:
|
||||
FREEMEM(ptr);
|
||||
break;
|
||||
case ASFM_FREE_UNDERLYING:
|
||||
break;
|
||||
case ASFM_FREE_UNDERLYING_AND_RESET:
|
||||
memset(ptr, 0, sizeof(NULL_t));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode NULL type.
|
||||
*/
|
||||
asn_dec_rval_t
|
||||
NULL_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td, void **bool_value,
|
||||
const void *buf_ptr, size_t size, int tag_mode) {
|
||||
NULL_t *st = (NULL_t *)*bool_value;
|
||||
asn_dec_rval_t rval;
|
||||
ber_tlv_len_t length;
|
||||
|
||||
if(st == NULL) {
|
||||
st = (NULL_t *)(*bool_value = CALLOC(1, sizeof(*st)));
|
||||
if(st == NULL) {
|
||||
rval.code = RC_FAIL;
|
||||
rval.consumed = 0;
|
||||
return rval;
|
||||
}
|
||||
}
|
||||
|
||||
ASN_DEBUG("Decoding %s as NULL (tm=%d)", td->name, tag_mode);
|
||||
|
||||
/*
|
||||
* Check tags.
|
||||
*/
|
||||
rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0,
|
||||
&length, 0);
|
||||
if(rval.code != RC_OK) {
|
||||
return rval;
|
||||
}
|
||||
|
||||
// X.690-201508, #8.8.2, length shall be zero.
|
||||
if(length != 0) {
|
||||
ASN_DEBUG("Decoding %s as NULL failed: too much data", td->name);
|
||||
rval.code = RC_FAIL;
|
||||
rval.consumed = 0;
|
||||
return rval;
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
NULL_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode,
|
||||
ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
asn_enc_rval_t erval;
|
||||
asn_enc_rval_t erval = {0,0,0};
|
||||
|
||||
erval.encoded = der_write_tags(td, 0, tag_mode, 0, tag, cb, app_key);
|
||||
if(erval.encoded == -1) {
|
||||
@@ -73,7 +131,7 @@ asn_enc_rval_t
|
||||
NULL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
||||
enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
|
||||
void *app_key) {
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
|
||||
(void)td;
|
||||
(void)sptr;
|
||||
@@ -164,7 +222,7 @@ asn_enc_rval_t
|
||||
NULL_encode_oer(const asn_TYPE_descriptor_t *td,
|
||||
const asn_oer_constraints_t *constraints, const void *sptr,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
|
||||
(void)td;
|
||||
(void)sptr;
|
||||
@@ -215,7 +273,7 @@ asn_enc_rval_t
|
||||
NULL_encode_uper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, const void *sptr,
|
||||
asn_per_outp_t *po) {
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
|
||||
(void)td;
|
||||
(void)constraints;
|
||||
@@ -230,7 +288,7 @@ asn_dec_rval_t
|
||||
NULL_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
|
||||
asn_dec_rval_t rv;
|
||||
asn_dec_rval_t rv = {RC_OK, 0};
|
||||
|
||||
(void)opt_codec_ctx;
|
||||
(void)td;
|
||||
@@ -260,7 +318,7 @@ asn_enc_rval_t
|
||||
NULL_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints,
|
||||
const void *sptr, asn_per_outp_t *po) {
|
||||
asn_enc_rval_t er;
|
||||
asn_enc_rval_t er = {0,0,0};
|
||||
|
||||
(void)td;
|
||||
(void)constraints;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user