Compare commits

...

176 Commits

Author SHA1 Message Date
Sukchan Lee
47c9f4e4a0 Release v2.3.0 2021-06-08 21:53:23 +09:00
Sukchan Lee
e31a8474b2 [SMF/UPF] fix the crash bug (#1034, #1006) 2021-06-08 21:14:18 +09:00
Sukchan Lee
774e1b0ebd [Sponsor] Add sysmocom logo 2021-06-07 22:10:01 +09:00
Sukchan Lee
ac37e00b42 [Sponsor] Add sysmocom logo 2021-06-07 21:44:02 +09:00
Sukchan Lee
118d62d42d Add more memory log 2021-06-06 22:35:46 +09:00
Sukchan Lee
80a9497afd [PFCP] Add more error log (#1012) 2021-05-30 20:35:30 +09:00
Sukchan Lee
ef07ccfb88 fix the default SBI port (#997, #1008) 2021-05-30 10:35:01 +09:00
Sukchan Lee
5d460b0577 [UPF] Tested all platforms on open5gs (#1022) 2021-05-29 23:08:22 +09:00
Sukchan Lee
8dab1852cc Merge branch 'tap' of https://github.com/anarkiwi/open5gs into pull1022 2021-05-29 18:06:43 +09:00
Sukchan Lee
899c121478 remove warning in MacOSX 2021-05-29 16:03:40 +09:00
Sukchan Lee
fe89f7cd11 [5GC] Added BSF(Binding Support Function) 2021-05-29 15:56:12 +09:00
Sukchan Lee
611986794b Squashed commit of the following:
commit 183d8b8344122f25f77be79b1b698c71f48c1656
Author: Sukchan Lee <acetcom@gmail.com>
Date:   Fri May 28 23:44:26 2021 +0900

    [SMF] introduce new list API [#1019]

    Sometimes we may need two lists for same node.
    To do this, I created a new list API, and applied it this pull request.
2021-05-28 23:46:48 +09:00
Josh Bailey
caa73e1f5e Support TAP interfaces, with ARP/ND. 2021-05-28 05:59:03 +00:00
herlesupreeth
4d6692d8fe fix: DRB lost issue when additional TFTs needs to be added to existing bearer with TFTs
This commit address the issue where a bearer with particular
PCC rule name exists with TFTs and addtional TFTs needs to be added
to same bearer and DRB lost is reported by UE.

This is achieved by creating EPS Bearer Level Traffic Flow Template
with TFT operation code as 'OGS_GTP_TFT_CODE_ADD_PACKET_FILTERS_TO_EXISTING_TFT' in
above scenario rather than use 'OGS_GTP_TFT_CODE_CREATE_NEW_TFT' at all times.
And, not remove existing packet filters for the bearer.
2021-05-27 15:57:32 +02:00
Sukchan Lee
64508c2e5c [DOC] Add Huawei BTS 5900 (#994) 2021-05-19 23:33:10 +09:00
Sukchan Lee
35d5b7e16e Release v2.2.9 2021-05-19 14:21:47 +09:00
Sukchan Lee
3d11b87127 [AMF] Buffix for NON-initial NAS message (#1106)
Confirmation for non-cleartext IE should only be applied
to the initial NAS message. Registration requests and Service requests
with UplinkNASTransport do not have to.
2021-05-19 13:27:31 +09:00
Sukchan Lee
873cf398c7 [ALL] Add protection of message encoding (#991)
All process will be forcely exited if it failed to encode the S1AP/NGAP/GTP/PFCP message. It is to make sure there was no problem with the encoding of open5gs.
2021-05-16 12:22:10 +09:00
Sukchan Lee
dfaf2f1567 [SMF] PF precedence generated by Pool (#1001) 2021-05-16 11:26:40 +09:00
Supreeth Herle
b6a030d82b Support for IMS video calling (#1001)
* Preserve local port in Rx flow-description

In contnuation to support for calling in pre-rel. LTE 11 devices
, rather than removing the local IP addr field and local port remove
only the IP addr field

* tft: Set precedence considering exisiting TFTs in all bearers of a DNN
2021-05-16 10:08:41 +09:00
Sukchan Lee
3df75e37df [GTP/PFCP] Remove SO_REUSEADDR in UDP (#986,#992)
In case of IP conflict, it has been modified to automatically shut down with an error message so that users can easily recognize it.
2021-05-15 20:37:15 +09:00
Sukchan Lee
f861919507 [AMF] asn1c decode error for APC_EXTENSIBLE (#994) 2021-05-14 16:46:08 +09:00
Sukchan Lee
257f398a11 [AMF] Add more buffer for 5GMM capability (#959) 2021-05-13 19:55:00 +09:00
Sukchan Lee
4a1ddb6650 [DOC] update troubleshoot [#936] 2021-05-09 18:42:45 +09:00
Sukchan Lee
496b5a9e58 Release v2.2.8 2021-05-09 11:45:52 +09:00
Sukchan Lee
916bf752b4 [DOC] Update Troubleshoot for DiameterError (#936) 2021-05-09 11:17:19 +09:00
Sukchan Lee
26f14ee7ca [WebUI] fix the security flaw in account (#764)
- In developement mode, if there is no default admin account,
  Node.js server WILL create admin/1423 account.
- In production mode, even though there is no default admin account,
  Node.js server WILL NOT create admin/1423 account.

1. WebUI installation script will create default admin account
   if there is no account.

   $ curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -

2. Installation script will automatically uninstall WebUI
   if WebUI has already been installed.
2021-05-08 23:11:27 +09:00
Sukchan Lee
ff4695bd5a [AMF/MME] malformed Path-Switch-Request (#960)
fix the crash
2021-05-08 17:01:45 +09:00
Sukchan Lee
3b19190f56 [AMF] fix crash due to malformed NGAP (#960) 2021-05-08 15:09:10 +09:00
Sukchan Lee
5ea9b22209 [AMF] security protection (UERANSIM-issues316)
1. Allocate ngKSI other than the value already used.
2. Add the protection of Service request
3. fix SBI convert error ng_ap_cause
2021-05-08 13:24:17 +09:00
Sukchan Lee
b0e8dbb31a [NAS] Protection for malformed NAS message (#959)
Add the protection code to avoid AMF/MME crash due to malformed NAS
message
2021-05-07 23:04:48 +09:00
Sukchan Lee
018b352985 [AMF] fix the UE-AMBR in NGAP message (#979)
1. DownlinkNASTransport
If AMF has not sent it previously, UE-AMBR is included in Registration
accept.

2. InitialContextSetupRequest
If PDUSessionResourceSetup is available, UE-AMBR is included

3. PDUSessionResourceSetupRequest
If AMF has not sent it previously, UE-AMBR is included

4. HandoverRequest
If PDUSessionResourceSetup is available, UE-AMBR is included
2021-05-07 21:18:45 +09:00
Sukchan Lee
1dc692753a [AMF] Distinguish Cleartext/Non-cleartext (#958)
1. If UE does not use a NAS container for Non-cleartext IEs,
   Open5GS AMF will send Registration reject message.
2. If UE sends Non-cleartext IEs without Integrity-protected,
   Open5GS AMF will send Registration reject message.
3. If UE does not send NAS container in Security mode complete message,
   Open5GS AMF will send Registration reject message.
2021-05-07 15:07:51 +09:00
Sukchan Lee
182a61dc0b [IPFilter] Assert if getprotobyname() problem (#977) 2021-05-07 10:47:10 +09:00
Sukchan Lee
dc870cc839 [SMF/UPF] fix the bug for decoding IPFilter (977) 2021-05-06 21:15:32 +09:00
Sukchan Lee
9a814ceac9 [Docker] update docker script (#976)
- Use 'meson test -v' instead of 'ninja -C build test'
- remove wireshark from docker development environment
2021-05-06 17:21:48 +09:00
Sukchan Lee
b4c1987ede [Doc] fix a typo error (#973) 2021-05-06 16:35:04 +09:00
Sukchan Lee
ab93fb7613 [WebUI] change curl version to LTS-14 (#971) 2021-05-06 16:26:34 +09:00
Ethan Arnold
6cc84b69ce improve README formatting (#975) 2021-05-06 06:50:23 +09:00
Ethan Arnold
8ca9402d11 improve formatting of README.md (#974) 2021-05-05 23:55:40 +09:00
Sukchan Lee
5901582281 [GTPv2] fix incorrect formatting PLMN-ID (#969) 2021-05-05 22:51:50 +09:00
Sukchan Lee
e5a0dfb444 [SBI] fix the compile warning in MacOSX 2021-05-05 22:04:17 +09:00
Sukchan Lee
0b063a57c8 [MME] fix the NAS encoding for AMBR (#967) 2021-05-05 21:16:31 +09:00
Sukchan Lee
cea1dff5a1 [Alpine] remove GLIBC macro (#957) 2021-04-30 22:16:07 +09:00
Sukchan Lee
002e3c7ae9 [Alpine] Add Dockerfile and Document 2021-04-30 22:13:04 +09:00
Venkata Pilla
27b25b8993 Added support for musl libc, to support compilation on Alpine Linux and other musl libc based systems. (#957) 2021-04-30 22:07:20 +09:00
Sukchan Lee
0b05308188 Release v2.2.7 2021-04-30 14:52:18 +09:00
Sukchan Lee
3b1ebfa9ed [MME] Fix the Invalid AMBR Unit (#967) 2021-04-30 11:58:02 +09:00
Sukchan Lee
959bc6a248 [PFCP] DNS delay during PFCP association (#891)
1. Remove ogs_getnameinfo().
2. Modify to check a valid IP address by using ogs_inet_pton() in order not to use DNS query
2021-04-30 10:17:01 +09:00
Matthew Johnson
96050ed6e2 [misc] Use correct units and session types when upgrading (#968)
* [misc] Set slice session type when upgrading

* [misc] Use correct units when upgrading

The old UI specified units in kbps, which corresponds to enum 1, not
enum 0, in the new schema and UI.
2021-04-30 09:31:57 +09:00
Sukchan Lee
49d7fe3b82 fix compilation error in FreeBSD 2021-04-30 00:17:26 +00:00
Sukchan Lee
19a8e4cd70 [Cx] Chanage IMPUs (#921)
Change the order of IMPUs sent in XML as follows and also have only the
following IMPUs

i.e.
    1. sip:<MSISDN>@ims.mnc<MNC>.mcc<MCC>.3ggpnetwork.org
    2. tel:<MSISDN>
2021-04-30 07:07:52 +09:00
Supreeth Herle
8cf606fd6b Update IMPUs to be added for a IMS user (#966)
* Update IMPUs to be added for a IMS user

* Tutorial update based on maintained repo and its related changes

* Minor doc update
2021-04-30 07:02:32 +09:00
Sukchan Lee
a58214da76 [5GC/EPC] tested with concurrent 500 UEs (#949)
Fix the memory problem in many simulatneous connections test
2021-04-29 22:01:34 +09:00
KaiPKaiPGirl
03e74c93e8 Update Dockerfile (#962) 2021-04-27 22:48:46 +09:00
Matthew Johnson
72374e439a Some cleanup for the db migration script (#956) 2021-04-25 15:25:51 +09:00
Sukchan Lee
fc27f7499b [SMF/SGW-C] fix the PFCP RR selection (#953)
The configuration has changed. PFCP node rr=0 is removed as shown below.
sgwc:
  pfcp
    rr: 0 <-- Removed

Introduced a new configuration method for SMF/SGW-C

parameter:
  no_pfcp_rr_select: true

By default, PFCP round robin selection is allowed.
The above parameters prohibit selecting PFCP in a round robin manner.
2021-04-24 20:56:14 +09:00
Sukchan Lee
dcfc9ef803 [AMF/MME] Add retransmission for accept message
Registration accept with GUTI
Attach accept
Tracking area update request with GUTI
2021-04-23 15:16:18 +09:00
Kenny Barlee
2766a1ce2c add N4u/Sxu details (#955) 2021-04-22 22:35:34 +09:00
Sukchan Lee
20a662a9aa [conf] change the example conf (#953) 2021-04-22 08:45:11 +09:00
Sukchan Lee
1a13ab3a7d [conf] change the example conf (#953) 2021-04-21 22:42:39 +09:00
Sukchan Lee
73c3aa54c0 [ALL] Fix the terminate sequence (#938) 2021-04-21 17:46:03 +09:00
Sukchan Lee
793a82020f [ALL] Init updated for an Invalid IP (#938) 2021-04-21 17:24:17 +09:00
Sukchan Lee
e459a85bc1 [Docker] Update WebUI Version to 2.2.6 (#945) 2021-04-21 15:42:36 +09:00
Sukchan Lee
27285a60da [DOC] Clarify DB Schema changes (#936) 2021-04-20 21:33:32 +09:00
Kenny Barlee
9ff93f0e49 update diagrams for new features (#944) 2021-04-16 20:31:06 +09:00
Sukchan Lee
ea89d8dc8e [AMF] Added RANConfigurationUpdate (#943) 2021-04-16 16:26:13 +09:00
Marcel T
bf5f64b5e5 Updated open5gs-dbctl to be compatible with the changed database schema (#940)
Co-authored-by: Marcel Thiel <mthiel@cocus.com>
2021-04-15 23:21:47 +09:00
Sukchan Lee
cc03c91bdd [AMF] 5G-GUTI generation changed (#910)
The AMF shall assign a new 5G-GUTI for a particular UE:
a) during  a successful initial registration procedure;
b) during a successful registration procedure
   for mobility registration update; and
c) after a successful service request procedure invoked as a response
   to a paging request from the network and before the release
   of the N1 NAS signalling connection as specified in subclause 5.4.4.1.

The AMF should assign a new 5G-GUTI for a particular UE
during a successful registration procedure
for periodic registration update. The AMF may assign a new 5G-GUTI
at any time for a particular UE by performing
the generic UE configuration update procedure.
2021-04-13 17:34:25 +09:00
Sukchan Lee
3275584236 NOKIA gNB added to the tested list (#821) 2021-04-13 10:17:45 +09:00
Sukchan Lee
83720fff9a fix: mobilty -> mobility (#930) 2021-04-13 10:02:52 +09:00
Sukchan Lee
688f2bc249 Update Now in the Github Issue (#874, #712) 2021-04-13 09:58:18 +09:00
Sukchan Lee
e1c8d89bba Update Now in t Github Issue (#872, #863) 2021-04-13 09:36:07 +09:00
Pau Espin Pedrol
520dcf1ff8 pfcp: Fix 'No Heartbeat' log messages (#931) 2021-04-12 20:23:51 +09:00
Sukchan Lee
11be73cab7 Airspan 5G SA was added to the list of tested gNBs 2021-04-10 08:14:35 +09:00
Sukchan Lee
f59cf3eacb Update document for v2.2.6 2021-04-09 21:28:07 +09:00
Sukchan Lee
8f1e591be5 Release v2.2.6 2021-04-09 21:14:42 +09:00
Sukchan Lee
905fc76faf [AMF] Add NGAP ErrorIndication [#910]
1. UE sends PDU session establishment request to the AMF.
2. AMF initiates Release Due to Duplicate Session ID.
3. SMF cannot find the session by SM-Context-Ref.

For the above condition, AMF sends NGAP ErrorIndication to the UE.
2021-04-09 21:02:03 +09:00
Sukchan Lee
745ea41096 [AMF] increase SBI memory pool (#925) 2021-04-09 13:52:19 +09:00
Sukchan Lee
8710cae0fd [Cx] Add sip:<MSISDN> (#921) 2021-04-08 23:09:13 +09:00
Sukchan Lee
27cee12a7b [Cx] User-Name can be skipped in SAR (#921) 2021-04-08 22:49:08 +09:00
Sukchan Lee
44de4673bf [Cx] change the order of IMPU (#921) 2021-04-08 21:35:52 +09:00
Sukchan Lee
2df8a1836f Oops! remove redundant code 2021-04-08 20:46:41 +09:00
Sukchan Lee
3c9541992f [Cx] fix MSISDN public identity (#921)
sip:<MSISDN>@ims.mnc<MNC>.mcc<MCC>.3ggpnetwork.org
tel:<MSISDN>
2021-04-08 20:42:24 +09:00
Sukchan Lee
90f60cad0e misc: Add MSISDN duplicate check in WebUI 2021-04-07 22:45:37 +09:00
Sukchan Lee
26066bb0ca [Cx] LIR/LIA is added (#921) 2021-04-07 21:46:05 +09:00
Sukchan Lee
d3eaaff430 [Cx] fix the Cx integration bug (#919)
- Now security is verified.
2021-04-06 21:36:08 +09:00
Sukchan Lee
d40348c00c [SBI] Unknown timezone offset (#914)
add a debug message for unknown timezone offset
2021-04-05 21:16:52 +09:00
Sukchan Lee
613e21c4ff [PKG] fix debian mongod dependency problem (#915) 2021-04-05 20:32:27 +09:00
Sukchan Lee
41c6bb4681 new: HSS Cx interface is added 2021-04-05 17:09:39 +09:00
Sukchan Lee
23c1fee516 Update document for v2.2.5 2021-04-03 14:22:15 +09:00
Sukchan Lee
a74050a032 Release v2.2.5 2021-04-03 14:18:32 +09:00
Sukchan Lee
bb38c01229 fix : Allow NSSAI in Registration accept (#910)
Always Present Allow NSSAI in Registration accept
2021-04-03 14:07:44 +09:00
Sukchan Lee
ec0752cb95 doc: update document for v2.2.4 2021-04-01 17:04:56 +09:00
Sukchan Lee
b6ba02f6de Release v2.2.4 2021-04-01 16:47:30 +09:00
Sukchan Lee
5f9785af52 sctp: Add sack_delay in sctp configuration (#895) 2021-04-01 15:40:46 +09:00
Sukchan Lee
c0396171ff fix: use prior to v2.2.3, segfault (#898) 2021-04-01 09:28:28 +09:00
Pau Espin Pedrol
0b3ca447c9 sgwc: Log received messages in sxa-handler.c (#896) 2021-03-31 19:59:57 +09:00
Sukchan Lee
68724c6ec1 fix: Support many simultaneous connections (#886) 2021-03-31 17:29:20 +09:00
Sukchan Lee
cc30aa2a9a fix: No S-TMSI in InitialUEMessage (#890) 2021-03-31 15:35:59 +09:00
Nick
3a2a227b48 Updated Python Lib docs and script to migrate DB data to new format (#889)
* Update README.md

* Python script to migrate data from old DB schema to new
2021-03-30 16:56:23 +09:00
Sukchan Lee
a76a2503c2 Release v2.2.3 2021-03-29 23:21:11 +09:00
Sukchan Lee
1e2a16fc5b fix: No Modify Bearer Request (#885)
Now MME send Modify Bearer Request regardless of the order of
Attach Complete and InitialContextSetupResponse
2021-03-29 22:35:34 +09:00
Sukchan Lee
829123dad0 fix: managing multiple calls (#869)
If PCRF sends RAR, it generates different Charging-Rule-Name.
2021-03-29 10:28:08 +09:00
Sukchan Lee
457230a2f6 doc: Re-install with updated source code 2021-03-28 20:44:31 +09:00
Sukchan Lee
6ab5c41af5 conf: Add ignore_requested_nssai parameter (#859)
If parameter.ignore_requsted_nssai is true,
AMF will ignore the UE Requested NSSAI and create an allowed-NSSAI
based on the Default S-NSSAI in the Subscription DB.
2021-03-26 23:12:43 +09:00
Sukchan Lee
b22023afb8 fix: creating allowed NSSAI (#859)
AMF checks whether it can serve all the S-NSSAI(s) from
the Requested NSSAI present in the Subscribed S-NSSAIs
(potentially using configuration for mapping S-NSSAI values
between HPLMN and Serving PLMN), or all the S-NSSAI(s) marked
as default in the Subscribed S-NSSAIs in the case that
no Requested NSSAI was provided or none of the S-NSSAIs
in the Requested NSSAI are permitted,
i.e. do not match any of the Subscribed S-NSSAIs or not available
at the current UE's Tracking Area (see clause 5.15.3).
2021-03-25 23:06:59 +09:00
Sukchan Lee
b21dc65741 fix: Ignore Unknown TLV type in PFCP/GTP (#871) 2021-03-24 09:36:22 +09:00
Kenny Barlee
5d2fea994b NGAP - N2 path name (#870) 2021-03-23 21:26:13 +09:00
Sukchan Lee
ebb48ede53 Freeze usrsctp version to 0.9.5.0 2021-03-21 20:06:24 +09:00
Sukchan Lee
b07d12d3be Update freeDiameter subprojects 2021-03-21 17:46:20 +09:00
Sukchan Lee
54f1ccbb6b Upgrade freeDiameter from v1.3.2 to v1.5.0 2021-03-21 17:44:42 +09:00
Sukchan Lee
52cd51ca6a fix: adjust the actual path amf.plmn_support (#825) 2021-03-20 09:17:14 +09:00
Sukchan Lee
c848919af4 doc: update document for v2.2.2 2021-03-19 22:12:43 +09:00
Sukchan Lee
6df2906f42 Release v2.2.2 2021-03-19 21:50:01 +09:00
Sukchan Lee
ebf1c5b0d9 Release v2.2.2 2021-03-19 21:27:01 +09:00
Sukchan Lee
072fb68882 doc: update document for advertising addr (#825) 2021-03-19 21:14:38 +09:00
Sukchan Lee
182a680d51 feat: advertise address for 5G NFs (#825) 2021-03-19 21:01:38 +09:00
Sukchan Lee
09780e3fed conf: update configuration manual 2021-03-19 13:48:27 +09:00
Sukchan Lee
79df32638c 5gc: Add defaultt NSI configuration for NSSF (#859) 2021-03-19 11:04:02 +09:00
Sukchan Lee
d0eec31f5c upf/sgwu: fix the PDR creation bug (#860)
When PDR is created without deleting session, there is a bug to create
new PDR.
2021-03-19 10:08:37 +09:00
Sukchan Lee
dc474329e2 Fix the MME crash during HandoverCancel (#855) 2021-03-18 22:59:22 +09:00
Sukchan Lee
22b09443ce feat: E-RABModificationIndication/Confirm (#834) 2021-03-17 14:26:57 +09:00
Sukchan Lee
7ba77e6cc1 Release v2.2.1 2021-03-15 10:09:45 +09:00
Sukchan Lee
37e0a714f9 Fixes UE IPv6 BUG (#808) 2021-03-15 10:01:55 +09:00
Sukchan Lee
0270c0e340 ASN.1 encoding failure if no Request-NSSAI #844 2021-03-12 23:25:58 +09:00
Sukchan Lee
a6e42a4932 fix: No S-NSSAI error during NAS signalling #845 2021-03-12 22:45:21 +09:00
Sukchan Lee
0a94e1ece4 Update WebUI version to v2.2.1 (#838)
Security patch is applied. If you want to use this version, you need to
log out and log back in.

See Pull Request #838 for more detailed information.
2021-03-12 09:32:11 +09:00
Sukchan Lee
569f98f92c webui: Follow-up on Pull Request #838
- Update document
- Fix the install script
- Remove last commit to maintain login session
2021-03-12 09:20:58 +09:00
Ryan
7848b6c966 Add API tokens (#838)
* protects db endpoints with auth data, but will require ui updates to function properly

* adds an Authorization header with bearer token to all api/db/* request endpoints

* force login if token doesn't exist

* remove debug code
2021-03-12 09:13:38 +09:00
Sukchan Lee
60b75b5f5e rearrange sponsors image 2021-03-11 16:52:58 +09:00
Sukchan Lee
82261bc8e4 Arrange the sponsor images 2021-03-11 16:42:13 +09:00
Sukchan Lee
9e8700f1a2 Add new sponsors (Skylark Wireless) 2021-03-11 16:37:18 +09:00
Sukchan Lee
fc5c9b2af0 Try to fix the UE infinite attach (#568)
If both Delete-Session-Request/Response and
UEContextReleaseCommand/UEContextReleaseComplete are failed at the same time,
UE cannot attach to the EPC infinitely.

So, I've add the protection code
if timer expires when MME does not receive Delete-Session-Response.
2021-03-09 14:28:07 +09:00
Sukchan Lee
56c0987ad2 doc: update document for changes configuration
o `plmn` -> `plmn_support` in AMF configuration
2021-03-08 22:30:06 +09:00
Sukchan Lee
08751e1b4a doc: update document for changing configuration
o 'pdn' -> 'subnet' in all conf files
2021-03-08 22:27:29 +09:00
Sukchan Lee
de72ccaf91 Release v2.2.0 2021-03-08 21:55:43 +09:00
Sukchan Lee
9af4268bab arch: DB schema Changes (#796)
- New function : NSSF
- New feature : SMF selection
2021-03-08 21:25:09 +09:00
Sukchan Lee
c6bfbed922 Modify not to limit the length of DB URI (#827) 2021-03-03 23:13:20 +09:00
Charlie Lewis
0790674c14 mask mongo credentials when logging (#827) 2021-03-03 23:06:31 +09:00
Sukchan Lee
2f2178595d doc: update troubleshooting (#818) 2021-02-25 23:01:48 -05:00
Paweł
515b5d2b17 Changed the branch name (#811) 2021-02-22 10:24:18 -05:00
Sukchan Lee
31977bf30a SMF: fix the bug for DataForwardingNotPossible
DataForwardingNotPossible should only be included
if Data Path is not available during N2-Handover.

However, there is a bug that always includes
DataFowardingNotPossible regardless of Handover.

So, I've fixed it!
2021-02-18 23:15:36 -05:00
Sukchan Lee
d1400897e0 update: Cause of UEContextReleaseCommand (#789)
When AMF receives UEContextReleaseRequest,
AMF sends UEContextReleaseCommand with Cause received from gNB.
2021-02-17 12:19:20 -05:00
Sukchan Lee
b6bcbac3e3 fix: Add the exception handling (#804)
When UE/gNB repeatedly sends NGAP message repeatedly, AMF crashed.
Exception routines have been added to resolve this issue.
2021-02-15 12:17:33 -05:00
Sukchan Lee
9b5cc4a568 Release v2.1.7 2021-02-08 22:37:01 -05:00
Sukchan Lee
094d40b073 fix: 256 pool num increased to 16,384 (#753) 2021-02-08 14:32:04 -05:00
Sukchan Lee
852756f902 test: Porting FreeBSD 2021-02-08 14:25:40 -05:00
Miguel
fea48f5a44 Update list of eNB/gNB - Added Accelleran's SC (#800) 2021-02-08 07:24:59 -05:00
Sukchan Lee
b19b3e9dd1 Add missing files 2021-02-06 00:15:25 -05:00
Sukchan Lee
7901a1164f mac: Support Apple M1 chips
See https://open5gs.org/open5gs/docs/platform/05-macosx-apple-silicon/
2021-02-06 00:13:48 -05:00
Sukchan Lee
950c4c0a12 Release v2.1.6 2021-02-04 09:27:58 -05:00
Sukchan Lee
5e839e25fe fix: amf crash bug (#793) 2021-02-03 23:49:16 -05:00
Sukchan Lee
d3fa7619bf update document v2.1.5 2021-02-02 15:29:24 -05:00
Sukchan Lee
6cd755ac97 doc: Update document v2.1.5 2021-02-02 15:22:50 -05:00
Sukchan Lee
f597c9e899 doc: update document for v2.1.5 2021-02-02 15:18:01 -05:00
Sukchan Lee
9e8303762c Update document for v2.1.5 2021-02-02 15:07:18 -05:00
Sukchan Lee
e7c261d0d3 Release v2.1.5 2021-02-02 14:50:15 -05:00
Sukchan Lee
e7cb25ac9b asn1c: MME crash is resolved (#783) 2021-02-02 14:27:03 -05:00
Sukchan Lee
f47f65a51c fix: asn1c decode problem for NGReset (#773) 2021-02-02 13:33:09 -05:00
Sukchan Lee
0311d2255c Oops! remove debug info 2021-02-01 10:17:49 -05:00
Sukchan Lee
d9417be9a6 feat: Handling Duplicated PDU Session ID
TS29.502 5.2.2.3.11 AMF requested PDU Session Release due to duplciated
PDU Session Id
2021-02-01 10:14:27 -05:00
Sukchan Lee
373ba1452f log: update debug info for S1AP/NGAP (#785) 2021-02-01 08:52:22 -05:00
smartVan
848b7ffc29 modify handover request and uplink ran status transfer debug info (#785) 2021-02-01 00:50:22 -05:00
Sukchan Lee
ff5236f3e0 feat: Indirect Data Forwarding in N2-Handover 2021-01-31 23:01:15 -05:00
Sukchan Lee
388e64213f etc: miscellaneous work (#779)
o Check IMEISV length == 16 digits
o Add Relative Capabity comment in the configuration file
2021-01-29 00:10:17 -05:00
Sukchan Lee
49a9e58efe feat: Add N2-Handover 2021-01-28 14:23:54 -05:00
Sukchan Lee
0fc5190a09 etc: coding convection (#778) 2021-01-28 14:23:22 -05:00
smartVan
19014a3a25 modify udr smf selection subscription data (#778) 2021-01-28 14:18:02 -05:00
Sukchan Lee
ada01fca8f spec: S1AP/NGAP update to v16.4.0(2021-01-04) 2021-01-24 23:43:42 -05:00
Sukchan Lee
61778f9142 fix: UE Context Request IE handling (#771) 2021-01-23 13:42:59 -05:00
Sukchan Lee
776d323a16 fix: Change UE Context Request IE handling (#771)
Previously, AMF would sends PDUSessionResourceSetupRequest
when the following conditions were met:
- gNB didn't send UE Context Request IE of InitialUEMessage
- AMF should send SMF generated TRANSFER message(PDU_RES_SETUP_REQ)
to the gNB

However, in issues #771, the gNB did not accept
PDUSessionResourceSetupRequest. Perhaps the gNB engineer thought
that if gNB needs to send data traffic to the UE, AMF should send
an InitialContextSetupRequest regardless of UE Context Request IE.
This is because gNB requires the kgNB security context
for data connection.

So, in this case, Open5GS-AMF decided to send
an InitialContexSetupRequest regardless of
whether it received UE Context Request IE of InitialUEMessage.
2021-01-23 11:56:04 -05:00
Sukchan Lee
9eac90252e fix: AMF/SMF/UDM crash issues resolved (#770/#771) 2021-01-22 22:17:01 -05:00
Sukchan Lee
708784e222 fix: User Location in UplinkNASTrasnport (#772)
- Based on pull request #772
- Add 4G EPC User Location Information handling
- Copy ran_ue/enb_ue context to amf_ue/mme_ue context
2021-01-20 10:03:32 -05:00
smartVan
50db1aaeb1 handle user location in ngap uplink nas transport (#772) 2021-01-20 09:27:57 -05:00
Sukchan Lee
8e29eb2417 Update document for v2.1.4 2021-01-18 21:35:08 -05:00
4753 changed files with 389694 additions and 126362 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
# This directory is fetched during first build and is present in this directory
subprojects/freeDiameter
subprojects/usrsctp
webui/.next

View File

@@ -11,6 +11,7 @@ If you find Open5GS useful for work, please consider supporting this Open Source
<img width="260px" src="https://open5gs.org/assets/img/nextepc_logo.jpg">
</a>
</td>
<td width="20px"></td>
<td align="center" valign="middle">
<a href="https://sdr.eee.strath.ac.uk/" target="_blank">
<img width="260px" src="https://open5gs.org/assets/img/strath.png">
@@ -24,19 +25,31 @@ If you find Open5GS useful for work, please consider supporting this Open Source
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<td align="center" valign="middle" height="100px" width="222px">
<a href="https://www.auctionsoftware.com/" target="_blank">
<img width="222px" src="https://open5gs.org/assets/img/asLogonew.png">
<img src="https://open5gs.org/assets/img/asLogonew.png">
</a>
</td>
<td align="center" valign="middle">
<td align="center" valign="middle" height="100px" width="222px">
<a href="https://www.wearetriple.com/" target="_blank">
<img width="222px" src="https://open5gs.org/assets/img/triple_logo.png">
<img src="https://open5gs.org/assets/img/triple_logo.png">
</a>
</td>
<td align="center" valign="middle">
<td align="center" valign="middle" height="100px" width="222px">
<a href="https://www.accessparks.com/" target="_blank">
<img width="222px" src="https://open5gs.org/assets/img/AccessParks.png">
<img src="https://open5gs.org/assets/img/AccessParks.png">
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle" height="100px" width="222px">
<a href="https://skylarkwireless.com/" target="_blank">
<img src="https://open5gs.org/assets/img/SkylarkWireless-420x78-Web2-R.png">
</a>
</td>
<td align="center" valign="middle" height="100px" width="222px">
<a href="https://sysmocom.de/" target="_blank">
<img src="https://open5gs.org/assets/img/sysmocom-logo.png">
</a>
</td>
</tr>

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -67,14 +69,17 @@ smf:
sbi:
- addr: 127.0.0.4
port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -129,19 +134,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -200,6 +205,21 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
udr:
sbi:
- addr: 127.0.0.20

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -101,14 +103,17 @@ smf:
# sbi:
# - addr: 127.0.0.4
# port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -163,19 +168,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -234,6 +239,21 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
udr:
sbi:
- addr: 127.0.0.20

View File

@@ -39,7 +39,7 @@ example_conf = '''
csfb.yaml
volte.yaml
vonr.yaml
minimal.yaml
slice.yaml
srslte.yaml
sample.yaml
'''.split()

View File

@@ -37,7 +37,7 @@ logger:
#
# o SBI Server(https://<all address avaiable>:443)
# sbi:
# tls:
# - tls:
# key: amf.key
# pem: amf.pem
#
@@ -51,7 +51,7 @@ logger:
#
# o SBI Server(http://amf.open5gs.org:80)
# sbi:
# name: amf.open5gs.org
# - name: amf.open5gs.org
#
# o SBI Server(http://127.0.0.5:7777)
# sbi:
@@ -60,7 +60,18 @@ logger:
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# dev: eth0
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-amf.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
# <NGAP Server>>
#
@@ -143,7 +154,7 @@ logger:
# mnc: 70
# s_nssai:
# - sst: 1
# - sd: 010000
# sd: 010000
# - plmn_id:
# mcc: 901
# mnc: 70
@@ -160,6 +171,10 @@ logger:
#
# amf_name: amf1.open5gs.amf.5gc.mnc70.mcc901.3gppnetwork.org
#
# <Relative Capacity> - Default(255)
#
# relative_capacity: 100
#
amf:
sbi:
- addr: 127.0.0.5
@@ -227,9 +242,6 @@ nrf:
#
# parameter:
#
# o Number of output streams per SCTP associations.
# sctp_streams: 30
#
# o Disable use of IPv4 addresses (only IPv6)
# no_ipv4: true
#
@@ -239,12 +251,6 @@ nrf:
# 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:
#
@@ -264,7 +270,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -272,7 +278,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512
@@ -281,6 +287,27 @@ max:
#
pool:
#
# sockopt:
# no_delay : true
#
sockopt:
#
# sctp:
# heartbit_interval : 5000 (5secs)
# sack_delay : 200 (200ms)
# rto_initial : 3000 (3secs)
# rto_min : 1000 (1sec)
# rto_max : 5000 (5secs)
# max_num_of_ostreams : 30
# max_num_of_istreams : 65535
# max_attempts : 4
# max_initial_timeout : 8000(8secs)
# usrsctp_udp_port : 9899
#
sctp:
#
# time:
#
@@ -300,4 +327,12 @@ pool:
# o Message Wait Duration (3000 ms)
# message:
# duration: 3000
#
# o Handover Wait Duration (Default : 300 ms)
# Time to wait for AMF to send UEContextReleaseCommand
# to the source gNB after receiving HandoverNotify
#
# o Handover Wait Duration (500ms)
# handover:
# duration: 500
time:

View File

@@ -37,7 +37,7 @@ logger:
#
# o SBI Server(https://<all address avaiable>:443)
# sbi:
# tls:
# - tls:
# key: ausf.key
# pem: ausf.pem
#
@@ -51,7 +51,7 @@ logger:
#
# o SBI Server(http://ausf.open5gs.org:80)
# sbi:
# name: ausf.open5gs.org
# - name: ausf.open5gs.org
#
# o SBI Server(http://127.0.0.11:7777)
# sbi:
@@ -60,7 +60,18 @@ logger:
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# dev: eth0
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-ausf.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
ausf:
sbi:
@@ -115,12 +126,6 @@ nrf:
# 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:
#
@@ -140,7 +145,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -148,7 +153,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

186
configs/open5gs/bsf.yaml.in Normal file
View File

@@ -0,0 +1,186 @@
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,sbi,bsf,event,tlv,mem,sock
#
logger:
file: @localstatedir@/log/open5gs/bsf.log
#
# bsf:
#
# <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: bsf.key
# pem: bsf.pem
#
# o SBI Server(https://127.0.0.15:443, http://[::1]:80)
# sbi:
# - addr: 127.0.0.15
# tls:
# key: bsf.key
# pem: bsf.pem
# - addr: ::1
#
# o SBI Server(http://bsf.open5gs.org:80)
# sbi:
# - name: bsf.open5gs.org
#
# o SBI Server(http://127.0.0.15:7777)
# sbi:
# - addr: 127.0.0.15
# port: 7777
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-bsf.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
#
# nrf:
#
# <SBI Client>>
#
# o SBI Client(http://127.0.0.10:7777)
# sbi:
# addr: 127.0.0.10
# port: 7777
#
# o SBI Client(https://127.0.0.10:443, http://nrf.open5gs.org:80)
# sbi:
# - addr: 127.0.0.10
# 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.10:80 is selected.
#
# sbi:
# addr:
# - 127.0.0.10
# - fe80::1%@loopback_devname@
#
nrf:
sbi:
- addr:
- 127.0.0.10
- ::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
#
parameter:
#
# max:
#
# o Maximum Number of UE per AMF/MME
# ue: 1024
# o Maximum Number of gNB/eNB per AMF/MME
# gnb: 32
#
max:
#
# pool:
#
# o The default memory pool size was set assuming 1024 UEs.
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
# - Pool-size 8192 => 128 Number
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512
# 8192: 128
# big: 8
#
pool:
#
# time:
#
# o NF Instance Heartbeat (Default : 0)
# NFs will not send heart-beat timer in NFProfile
# NRF will send heart-beat timer in NFProfile
#
# o NF Instance Heartbeat (20 seconds)
# NFs will send heart-beat timer (20 seconds) in NFProfile
# NRF can change heart-beat timer in NFProfile
#
# nf_instance:
# heartbeat: 20
#
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
#
# o Message Wait Duration (3000 ms)
# message:
# duration: 3000
time:

View File

@@ -41,12 +41,6 @@ hss:
# 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:
#
@@ -66,7 +60,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -74,7 +68,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -33,6 +33,8 @@ open5gs_conf = '''
udm.yaml
udr.yaml
pcf.yaml
nssf.yaml
bsf.yaml
'''.split()
foreach file : open5gs_conf

View File

@@ -201,6 +201,10 @@ logger:
#
# mme_name: open5gs-mme0
#
# <Relative Capacity> - Default(255)
#
# relative_capacity: 100
#
mme:
freeDiameter: @sysconfdir@/freeDiameter/mme.conf
s1ap:
@@ -331,9 +335,6 @@ smf:
#
# parameter:
#
# o Number of output streams per SCTP associations.
# sctp_streams: 30
#
# o Disable use of IPv4 addresses (only IPv6)
# no_ipv4: true
#
@@ -343,12 +344,6 @@ smf:
# 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
#
# o Use OAI UE
# - Remove HashMME in Security-mode command message
# - Use the length 1 of EPS network feature support in Attach accept message
@@ -373,7 +368,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -381,7 +376,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512
@@ -391,17 +386,23 @@ max:
pool:
#
# sctp:
# sockopt:
# no_delay : true
#
# 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
sockopt:
#
# sctp:
# heartbit_interval : 5000 (5secs)
# sack_delay : 200 (200ms)
# rto_initial : 3000 (3secs)
# rto_min : 1000 (1sec)
# rto_max : 5000 (5secs)
# max_num_of_ostreams : 30
# max_num_of_istreams : 65535
# max_attempts : 4
# max_initial_timeout : 8000(8secs)
# usrsctp_udp_port : 9899
#
sctp:
@@ -413,4 +414,12 @@ sctp:
# o Message Wait Duration (3000 ms)
# message:
# duration: 3000
#
# o Handover Wait Duration (Default : 300 ms)
# Time to wait for MME to send UEContextReleaseCommand
# to the source eNB after receiving HandoverNotify
#
# o Handover Wait Duration (500ms)
# handover:
# duration: 500
time:

View File

@@ -87,12 +87,6 @@ nrf:
# 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:
#
@@ -112,7 +106,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -120,7 +114,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -0,0 +1,234 @@
#
# 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,sbi,nssf,event,tlv,mem,sock
#
logger:
file: @localstatedir@/log/open5gs/nssf.log
#
# nssf:
#
# <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: nssf.key
# pem: nssf.pem
#
# o SBI Server(https://127.0.0.14:443, http://[::1]:80)
# sbi:
# - addr: 127.0.0.14
# tls:
# key: nssf.key
# pem: nssf.pem
# - addr: ::1
#
# o SBI Server(http://nssf.open5gs.org:80)
# sbi:
# - name: nssf.open5gs.org
#
# o SBI Server(http://127.0.0.14:7777)
# sbi:
# - addr: 127.0.0.14
# port: 7777
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-nssf.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
# <List of avaiable Network Slice Instance(NSI)>
#
# o One NSI
# - NRF[http://::1:7777/nnrf-nfm/v1/nf-instances]
# NSSAI[SST:1]
#
# nsi:
# - addr: ::1
# port: 7777
# s_nssai:
# sst: 1
#
# o Three NSI
# 1. NRF[http://::1:7777/nnrf-nfm/v1/nf-instances]
# S-NSSAI[SST:1]
#
# 2. NRF[http://127.0.0.19:7777/nnrf-nfm/v1/nf-instances]
# NSSAI[SST:1, SD:000080]
#
# 2. NRF[http://127.0.0.10:7777/nnrf-nfm/v1/nf-instances]
# NSSAI[SST:1, SD:009000]
#
# nsi:
# - addr: ::1
# port: 7777
# s_nssai:
# sst: 1
# - addr: 127.0.0.19
# port: 7777
# s_nssai:
# sst: 1
# sd: 000080
# - addr: 127.0.0.10
# port: 7777
# s_nssai:
# sst: 1
# sd: 009000
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
#
# nrf:
#
# <SBI Client>>
#
# o SBI Client(http://127.0.0.10:7777)
# sbi:
# addr: 127.0.0.10
# port: 7777
#
# o SBI Client(https://127.0.0.10:443, http://nrf.open5gs.org:80)
# sbi:
# - addr: 127.0.0.10
# 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.10:80 is selected.
#
# sbi:
# addr:
# - 127.0.0.10
# - fe80::1%@loopback_devname@
#
nrf:
sbi:
- addr:
- 127.0.0.10
- ::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
#
parameter:
#
# max:
#
# o Maximum Number of UE per AMF/MME
# ue: 1024
# o Maximum Number of gNB/eNB per AMF/MME
# gnb: 32
#
max:
#
# pool:
#
# o The default memory pool size was set assuming 1024 UEs.
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
# - Pool-size 8192 => 128 Number
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512
# 8192: 128
# big: 8
#
pool:
#
# time:
#
# o NF Instance Heartbeat (Default : 0)
# NFs will not send heart-beat timer in NFProfile
# NRF will send heart-beat timer in NFProfile
#
# o NF Instance Heartbeat (20 seconds)
# NFs will send heart-beat timer (20 seconds) in NFProfile
# NRF can change heart-beat timer in NFProfile
#
# nf_instance:
# heartbeat: 20
#
# o NF Instance Heartbeat (Disabled)
# nf_instance:
# heartbeat: 0
#
# o NF Instance Heartbeat (10 seconds)
# nf_instance:
# heartbeat: 10
#
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
#
# o Message Wait Duration (3000 ms)
# message:
# duration: 3000
time:

View File

@@ -39,7 +39,7 @@ logger:
#
# o SBI Server(https://<all address avaiable>:443)
# sbi:
# tls:
# - tls:
# key: pcf.key
# pem: pcf.pem
#
@@ -53,7 +53,7 @@ logger:
#
# o SBI Server(http://pcf.open5gs.org:80)
# sbi:
# name: pcf.open5gs.org
# - name: pcf.open5gs.org
#
# o SBI Server(http://127.0.0.13:7777)
# sbi:
@@ -62,7 +62,18 @@ logger:
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# dev: eth0
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-pcf.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
pcf:
sbi:
@@ -117,12 +128,6 @@ nrf:
# 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:
#
@@ -142,7 +147,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -150,7 +155,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -40,14 +40,9 @@ pcrf:
# 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
#
# o Legacy support for pre-release LTE 11 devices to do calling
# - Replace IPv4/v6 local addr field in AAR Media-Subcomponent AVP by any
# - Replace IPv4/v6 local addr field in AAR Media-Subcomponent AVP
# by 'any local port'
# no_ipv4v6_local_addr_in_packet_filter: true
#
parameter:
@@ -69,7 +64,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -77,7 +72,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -45,6 +45,10 @@ logger:
# - addr: 127.0.0.3
# - addr: ::1
#
# o PFCP-U Server(127.0.0.1:2152, [::1]:2152)
# pfcp:
# name: localhost
#
sgwc:
gtpc:
- addr: 127.0.0.3
@@ -63,15 +67,10 @@ sgwc:
#
# <SGWU_SELECTION_MODE - EPC only>
#
# o Round-Robin
# (note that round robin can be disabled for a particular node
# by setting flag 'rr' to 0)
#
# sgwu:
# pfcp:
# - addr: 127.0.0.6
# - addr: 127.0.0.12
# rr: 0
# - addr: 127.0.0.18
#
# o SGWU selection by eNodeB TAC
@@ -122,11 +121,8 @@ sgwu:
# 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
# o Disable selection of SGW-U PFCP in Round-Robin manner
# no_pfcp_rr_select: true
#
parameter:
@@ -147,7 +143,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -155,7 +151,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -24,16 +24,23 @@ logger:
#
# sgwu:
#
# <GTP-U Server>
# <PFCP Server>
#
# o GTP-U Server(all address available)
# gtpu:
# o PFCP Server(127.0.0.6:8805, ::1:8805)
# pfcp:
# - addr: 127.0.0.6
# - addr: ::1
#
# o PFCP-U Server(127.0.0.1:2152, [::1]:2152)
# pfcp:
# - name: localhost
#
# <GTP-U Server>
#
# o GTP-U Server(127.0.0.6:2152, [::1]:2152)
# gtpu:
# - addr:
# - 127.0.0.6
# - ::1
# - addr: 127.0.0.6
# - addr: ::1
#
# o GTP-U Server(127.0.0.1:2152, [::1]:2152)
# gtpu:
@@ -57,44 +64,37 @@ logger:
# o Provide custom SGW-U GTP-U address to be advertised inside S1AP messages
# gtpu:
# - addr: 10.4.128.21
# advertise_addr: 172.24.15.30
# advertise: 172.24.15.30
#
# gtpu:
# - addr: 10.4.128.21
# advertise_addr:
# advertise:
# - 127.0.0.1
# - ::1
#
# gtpu:
# - addr: 10.4.128.21
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
# advertise: sgw1.epc.mnc001.mcc001.3gppnetwork.org
#
# gtpu:
# - dev: ens3
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
#
# <PFCP Server>
#
# o PFCP Server(127.0.0.6:8805, ::1:8805)
# pfcp:
# - addr: 127.0.0.6
# - addr: ::1
# advertise: sgw1.epc.mnc001.mcc001.3gppnetwork.org
#
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
#
# sgwc:
#
# <PFCP Client>>
#
# o PFCP Client(127.0.0.6:8805)
# o PFCP Client(127.0.0.3:8805)
#
# pfcp:
# addr: 127.0.0.6
# addr: 127.0.0.3
#
sgwc:
@@ -113,12 +113,6 @@ sgwc:
# 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:
#
@@ -138,7 +132,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -146,7 +140,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -37,7 +37,7 @@ logger:
#
# o SBI Server(https://<all address avaiable>:443)
# sbi:
# tls:
# - tls:
# key: smf.key
# pem: smf.pem
#
@@ -51,7 +51,7 @@ logger:
#
# o SBI Server(http://smf.open5gs.org:80)
# sbi:
# name: smf.open5gs.org
# - name: smf.open5gs.org
#
# o SBI Server(http://127.0.0.4:7777)
# sbi:
@@ -60,7 +60,18 @@ logger:
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# dev: eth0
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-smf.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
# <PFCP Server>
#
@@ -69,6 +80,10 @@ logger:
# - addr: 127.0.0.4
# - addr: ::1
#
# o PFCP-U Server(127.0.0.1:2152, [::1]:2152)
# pfcp:
# name: localhost
#
# <GTP-C Server>
#
# o GTP-C Server(127.0.0.4:2123, [fe80::3%@loopback_devname@]:2123)
@@ -83,74 +98,78 @@ logger:
# - addr: 127.0.0.4
# - addr: fe80::3%@loopback_devname@
#
# <PDN Configuration with UE Pool>
# <GTP-U Server>>
#
# o GTP-U Server(127.0.0.4:2152, [::1]:2152)
# gtpu:
# - addr: 127.0.0.4
# - addr: ::1
#
# o GTP-U Server(127.0.0.1:2152, [::1]:2152)
# gtpu:
# name: localhost
#
# <Subnet for UE Pool>
#
# o IPv4 Pool
# pdn:
# subnet:
# addr: 10.45.0.1/16
#
# o IPv4/IPv6 Pool
# pdn:
# subnet:
# - addr: 10.45.0.1/16
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
#
#
# o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, cafe:2::1/64
# pdn:
# o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, 2001:230:babe::1/48
#
# subnet:
# - addr: 10.45.0.1/16
# dnn: internet
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
# dnn: internet
# - addr: 10.46.0.1/16
# dnn: ims
# - addr: cafe:2::1/64
# - addr: 2001:230:babe::1/48
# dnn: ims
#
# o Multiple Devices (default: ogstun)
# pdn:
# - addr: 10.45.0.1/16
# dnn: internet
# - addr: cafe:1::1/64
# dnn: internet
# dev: ogstun2
# - addr: 10.46.0.1/16
# dnn: ims
# dev: ogstun3
# - addr: cafe:2::1/64
# dnn: ims
# dev: ogstun3
#
# o Pool Range Sample
# pdn:
# subnet:
# - addr: 10.45.0.1/24
# range: 10.45.0.100-10.45.0.200
#
# pdn:
# subnet:
# - addr: 10.45.0.1/24
# range:
# - 10.45.0.5-10.45.0.50
# - 10.45.0.100-
#
# pdn:
# subnet:
# - addr: 10.45.0.1/24
# range:
# - -10.45.0.200
# - 10.45.0.210-10.45.0.220
#
# pdn:
# subnet:
# - 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
# - addr: 2001:230:cafe::1/48
# range:
# - cafe::a0-cafe:b0
# - cafe::c0-cafe:d0
# - 2001:230:cafe:a0::0-2001:230:cafe:b0::0
# - 2001:230:cafe:c0::0-2001:230:cafe:d0::0
#
# <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
@@ -167,19 +186,152 @@ logger:
# - 127.0.0.1
# - ::1
#
# <SMF Selection - 5G Core only>
# 1. SMF sends SmfInfo(S-NSSAI, DNN, TAI) to the NRF
# 2. NRF responds to AMF with SmfInfo during NF-Discovery.
# 3. AMF selects SMF based on S-NSSAI, DNN and TAI in SmfInfo.
#
# Note that if there is no SmfInfo, any AMF can select this SMF.
#
# o S-NSSAI[SST:1] and DNN[internet] - At least 1 DNN is required in S-NSSAI
# info:
# - s_nssai:
# - sst: 1
# dnn:
# - internet
#
# o S-NSSAI[SST:1 SD:009000] and DNN[internet or ims]
# info:
# - s_nssai:
# - sst: 1
# sd: 009000
# dnn:
# - internet
# - ims
#
# o S-NSSAI[SST:1] and DNN[internet] and TAI[PLMN-ID:90170 TAC:1]
# info:
# - s_nssai:
# - sst: 1
# dnn:
# - internet
# tai:
# - plmn_id:
# mcc: 901
# mnc: 70
# tac: 1
#
# o If any of conditions below are met:
# - S-NSSAI[SST:1] and DNN[internet] and TAI[PLMN-ID:90170 TAC:1-9]
# - S-NSSAI[SST:2 SD:000080] and DNN[internet or ims]
# - S-NSSAI[SST:4] and DNN[internet] and TAI[PLMN-ID:90170 TAC:10-20,30-40]
#
# info:
# - s_nssai:
# - sst: 1
# dnn:
# - internet
# tai:
# - plmn_id:
# mcc: 901
# mnc: 70
# range:
# - 1-9
# - s_nssai:
# - sst: 2
# sd: 000080
# dnn:
# - internet
# - ims
# - s_nssai:
# - sst: 4
# dnn:
# - internet
# tai:
# - plmn_id:
# mcc: 901
# mnc: 70
# range:
# - 10-20
# - 30-40
#
# o Complex Example
# info:
# - s_nssai:
# - sst: 1
# dnn:
# - internet
# - sst: 1
# sd: 000080
# dnn:
# - internet
# - ims
# - sst: 1
# sd: 009000
# dnn:
# [internet, ims]
# - sst: 2
# dnn:
# - internet
# - sst: 3
# sd: 123456
# dnn:
# - internet
# tai:
# - plmn_id:
# mcc: 901
# mnc: 70
# tac: [1, 2, 3]
# - plmn_id:
# mcc: 901
# mnc: 70
# tac: 4
# - plmn_id:
# mcc: 901
# mnc: 70
# tac:
# - 5
# - 6
# - plmn_id:
# mcc: 901
# mnc: 70
# range:
# - 100-200
# - 300-400
# - plmn_id:
# mcc: 901
# mnc: 70
# range:
# - 500-600
# - 700-800
# - 900-1000
# - s_nssai:
# - sst: 4
# dnn:
# - internet
# tai:
# - plmn_id:
# mcc: 901
# mnc: 70
# tac: 99
#
smf:
sbi:
- addr: 127.0.0.4
port: 7777
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
- addr: 127.0.0.4
- addr: ::1
pdn:
gtpc:
- addr: 127.0.0.4
- addr: ::1
gtpu:
- addr: 127.0.0.4
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -231,10 +383,10 @@ nrf:
# pfcp:
# addr: 127.0.0.7
#
# <UPF_SELECTION_MODE - EPC only>
# <UPF Selection>
#
# o Round-Robin
# (note that round robin can be disabled for a particular node
# o Round-Robin
# (note that round robin can be disabled for a particular node
# by setting flag 'rr' to 0)
#
# upf:
@@ -244,8 +396,8 @@ nrf:
# rr: 0
# - addr: 127.0.0.19
#
# o UPF selection by eNodeB TAC
# (either single TAC or multiple TACs, DECIMAL representation)
# o UPF selection by eNodeB TAC
# (either single TAC or multiple TACs, DECIMAL representation)
#
# upf:
# pfcp:
@@ -254,7 +406,7 @@ nrf:
# - 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)
# o UPF selection by UE's DNN/APN (either single DNN/APN or multiple DNNs/APNs)
#
# upf:
# pfcp:
@@ -263,8 +415,8 @@ nrf:
# - addr: 127.0.0.12
# dnn: [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)
# 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:
@@ -292,11 +444,8 @@ upf:
# 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
# o Disable selection of UPF PFCP in Round-Robin manner
# no_pfcp_rr_select: true
#
parameter:
@@ -317,7 +466,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -325,7 +474,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512
@@ -353,4 +502,13 @@ pool:
# o Message Wait Duration (3000 ms)
# message:
# duration: 3000
#
# o Handover Wait Duration (Default : 300 ms)
# Time to wait for SMF to send
# PFCP Session Modification Request(Remove Indirect Tunnel) to the UPF
# after sending Nsmf_PDUSession_UpdateSMContext Response(hoState:COMPLETED)
#
# o Handover Wait Duration (500ms)
# handover:
# duration: 500
time:

View File

@@ -37,7 +37,7 @@ logger:
#
# o SBI Server(https://<all address avaiable>:443)
# sbi:
# tls:
# - tls:
# key: udm.key
# pem: udm.pem
#
@@ -51,7 +51,7 @@ logger:
#
# o SBI Server(http://udm.open5gs.org:80)
# sbi:
# name: udm.open5gs.org
# - name: udm.open5gs.org
#
# o SBI Server(http://127.0.0.12:7777)
# sbi:
@@ -60,7 +60,18 @@ logger:
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# dev: eth0
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-udm.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
udm:
sbi:
@@ -115,12 +126,6 @@ nrf:
# 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:
#
@@ -140,7 +145,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -148,7 +153,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -39,7 +39,7 @@ logger:
#
# o SBI Server(https://<all address avaiable>:443)
# sbi:
# tls:
# - tls:
# key: udr.key
# pem: udr.pem
#
@@ -53,7 +53,7 @@ logger:
#
# o SBI Server(http://udr.open5gs.org:80)
# sbi:
# name: udr.open5gs.org
# - name: udr.open5gs.org
#
# o SBI Server(http://127.0.0.20:7777)
# sbi:
@@ -62,7 +62,18 @@ logger:
#
# o SBI Server(http://<eth0 IP address>:80)
# sbi:
# dev: eth0
# - dev: eth0
#
# o Provide custom SBI address to be advertised to NRF
# sbi:
# - dev: eth0
# advertise: open5gs-udr.svc.local
#
# sbi:
# - addr: localhost
# advertise:
# - 127.0.0.99
# - ::1
#
udr:
sbi:
@@ -117,12 +128,6 @@ nrf:
# 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:
#
@@ -142,7 +147,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -150,7 +155,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -31,16 +31,16 @@ logger:
# - addr: 127.0.0.7
# - addr: ::1
#
# <GTP-U Server>>
# o PFCP-U Server(127.0.0.1:2152, [::1]:2152)
# pfcp:
# name: localhost
#
# o GTP-U Server(all address available)
# gtpu:
# <GTP-U Server>>
#
# o GTP-U Server(127.0.0.7:2152, [::1]:2152)
# gtpu:
# - addr:
# - 127.0.0.7
# - ::1
# - addr: 127.0.0.7
# - addr: ::1
#
# o GTP-U Server(127.0.0.1:2152, [::1]:2152)
# gtpu:
@@ -64,121 +64,96 @@ logger:
# o Provide custom UPF GTP-U address to be advertised inside NGAP messages
# gtpu:
# - addr: 10.4.128.21
# advertise_addr: 172.24.15.30
# advertise: 172.24.15.30
#
# gtpu:
# - addr: 10.4.128.21
# advertise_addr:
# advertise:
# - 127.0.0.1
# - ::1
#
# gtpu:
# - addr: 10.4.128.21
# advertise_name: upf1.5gc.mnc001.mcc001.3gppnetwork.org
# advertise: upf1.5gc.mnc001.mcc001.3gppnetwork.org
#
# gtpu:
# - dev: ens3
# advertise_name: upf1.5gc.mnc001.mcc001.3gppnetwork.org
# advertise: upf1.5gc.mnc001.mcc001.3gppnetwork.org
#
# <Subnet for UE network>
#
# <PDN Configuration with UE Pool>
# Note that you need to setup your UE network using TUN device.
# (ogstun, ogstun2, ogstunX, ..)
#
# o IPv4 Pool
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
#
# pdn:
# subnet:
# 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
# $ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
#
# pdn:
# subnet:
# - addr: 10.45.0.1/16
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
#
#
# o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, cafe:2::1/64
# All other APNs use 10.45.0.1/16, cafe:1::1/64
# o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, 2001:230:babe::1/48
# All other APNs use 10.45.0.1/16, 2001:230:cafe::1/48
# $ 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
# $ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
# $ sudo ip addr add 2001:230:babe::1/48 dev ogstun
#
# pdn:
# subnet:
# - addr: 10.45.0.1/16
# dnn: internet
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
# dnn: internet
# - addr: 10.46.0.1/16
# dnn: ims
# - addr: cafe:2::1/64
# - addr: 2001:230:babe::1/48
# dnn: ims
#
# 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 2001:230:cafe::1/48 dev ogstun2
# $ sudo ip addr add 10.46.0.1/16 dev ogstun3
# $ sudo ip addr add cafe:2::1/64 dev ogstun3
# $ sudo ip addr add 2001:230:babe::1/48 dev ogstun3
#
# pdn:
# subnet:
# - addr: 10.45.0.1/16
# dnn: internet
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
# dnn: internet
# dev: ogstun2
# - addr: 10.46.0.1/16
# dnn: ims
# dev: ogstun3
# - addr: cafe:2::1/64
# - addr: 2001:230:babe::1/48
# dnn: ims
# 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
#
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
#
# smf:
#
# <PFCP Client>>
#
# o PFCP Client(127.0.0.3:8805)
# o PFCP Client(127.0.0.4:8805)
#
# pfcp:
# addr: 127.0.0.3
# addr: 127.0.0.4
#
smf:
@@ -197,13 +172,6 @@ smf:
# 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:
#
@@ -223,7 +191,7 @@ max:
# To connect more UEs, you need to increase the size further.
#
# - Pool-size 128 => 65536 Number
# - Pool-size 256 => 8192 Number
# - Pool-size 256 => 16384 Number
# - Pool-size 512 => 4096 Number
# - Pool-size 1024 => 1024 Number
# - Pool-size 2048 => 512 Number
@@ -231,7 +199,7 @@ max:
# - Pool-size 1024*1024 => 8 Number
#
# 128: 65536
# 256: 8192
# 256: 16384
# 512: 4096
# 1024: 1024
# 2048: 512

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -67,14 +69,17 @@ smf:
sbi:
- addr: 127.0.0.4
port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -129,19 +134,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -200,6 +205,20 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
udr:
sbi:
- addr: 127.0.0.20

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -67,14 +69,17 @@ smf:
sbi:
- addr: 127.0.0.4
port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -105,25 +110,26 @@ amf:
- addr: 127.0.0.5
guami:
- plmn_id:
mcc: 208
mnc: 93
mcc: 901
mnc: 70
amf_id:
region: 202
set: 1016
tai:
- plmn_id:
mcc: 208
mnc: 93
mcc: 901
mnc: 70
tac: 1
plmn_support:
- plmn_id:
mcc: 208
mnc: 93
mcc: 901
mnc: 70
s_nssai:
- sst: 1
sd: 010203
- sst: 1
sd: 112233
sd: 000080
- sst: 1
sd: 009000
security:
integrity_order : [ NIA2, NIA1 ]
ciphering_order : [ NEA0, NEA1, NEA2 ]
@@ -132,19 +138,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -203,6 +209,31 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
- addr: 127.0.0.19
port: 7777
s_nssai:
sst: 1
sd: 000080
- addr: 127.0.0.10
port: 7777
s_nssai:
sst: 1
sd: 009000
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
udr:
sbi:
- addr: 127.0.0.20

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -67,14 +69,17 @@ smf:
# sbi:
# - addr: 127.0.0.4
# port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -129,19 +134,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -200,6 +205,21 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
udr:
sbi:
- addr: 127.0.0.20

View File

@@ -3,4 +3,4 @@ Name=ogstun
[Network]
Address=10.45.0.1/16
Address=cafe::1/64
Address=2001:230:cafe::1/48

View File

@@ -28,6 +28,8 @@ systemd_conf_in = '''
open5gs-ausfd.service
open5gs-udmd.service
open5gs-pcfd.service
open5gs-nssfd.service
open5gs-bsfd.service
open5gs-udrd.service
'''.split()

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Open5GS BSF Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=open5gs
Group=open5gs
Restart=always
ExecStart=@bindir@/open5gs-bsfd -c @sysconfdir@/open5gs/bsf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Open5GS NRF Daemon
After=networking.service
Wants=mongodb.service mongod.service
[Service]
Type=simple

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Open5GS NSSF Daemon
After=networking.service
[Service]
Type=simple
User=open5gs
Group=open5gs
Restart=always
ExecStart=@bindir@/open5gs-nssfd -c @sysconfdir@/open5gs/nssf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Open5GS PCF Daemon
After=networking.service
Wants=mongodb.service mongod.service
[Service]
Type=simple

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Open5GS UDR Daemon
After=networking.service
Wants=mongodb.service mongod.service
[Service]
Type=simple

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -67,14 +69,17 @@ smf:
# sbi:
# - addr: 127.0.0.4
# port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -132,19 +137,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -163,6 +168,8 @@ hss:
connect:
- identity: mme.localdomain
addr: 127.0.0.2
- identity: ims.localdomain
addr: 127.0.0.1
pcrf:
freeDiameter:
identity: pcrf.localdomain
@@ -180,7 +187,7 @@ pcrf:
connect:
- identity: smf.localdomain
addr: 127.0.0.4
- identity: pcscf.localdomain
- identity: ims.localdomain
addr: 127.0.0.1
#nrf:
@@ -205,6 +212,21 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
udr:
sbi:
- addr: 127.0.0.20

View File

@@ -10,6 +10,8 @@ parameter:
# no_ausf: true
# no_udm: true
# no_pcf: true
# no_nssf: true
# no_bsf: true
# no_udr: true
# no_mme: true
# no_sgwc: true
@@ -67,14 +69,17 @@ smf:
sbi:
- addr: 127.0.0.4
port: 7777
pfcp:
- addr: 127.0.0.4
gtpc:
- addr: 127.0.0.4
- addr: ::1
pfcp:
gtpu:
- addr: 127.0.0.4
pdn:
- addr: ::1
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4
@@ -132,19 +137,19 @@ amf:
amf_name: open5gs-amf0
sgwu:
gtpu:
- addr: 127.0.0.6
pfcp:
- addr: 127.0.0.6
gtpu:
- addr: 127.0.0.6
upf:
pfcp:
- addr: 127.0.0.7
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
hss:
freeDiameter:
@@ -205,6 +210,26 @@ pcf:
- addr: 127.0.0.13
port: 7777
nssf:
sbi:
- addr: 127.0.0.14
port: 7777
nsi:
- addr: ::1
port: 7777
s_nssai:
sst: 1
bsf:
sbi:
- addr: 127.0.0.15
port: 7777
af:
sbi:
- addr: 127.0.0.16
port: 7777
udr:
sbi:
- addr: 127.0.0.20

282
debian/changelog vendored
View File

@@ -1,3 +1,285 @@
open5gs (2.3.0) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 08 Jun 2021 21:19:10 +0900
open5gs (2.3.0~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 08 Jun 2021 21:18:10 +0900
open5gs (2.3.0~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 08 Jun 2021 21:16:53 +0900
open5gs (2.3.0~hirsute) hirsute; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 08 Jun 2021 21:15:17 +0900
open5gs (2.2.9) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 14:12:49 +0900
open5gs (2.2.9~hirsute1) hirsute; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 14:11:46 +0900
open5gs (2.2.9~bionic1) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 14:10:51 +0900
open5gs (2.2.9~focal1) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 14:09:29 +0900
open5gs (2.2.9~hirsute) hirsute; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 14:06:05 +0900
open5gs (2.2.9~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 13:32:46 +0900
open5gs (2.2.9~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Wed, 19 May 2021 13:31:08 +0900
open5gs (2.2.8) unstable; urgency=medium
* Security Protection
-- Sukchan Lee <acetcom@gmail.com> Sun, 09 May 2021 11:23:01 +0900
open5gs (2.2.8~bionic) bionic; urgency=medium
* Security Protection
-- Sukchan Lee <acetcom@gmail.com> Sun, 09 May 2021 11:22:02 +0900
open5gs (2.2.8~focal) focal; urgency=medium
* Security Protection
-- Sukchan Lee <acetcom@gmail.com> Sun, 09 May 2021 11:20:13 +0900
open5gs (2.2.7) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Fri, 30 Apr 2021 14:20:47 +0900
open5gs (2.2.7~focal3) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Fri, 30 Apr 2021 14:19:39 +0900
open5gs (2.2.7~bionic3) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Fri, 30 Apr 2021 14:17:11 +0900
open5gs (2.2.6) unstable; urgency=medium
* HSS Cx Added
-- Sukchan Lee <acetcom@gmail.com> Fri, 09 Apr 2021 21:10:43 +0900
open5gs (2.2.6~bionic) bionic; urgency=medium
* HSS Cx Added
-- Sukchan Lee <acetcom@gmail.com> Fri, 09 Apr 2021 21:09:14 +0900
open5gs (2.2.6~focal) focal; urgency=medium
* HSS Cx Added
-- Sukchan Lee <acetcom@gmail.com> Fri, 09 Apr 2021 21:07:19 +0900
open5gs (2.2.5) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sat, 03 Apr 2021 14:16:23 +0900
open5gs (2.2.5~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sat, 03 Apr 2021 14:14:53 +0900
open5gs (2.2.5~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sat, 03 Apr 2021 14:13:33 +0900
open5gs (2.2.4) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 01 Apr 2021 16:45:22 +0900
open5gs (2.2.4~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 01 Apr 2021 16:43:54 +0900
open5gs (2.2.4~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 01 Apr 2021 16:42:31 +0900
open5gs (2.2.3) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Mon, 29 Mar 2021 22:44:54 +0900
open5gs (2.2.3~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Mon, 29 Mar 2021 22:43:54 +0900
open5gs (2.2.3~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Mon, 29 Mar 2021 22:42:53 +0900
open5gs (2.2.2) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Mar 2021 21:48:13 +0900
open5gs (2.2.2~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Mar 2021 21:47:12 +0900
open5gs (2.2.2~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Mar 2021 21:45:47 +0900
open5gs (2.2.1) unstable; urgency=medium
* UE IPv6 Support
-- Sukchan Lee <acetcom@gmail.com> Mon, 15 Mar 2021 10:06:16 +0900
open5gs (2.2.1~bionic) bionic; urgency=medium
* UE IPv6 Support
-- Sukchan Lee <acetcom@gmail.com> Mon, 15 Mar 2021 10:05:00 +0900
open5gs (2.2.1~focal) focal; urgency=medium
* UE IPv6 Support
-- Sukchan Lee <acetcom@gmail.com> Mon, 15 Mar 2021 10:03:39 +0900
open5gs (2.2.0) unstable; urgency=medium
* DB Schame Changes
-- Sukchan Lee <acetcom@gmail.com> Mon, 08 Mar 2021 21:31:35 +0900
open5gs (2.2.0~bionic) bionic; urgency=medium
* DB Schame Changes
-- Sukchan Lee <acetcom@gmail.com> Mon, 08 Mar 2021 21:30:31 +0900
open5gs (2.2.0~focal) focal; urgency=medium
* DB Schame Changes
-- Sukchan Lee <acetcom@gmail.com> Mon, 08 Mar 2021 21:29:03 +0900
open5gs (2.1.7) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Mon, 08 Feb 2021 22:27:23 -0500
open5gs (2.1.7~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Mon, 08 Feb 2021 22:26:08 -0500
open5gs (2.1.7~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Mon, 08 Feb 2021 22:23:55 -0500
open5gs (2.1.6) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 04 Feb 2021 09:18:13 -0500
open5gs (2.1.6~bionic1) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 04 Feb 2021 09:17:04 -0500
open5gs (2.1.6~focal1) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Thu, 04 Feb 2021 09:14:17 -0500
open5gs (2.1.5) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 02 Feb 2021 14:47:59 -0500
open5gs (2.1.5~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 02 Feb 2021 14:46:57 -0500
open5gs (2.1.5~focal) focal; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 02 Feb 2021 14:45:48 -0500
open5gs (2.1.4) unstable; urgency=medium
* Paging was added

27
debian/control vendored
View File

@@ -20,6 +20,7 @@ Build-Depends: debhelper (>= 11),
libmicrohttpd-dev,
libcurl4-gnutls-dev,
libnghttp2-dev,
libtins-dev,
Standards-Version: 4.3.0
Rules-Requires-Root: no
Homepage: https://open5gs.org
@@ -199,6 +200,30 @@ Description: PCF (Policy Control Function)
.
This package provides the PCF (Policy Control Function)
Package: open5gs-nssf
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
open5gs-common (= ${binary:Version})
Description: NSSF (Network Slice Selection Function)
Open5GS is a C-language implementation of 5G Core and EPC
Packet Core, i.e. the core network of an NR/LTE network (Release-16)
.
This package provides the NSSF (Network Slice Selection Function)
Package: open5gs-bsf
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
open5gs-common (= ${binary:Version})
Description: PCF (Policy Control Function)
Open5GS is a C-language implementation of 5G Core and EPC
Packet Core, i.e. the core network of an NR/LTE network (Release-16)
.
This package provides the BSF (Binding Support Function)
Package: open5gs-udr
Architecture: any
Multi-Arch: same
@@ -228,6 +253,8 @@ Depends: ${misc:Depends},
open5gs-ausf (= ${binary:Version}),
open5gs-udm (= ${binary:Version}),
open5gs-pcf (= ${binary:Version}),
open5gs-nssf (= ${binary:Version}),
open5gs-bsf (= ${binary:Version}),
open5gs-udr (= ${binary:Version})
Description: 5G Core and EPC (metapackage)
Open5GS is a C-language implementation of 5G Core and EPC

3
debian/open5gs-bsf.install vendored Normal file
View File

@@ -0,0 +1,3 @@
usr/bin/open5gs-bsfd
configs/open5gs/bsf.yaml etc/open5gs
configs/systemd/open5gs-bsfd.service lib/systemd/system

View File

@@ -3,4 +3,4 @@ usr/lib/*/libfd*.so*
usr/lib/*/freeDiameter/*.fdx
configs/freeDiameter/cacert.pem /etc/freeDiameter
configs/logrotate/open5gs /etc/logrotate.d
misc/db/open5gs-dbctl /usr/bin
#misc/db/open5gs-dbctl /usr/bin

3
debian/open5gs-nssf.install vendored Normal file
View File

@@ -0,0 +1,3 @@
usr/bin/open5gs-nssfd
configs/open5gs/nssf.yaml etc/open5gs
configs/systemd/open5gs-nssfd.service lib/systemd/system

View File

@@ -1,76 +1,112 @@
Docker running example
===========================================
* Build Image
$ docker-compose build
`$ docker-compose build`
* Development
$ docker-compose run dev
`$ docker-compose run dev`
* Runtime
```
$ docker-compose \
-f docker-compose.yml -f docker-compose.run.yml run run
```
* Test
```
$ docker-compose \
-f docker-compose.yml -f docker-compose.test.yml run test
```
* Test(ubuntu:artful)
```
$ TAG=eoan docker-compose build
$ TAG=eoan docker-compose \
-f docker-compose.yml -f docker-compose.test.yml run test
```
* Development(fedora:latest)
```
$ DIST=fedora docker-compose build
$ DIST=fedora docker-compose run dev
```
* Runtime(debian:jessie)
```
$ DIST=debian TAG=stretch docker-compose build
$ DIST=debian TAG=stretch docker-compose
-f docker-compose.yml -f docker-compose.run.yml run run
```
* All Test with All Environment
$ ./check.sh
`$ ./check.sh`
* Run WebUI
$ docker-compose up -d
`$ docker-compose up -d`
For OpenSUSE Build Service Release
===========================================
* Build Package
```
$ ./build-aux/git-version-gen . > .tarball-version
$ dpkg-source -b .
$ rm -f .tarball-version
```
* Get Release Key
```
$ wget http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/Release.key
$ sudo apt-key add Release.key
```
* Setup Repository
```
$ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/ ./' > /etc/apt/sources.list.d/open5gs-latest.list"
$ sudo apt-get update
```
For Launchpad Release
===========================================
* Run Docker
```
$ docker-compose run dev
```
* Setup Debian Environment
```
export DEBFULLNAME='Sukchan Lee'
export DEBEMAIL='acetcom@gmail.com'
```
* Transfer GPG key
```
$ gpg --export-secret-keys --armor --output private.asc
$ gpg --import private.asc
$ gpg --export > public.asc
$ gpg --import public.asc
```
* Version Change
```
$ vi meson.build
$ ./misc/git-version-gen . > .tarball-version 2>/dev/null
```
* Upload OpenBuildService
```
$ dch -i
$ meson subprojects download freeDiameter
$ debuild -S -uc -us -d
@@ -78,16 +114,25 @@ export DEBEMAIL='acetcom@gmail.com'
$ cd home\:acetcom\:open5gs/latest/
$ cp ~/git/open5gs_1.0.0.* .
$ osc ci -m "Update it"
```
* Upload LaunchPad
```
$ dch -i
$ meson subprojects download freeDiameter
$ debuild -S -d
$ dput ppa:open5gs/latest *.source.changes
```
* Tagging
```
$ git tag v1.x.x -a
```
* Build package
```
$ dpkg-buildpackage -d
```

View File

@@ -0,0 +1,26 @@
ARG dist=alpine
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN apk update && \
apk add --no-cache \
alpine-sdk \
bison \
flex \
git \
meson \
bash \
linux-headers \
bsd-compat-headers \
yaml-dev \
lksctp-tools-dev \
gnutls-dev \
libgcrypt-dev \
libidn-dev \
mongo-c-driver-dev \
libmicrohttpd-dev \
curl-dev \
nghttp2-dev \
iproute2

View File

@@ -1,21 +1,19 @@
ARG dist=centos
ARG dist=alpine
ARG tag=latest
ARG username=acetcom
FROM ${username}/${dist}-${tag}-open5gs-base
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN yum -y install \
cscope \
vim \
sudo \
iputils \
net-tools
COPY setup.sh /root
RUN apk update && \
apk add --no-cache \
vim \
sudo
ARG username=acetcom
RUN useradd -m --uid=1000 ${username} && \
RUN adduser -u 1000 acetcom -D && \
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
chmod 0440 /etc/sudoers.d/${username}

View File

@@ -5,6 +5,6 @@ if ! grep "ogstun" /proc/net/dev > /dev/null; then
fi
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
ip addr add 10.45.0.1/16 dev ogstun
ip addr del cafe::1/64 dev ogstun 2> /dev/null
ip addr add cafe::1/64 dev ogstun
ip addr del 2001:230:cafe::1/48 dev ogstun 2> /dev/null
ip addr add 2001:230:cafe::1/48 dev ogstun
ip link set ogstun up

View File

@@ -10,10 +10,10 @@ COPY setup.sh /root
ARG USER=open5gs
ARG REPO=open5gs
ARG BRANCH=master
RUN git clone https://github.com/$USER/$REPO
ARG BRANCH=main
RUN git clone https://github.com/$USER/$REPO
ADD https://api.github.com/repos/$USER/$REPO/git/refs/heads/$BRANCH /root/open5gs-ver.json
RUN cd $REPO && \
git fetch && git checkout -f -B $BRANCH origin/$BRANCH && \
RUN cd $REPO && \
git fetch && git checkout -f -B $BRANCH origin/$BRANCH && \
meson build && ninja -C build install

View File

@@ -5,6 +5,6 @@ if ! grep "ogstun" /proc/net/dev > /dev/null; then
fi
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
ip addr add 10.45.0.1/16 dev ogstun
ip addr del cafe::1/64 dev ogstun 2> /dev/null
ip addr add cafe::1/64 dev ogstun
ip addr del 2001:230:cafe::1/48 dev ogstun 2> /dev/null
ip addr add 2001:230:cafe::1/48 dev ogstun
ip link set ogstun up

View File

@@ -1,30 +0,0 @@
ARG dist=centos
ARG tag=latest
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 update
RUN yum -y install \
python3 \
ninja-build \
gcc \
flex \
bison \
git \
meson \
lksctp-tools-devel \
libidn-devel \
gnutls-devel \
libgcrypt-devel \
openssl-devel \
cyrus-sasl-devel \
libyaml-devel \
mongo-c-driver-devel \
libmicrohttpd-devel \
libcurl-devel \
libnghttp2-devel \
iproute

View File

@@ -1 +0,0 @@
../8/dev

View File

@@ -1 +0,0 @@
latest

View File

@@ -1,37 +0,0 @@
ARG dist=centos
ARG tag=latest
FROM ${dist}:${tag}
MAINTAINER Sukchan Lee <acetcom@gmail.com>
RUN dnf -y install epel-release && \
dnf -y install 'dnf-command(config-manager)' && \
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 \
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 \
libnghttp2-devel \
iproute
RUN dnf -y install meson

View File

@@ -9,9 +9,6 @@ TAG=bionic docker-compose -f docker-compose.yml -f docker-compose.test.yml run -
DIST=fedora TAG=32 docker-compose build
DIST=fedora TAG=32 docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
DIST=centos docker-compose build
DIST=centos docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
DIST=debian docker-compose build
DIST=debian docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test

View File

@@ -28,6 +28,7 @@ RUN apt-get update && \
libmicrohttpd-dev \
libcurl4-gnutls-dev \
libnghttp2-dev \
libtins-dev \
iproute2 \
ca-certificates \
netbase \

View File

@@ -5,6 +5,6 @@ if ! grep "ogstun" /proc/net/dev > /dev/null; then
fi
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
ip addr add 10.45.0.1/16 dev ogstun
ip addr del cafe::1/64 dev ogstun 2> /dev/null
ip addr add cafe::1/64 dev ogstun
ip addr del 2001:230:cafe::1/48 dev ogstun 2> /dev/null
ip addr add 2001:230:cafe::1/48 dev ogstun
ip link set ogstun up

View File

@@ -15,4 +15,4 @@ services:
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
hostname: open5gs-test
command: /bin/bash -c "/root/setup.sh; cd open5gs && ninja -C build test"
command: /bin/bash -c "/root/setup.sh; cd open5gs/build && meson test -v"

View File

@@ -8,6 +8,7 @@ RUN dnf -y install \
python3 \
ninja-build \
gcc \
gcc-c++ \
flex \
bison \
git \

View File

@@ -5,6 +5,6 @@ if ! grep "ogstun" /proc/net/dev > /dev/null; then
fi
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
ip addr add 10.45.0.1/16 dev ogstun
ip addr del cafe::1/64 dev ogstun 2> /dev/null
ip addr add cafe::1/64 dev ogstun
ip addr del 2001:230:cafe::1/48 dev ogstun 2> /dev/null
ip addr add 2001:230:cafe::1/48 dev ogstun
ip link set ogstun up

View File

@@ -28,6 +28,7 @@ RUN apt-get update && \
libmicrohttpd-dev \
libcurl4-gnutls-dev \
libnghttp2-dev \
libtins-dev \
iproute2 \
ca-certificates \
netbase \

View File

@@ -23,12 +23,12 @@ RUN apt-get update && \
net-tools && \
apt-get clean
RUN apt-get update && \
apt-get install -y software-properties-common && \
sudo add-apt-repository ppa:wireshark-dev/stable -y && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y wireshark
#RUN apt-get update && \
# apt-get install -y software-properties-common && \
# sudo add-apt-repository ppa:wireshark-dev/stable -y && \
# apt-get update && \
# DEBIAN_FRONTEND=noninteractive \
# apt-get install -y wireshark
COPY setup.sh /root

View File

@@ -5,6 +5,6 @@ if ! grep "ogstun" /proc/net/dev > /dev/null; then
fi
ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null
ip addr add 10.45.0.1/16 dev ogstun
ip addr del cafe::1/64 dev ogstun 2> /dev/null
ip addr add cafe::1/64 dev ogstun
ip addr del 2001:230:cafe::1/48 dev ogstun 2> /dev/null
ip addr add 2001:230:cafe::1/48 dev ogstun
ip link set ogstun up

View File

@@ -3,7 +3,7 @@ FROM node:carbon
MAINTAINER Sukchan Lee <acetcom@gmail.com>
ARG PACKAGE=open5gs
ARG VERSION=1.0.0
ARG VERSION=2.2.6
RUN set -e; \
cd /usr/src; \

View File

@@ -9,7 +9,8 @@ source "https://rubygems.org"
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.5"
gem "jekyll", "~> 4.2.0"
gem "webrick", "~> 1.7.0"
gem "minima", "~> 2.0"
gem 'jekyll-seo-tag'

View File

@@ -1,77 +1,83 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
concurrent-ruby (1.1.8)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.10.0)
ffi (1.15.0)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
jekyll (4.2.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
jekyll-feed (0.12.1)
terminal-table (~> 2.0)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-redirect-from (0.15.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.0)
jekyll (~> 3.3)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.7.1)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
minima (2.5.0)
jekyll (~> 3.5)
listen (3.5.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.3.0)
ruby_dep (1.5.0)
rexml (3.2.4)
rouge (3.26.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
webrick (1.7.0)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.8.5)
jekyll (~> 4.2.0)
jekyll-feed (~> 0.6)
jekyll-redirect-from
jekyll-seo-tag
minima (~> 2.0)
webrick (~> 1.7.0)
BUNDLED WITH
2.0.1
2.2.15

View File

@@ -34,7 +34,7 @@ The Open5GS 4G/ 5G NSA Core contains the following components:
The core has two main planes: the control plane and the user plane. These are physically separated in Open5GS as CUPS (control/ user plane separation) is implemented.
The MME is the main **control plane** hub of the core. It primarily manages sessions, mobilty, paging and bearers. It links to the HSS, which generates SIM authentication vectors and holds the subscriber profile; and also to the SGWC and PGWC/SMF, which are the control planes of the gateway servers. All the eNBs in the mobile network (4G basestations) connect to the MME. The final element of the control plane is the PCRF, which sits in-between the PGWC/SMF and the HSS, and handles charging and enforces subscriber policies.
The MME is the main **control plane** hub of the core. It primarily manages sessions, mobility, paging and bearers. It links to the HSS, which generates SIM authentication vectors and holds the subscriber profile; and also to the SGWC and PGWC/SMF, which are the control planes of the gateway servers. All the eNBs in the mobile network (4G basestations) connect to the MME. The final element of the control plane is the PCRF, which sits in-between the PGWC/SMF and the HSS, and handles charging and enforces subscriber policies.
The **user plane** carries user data packets between the eNB/ NSA gNB (5G NSA basestations) and the external WAN. The two user plane core components are the SGWU and PGWU/UPF. Each of these connect back to their control plane counterparts. eNBs/ NSA gNBs connect to the SGWU, which connects to the PGWU/UPF, and on to the WAN. *By having the control and user planes physically separated like this, it means you can deploy multiple user plane servers in the field (eg somewhere with a high speed Internet connection), whilst keeping control functionality centralised. This enables support of MEC use cases, for example.*
@@ -52,8 +52,10 @@ The Open5GS 5G SA Core contains the following functions:
* UDM - Unified Data Management
* UDR - Unified Data Repository
* PCF - Policy and Charging Function
* NSSF - Network Slice Selection Function
* BSF - Binding Support Function
The 5G SA core works in a different way to the 4G core - it uses a **Service Based Architecture** (SBI). **Control plane** functions are configured to register with the NRF, and the NRF then helps them discover the other core functions. Running through the other functions: The AMF handles connection and mobility management; a subset of what the 4G MME is tasked with. gNBs (5G basestations) connect to the AMF. The UDM, AUSF and UDR carry out similar operations as the 4G HSS, generating SIM authentication vectors and holding the subscriber profile. Session management is all handled by the SMF (previously the responsibility of the 4G MME/ SGWC/ PGWC). Finally there is the PCF, used for charging and enforcing subscriber policies.
The 5G SA core works in a different way to the 4G core - it uses a **Service Based Architecture** (SBI). **Control plane** functions are configured to register with the NRF, and the NRF then helps them discover the other core functions. Running through the other functions: The AMF handles connection and mobility management; a subset of what the 4G MME is tasked with. gNBs (5G basestations) connect to the AMF. The UDM, AUSF and UDR carry out similar operations as the 4G HSS, generating SIM authentication vectors and holding the subscriber profile. Session management is all handled by the SMF (previously the responsibility of the 4G MME/ SGWC/ PGWC). The NSSF provides a way to select the network slice. Finally there is the PCF, used for charging and enforcing subscriber policies.
The 5G SA core **user plane** is much simpler, as it only contains a single function. The UPF carries user data packets between the gNB and the external WAN. It connects back to the SMF too.
@@ -107,9 +109,9 @@ https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian
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/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.10/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_21.04/
```
#### openSUSE
@@ -144,16 +146,16 @@ https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Unst
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_19.04/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.10/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.04/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.10/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_21.04/
```
## 3. Install the WebUI of Open5GS
---
The WebUI allows you to interactively edit subscriber data. While it is not essential to use this, it makes things easier when you are just starting out on your Open5GS adventure. (A [command line tool](https://github.com/{{ site.github_username }}/open5gs/blob/master/misc/db/open5gs-dbctl) is available for advanced users).
The WebUI allows you to interactively edit subscriber data. While it is not essential to use this, it makes things easier when you are just starting out on your Open5GS adventure. (A [command line tool](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/db/open5gs-dbctl) is available for advanced users).
[Node.js](https://nodejs.org/) is required to install the WebUI of Open5GS
@@ -163,7 +165,7 @@ The WebUI allows you to interactively edit subscriber data. While it is not esse
```bash
$ sudo apt update
$ sudo apt install curl
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt install nodejs
```
@@ -176,7 +178,7 @@ The WebUI allows you to interactively edit subscriber data. While it is not esse
You can now install WebUI of Open5GS.
```bash
$ curl -sL {{ site.url }}{{ site.baseurl }}/assets/webui/install | sudo -E bash -
$ curl -fsSL {{ site.url }}{{ site.baseurl }}/assets/webui/install | sudo -E bash -
```
## 4. Configure Open5GS
@@ -191,13 +193,14 @@ MongoDB = 127.0.0.1 (subscriber data) - http://localhost:3000
MME-s1ap = 127.0.0.2 :36412 for S1-MME
MME-gtpc = 127.0.0.2 :2123 for S11
MME-frDi = 127.0.0.2 :3868 for S6a auth
MME-frDi = 127.0.0.2 :3868 for S6a
SGWC-gtpc = 127.0.0.3 :2123 for S11
SGWC-pfcp = 127.0.0.3 :8805 for Sxa
SMF-gtpc = 127.0.0.4 :2123 for S5/8c, N11
SMF-pfcp = 127.0.0.4 :8805 for N4
SMF-gtpc = 127.0.0.4 :2123 for S5c, N11
SMF-gtpu = 127.0.0.4 :2152 for N4u (Sxu)
SMF-pfcp = 127.0.0.4 :8805 for N4 (Sxb)
SMF-frDi = 127.0.0.4 :3868 for Gx auth
SMF-sbi = 127.0.0.4 :7777 for 5G SBI (N7,N10,N11)
@@ -205,19 +208,21 @@ AMF-ngap = 127.0.0.5 :38412 for N2
AMF-sbi = 127.0.0.5 :7777 for 5G SBI (N8,N12,N11)
SGWU-pfcp = 127.0.0.6 :8805 for Sxa
SGWU-gtpu = 127.0.0.6 :2152 for S1-U, S5/8u
SGWU-gtpu = 127.0.0.6 :2152 for S1-U, S5u
UPF-pfcp = 127.0.0.7 :8805 for N4
UPF-gtpu = 127.0.0.7 :2152 for S5/8u, N3
UPF-pfcp = 127.0.0.7 :8805 for N4 (Sxb)
UPF-gtpu = 127.0.0.7 :2152 for S5u, N3, N4u (Sxu)
HSS-frDi = 127.0.0.8 :3868 for S6a auth
HSS-frDi = 127.0.0.8 :3868 for S6a, Cx
PCRF-frDi = 127.0.0.9 :3868 for Gx auth
PCRF-frDi = 127.0.0.9 :3868 for Gx
NRF-sbi = 127.0.0.10:7777 for 5G SBI
AUSF-sbi = 127.0.0.11:7777 for 5G SBI
UDM-sbi = 127.0.0.12:7777 for 5G SBI
PCF-sbi = 127.0.0.13:7777 for 5G SBI
NSSF-sbi = 127.0.0.14:7777 for 5G SBI
BSF-sbi = 127.0.0.15:7777 for 5G SBI
UDR-sbi = 127.0.0.20:7777 for 5G SBI
```
@@ -228,7 +233,7 @@ You will need to modify your 4G MME config to support your PLMN and TAC. The int
If you are aiming to connect an external eNB to your core, you will also need to change the S1AP bind address of the MME **and** the GTP-U bind address of the SGWU. If you are running an eNB stack locally, you will not need to make these changes.
Modify [/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
Modify [/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
```diff
$ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
@@ -260,7 +265,7 @@ $ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
```
Modify [/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
Modify [/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
```diff
$ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
@@ -287,7 +292,7 @@ You will need to modify your 5G AMF config to support your PLMN and TAC. The int
If you are aiming to connect an external gNB to your core, you will also need to change the NGAP bind address of the AMF **and** the GTPU bind address of the UPF. If you are running an gNB stack locally, you will not need to make these changes.
Modify [/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.
Modify [/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
```diff
$ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
@@ -316,7 +321,7 @@ amf:
+ mcc: 001 # set your PLMN-MCC
+ mnc: 01 # set your PLMN-MNC
+ tac: 2 # should match the TAC used by your gNB
plmn:
plmn_support:
- plmn_id:
- mcc: 901
- mnc: 70
@@ -328,7 +333,7 @@ amf:
```
Modify [/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/upf.yaml.in) to set the GTP-U address.
Modify [/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/upf.yaml.in) to set the GTP-U address.
```diff
$ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
@@ -338,9 +343,9 @@ upf:
gtpu:
- - addr: 127.0.0.7
+ - addr: 10.11.0.7 # for external gNB - a local address that can be reached by the gNB
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
```
@@ -414,11 +419,13 @@ target prot opt source destination
To enable forwarding and add the NAT rule, enter
```bash
### Enable IPv4 Forwarding
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
### Enable IPv4/IPv6 Forwarding
$ sudo sysctl -w net.ipv4.ip_forward=1
$ sudo sysctl -w net.ipv6.conf.all.forwarding=1
### Add NAT Rule
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
$ sudo ip6tables -t nat -A POSTROUTING -s 2001:230:cafe::/48 ! -o ogstun -j MASQUERADE
```
@@ -461,6 +468,8 @@ $ sudo systemctl stop open5gs-nrfd
$ sudo systemctl stop open5gs-ausfd
$ sudo systemctl stop open5gs-udmd
$ sudo systemctl stop open5gs-pcfd
$ sudo systemctl stop open5gs-nssfd
$ sudo systemctl stop open5gs-bsfd
$ sudo systemctl stop open5gs-udrd
$ sudo systemctl stop open5gs-webui
```
@@ -478,6 +487,8 @@ $ sudo systemctl restart open5gs-nrfd
$ sudo systemctl restart open5gs-ausfd
$ sudo systemctl restart open5gs-udmd
$ sudo systemctl restart open5gs-pcfd
$ sudo systemctl restart open5gs-nssfd
$ sudo systemctl restart open5gs-bsfd
$ sudo systemctl restart open5gs-udrd
$ sudo systemctl restart open5gs-webui
```
@@ -509,6 +520,6 @@ $ sudo rm -Rf /var/log/open5gs
The WebUI of Open5GS can be removed as follows:
```bash
curl -sL {{ site.url }}{{ site.baseurl }}/assets/webui/uninstall | sudo -E bash -
curl -fsSL {{ site.url }}{{ site.baseurl }}/assets/webui/uninstall | sudo -E bash -
```

View File

@@ -30,11 +30,11 @@ 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 addr add 2001:230:cafe::1/48 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:
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
@@ -44,7 +44,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 libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev 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 libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev meson
```
Git clone.
@@ -93,7 +93,7 @@ $ cd ../
##### 5G Core
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.
Modify [install/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
```diff
$ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
@@ -122,7 +122,7 @@ $ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
+ mcc: 001
+ mnc: 01
+ tac: 2
plmn:
plmn_support:
- plmn_id:
- mcc: 901
- mnc: 70
@@ -133,7 +133,7 @@ $ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
security:
```
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 and PFCP IP address.
Modify [install/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/upf.yaml.in) to set the GTP-U and PFCP IP address.
```diff
$ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
--- upf.yaml 2020-09-05 20:52:28.652234967 -0400
@@ -146,13 +146,13 @@ $ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
- - 127.0.0.7
- - ::1
+ - addr: 10.11.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
```
##### 4G EPC
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
```diff
$ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
@@ -187,7 +187,7 @@ $ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
ciphering_order : [ EEA0, EEA1, EEA2 ]
```
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
```diff
$ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
--- sgwu.yaml 2020-09-05 20:50:39.393022566 -0400
@@ -211,7 +211,7 @@ If you modify the config files while Open5GS daemons are running, please restart
```bash
$ cd install/bin/
$ ./install/bin/open5gs-mmed
$ ./install/bin/open5gs-mmed
Open5GS daemon v2.1.0
08/21 22:53:47.328: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/mme.yaml' (../src/main.c:54)
@@ -221,7 +221,7 @@ Open5GS daemon v2.1.0
08/21 22:53:47.365: [gtp] INFO: gtp_connect() [127.0.0.3]:2123 (../lib/gtp/path.c:59)
08/21 22:53:47.366: [mme] INFO: s1ap_server() [127.0.0.2]:36412 (../src/mme/s1ap-sctp.c:57)
$ ./install/bin/open5gs-sgwcd
$ ./install/bin/open5gs-sgwcd
Open5GS daemon v2.1.0
08/21 22:54:43.059: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/sgwc.yaml' (../src/main.c:54)
@@ -253,7 +253,7 @@ Open5GS daemon v2.1.0
08/21 22:55:14.040: [sbi] INFO: sbi_server() [127.0.0.5]:7777 (../lib/sbi/server.c:298)
08/21 22:55:14.040: [amf] INFO: ngap_server() [127.0.0.5]:38412 (../src/amf/ngap-sctp.c:56)
$ ./install/bin/open5gs-sgwud
$ ./install/bin/open5gs-sgwud
Open5GS daemon v2.1.0
08/21 22:54:10.357: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/sgwu.yaml' (../src/main.c:54)
@@ -262,7 +262,7 @@ Open5GS daemon v2.1.0
08/21 22:54:10.360: [app] INFO: SGW-U initialize...done (../src/sgwu/app.c:31)
08/21 22:54:10.361: [gtp] INFO: gtp_server() [127.0.0.6]:2152 (../lib/gtp/path.c:32)
$ ./install/bin/open5gs-upfd
$ ./install/bin/open5gs-upfd
Open5GS daemon v2.1.0
08/21 22:54:21.596: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/upf.yaml' (../src/main.c:54)
@@ -280,7 +280,7 @@ Open5GS daemon v2.1.0
08/21 22:57:17.451: [dbi] INFO: MongoDB URI: 'mongodb://localhost/open5gs' (../lib/dbi/ogs-mongoc.c:99)
08/21 22:57:17.519: [app] INFO: HSS initialize...done (../src/hss/app-init.c:31)
$ ./install/bin/open5gs-pcrfd
$ ./install/bin/open5gs-pcrfd
Open5GS daemon v2.1.0
08/21 22:57:45.894: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/pcrf.yaml' (../src/main.c:54)
@@ -305,7 +305,7 @@ Open5GS daemon v2.1.0
08/21 22:55:41.900: [app] INFO: AUSF initialize...done (../src/ausf/app.c:31)
08/21 22:55:41.900: [sbi] INFO: sbi_server() [127.0.0.11]:7777 (../lib/sbi/server.c:298)
$ ./install/bin/open5gs-udmd
$ ./install/bin/open5gs-udmd
Open5GS daemon v2.1.0
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/udm.yaml' (../src/main.c:54)
@@ -313,7 +313,7 @@ Open5GS daemon v2.1.0
08/21 22:56:02.155: [app] INFO: UDM initialize...done (../src/udm/app.c:31)
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
$ ./install/bin/open5gs-pcfd
$ ./install/bin/open5gs-pcfd
Open5GS daemon v2.1.0
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/pcf.yaml' (../src/main.c:54)
@@ -321,7 +321,23 @@ Open5GS daemon v2.1.0
08/21 22:56:02.155: [app] INFO: PCF initialize...done (../src/pcf/app.c:31)
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
$ ./install/bin/open5gs-udrd
$ ./install/bin/open5gs-nssfd
Open5GS daemon v2.1.0
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/nssfd.yaml' (../src/main.c:54)
08/21 22:56:02.154: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/nssfd.log' (../src/main.c:57)
08/21 22:56:02.155: [app] INFO: NSSF initialize...done (../src/nssfd/app.c:31)
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
$ ./install/bin/open5gs-bsfd
Open5GS daemon v2.1.0
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/bsf.yaml' (../src/main.c:54)
08/21 22:56:02.154: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/bsf.log' (../src/main.c:57)
08/21 22:56:02.155: [app] INFO: BSF initialize...done (../src/bsf/app.c:31)
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
$ ./install/bin/open5gs-udrd
Open5GS daemon v2.1.0
08/21 22:56:15.810: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/udr.yaml' (../src/main.c:54)
@@ -367,7 +383,7 @@ $ ./build/tests/app/app ## Both 5G Core and EPC with ./build/configs/sample.yaml
```bash
$ sudo apt install curl
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt install nodejs
```
@@ -375,7 +391,7 @@ Install the dependencies to run WebUI
```bash
$ cd webui
$ npm install
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
@@ -444,11 +460,13 @@ 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"
### Enable IPv4/IPv6 Forwarding
$ sudo sysctl -w net.ipv4.ip_forward=1
$ sudo sysctl -w net.ipv6.conf.all.forwarding=1
### Add NAT Rule
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
$ sudo ip6tables -t nat -A POSTROUTING -s 2001:230:cafe::/48 ! -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.
@@ -460,6 +478,42 @@ $ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
- You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
- You can view the log at `$INSTALL_PREFIX/var/log/open5gs/*.log`.
### Re-install with updated source code
You need to update the Open5GS source and all subprojects.
```bash
$ cd open5gs
$ git pull ## Update the Open5GS source
$ meson subprojects update ## Update all subprojects
```
To compile with meson:
```bash
$ ninja -C build
```
Check whether the compilation is correct.
```bash
$ cd build
$ meson test -v
```
Install Open5GS without making any configuration file changes.
```bash
$ ninja install
```
**Note:** The configuration files in the installation directory are not changed. If you want to initialize the configuration files as well, you need to delete the existing installation directory and install it.
{: .notice--danger}
Install Open5GS and initialize configuration files.
```bash
$ rm -Rf ../install
$ ninja install
```
### Troubleshooting
---

View File

@@ -33,7 +33,9 @@ PCRF-frDi = 127.0.0.9 :3868 for Gx auth
NRF-sbi = 127.0.0.10:7777 for 5G SBI
AUSF-sbi = 127.0.0.11:7777 for 5G SBI
UDM-sbi = 127.0.0.12:7777 for 5G SBI
PCF-sbi = 127.0.0.12:7777 for 5G SBI
PCF-sbi = 127.0.0.13:7777 for 5G SBI
NSSF-sbi = 127.0.0.14:7777 for 5G SBI
BSF-sbi = 127.0.0.15:7777 for 5G SBI
UDR-sbi = 127.0.0.20:7777 for 5G SBI
```
@@ -50,7 +52,7 @@ You can refer to the network settings at
[{{ site.url }}{{ site.baseurl }}/assets/Open5GS-Diagram.pdf]({{ site.url }}{{ site.baseurl }}/assets/Open5GS-Diagram.pdf) provided by [@kbarlee](https://github.com/kbarlee) in issue [#528](https://github.com/{{ site.github_username }}/open5gs/issues/528)
{: .notice--danger}
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
```diff
$ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
@@ -85,7 +87,7 @@ $ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
ciphering_order : [ EEA0, EEA1, EEA2 ]
```
Modify [install/etc/open5gs/sgwc.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwc.yaml.in) to set the PFCP IP address.
Modify [install/etc/open5gs/sgwc.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/sgwc.yaml.in) to set the PFCP IP address.
```diff
$ diff -u /etc/open5gs/sgwc.yaml.old /etc/open5gs/sgwc.yaml
@@ -49,7 +49,7 @@
@@ -108,7 +110,7 @@ $ diff -u /etc/open5gs/sgwc.yaml.old /etc/open5gs/sgwc.yaml
# parameter:
```
Modify [install/etc/open5gs/smf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/smf.yaml.in) to set the PFCP IP address.
Modify [install/etc/open5gs/smf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/smf.yaml.in) to set the PFCP IP address.
```diff
$ diff -u /etc/open5gs/smf.yaml.old /etc/open5gs/smf.yaml
--- smf.yaml.old 2020-08-22 11:37:39.990816411 -0400
@@ -120,9 +122,9 @@ $ diff -u /etc/open5gs/smf.yaml.old /etc/open5gs/smf.yaml
- - addr: 127.0.0.4
- - addr: ::1
+ - addr: 10.10.0.4
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
@@ -282,7 +281,7 @@
#
upf:
@@ -135,7 +137,7 @@ $ diff -u /etc/open5gs/smf.yaml.old /etc/open5gs/smf.yaml
```
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.
Modify [install/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
```diff
diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
@@ -164,7 +166,7 @@ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
+ mcc: 901
+ mnc: 70
+ tac: 1
plmn:
plmn_support:
- plmn_id:
- mcc: 001
- mnc: 01
@@ -178,7 +180,7 @@ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
ciphering_order : [ NEA0, NEA1, NEA2 ]
```
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwu.yaml.in) to set the GTP-U and PFCP IP address.
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/sgwu.yaml.in) to set the GTP-U and PFCP IP address.
```diff
$ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
--- sgwu.yaml.old 2020-08-22 11:41:09.214670723 -0400
@@ -197,7 +199,7 @@ $ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
# sgwc:
```
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 and PFCP IP address.
Modify [install/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/upf.yaml.in) to set the GTP-U and PFCP IP address.
```diff
$ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
--- upf.yaml.old 2020-08-22 11:42:57.781750067 -0400
@@ -213,9 +215,9 @@ $ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
- - 127.0.0.7
- - ::1
+ - addr: 10.11.0.7
pdn:
subnet:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
```
After changing conf files, please restart Open5GS daemons.

View File

@@ -5,46 +5,43 @@ head_inline: "<style> .blue { color: blue; } .bold { font-weight: bold; } </styl
This page lists Radio hardware that has been tested by members of the Open5GS community,
Listed eNodeBs have at a minimum connected to Open5GS. This does not mean all functionality (dedicated bearers, GBRs, etc) has been tested.
If you have tested radio hardware from a vendor not listed with Open5GS, please add it to this page [by creating a PR on GitHub.](https://github.com/open5gs/open5gs)
### Commercial Macro BTS
---
* Huawei BTS 3900 (S/W version V100R011C10SPC230)
### Small Cells
### Commercial 5G
---
* Airspan 5G OpenRange vCU + Airspan 5G OpenRange vDU + Airspan 5G OpenRANGE06 AirVelocity 2700 RU
* NOKIA AEQE (SW: 5G20A)
* NOKIA AEQD (SW: 5G20A)
* Huawei BTS 5900
### Commercial 4G
---
* Accelleran E1010 (LTE TDD B42)
* AirHarmony 4000
* AirHarmony 4200
* AirHarmony 4400
* Airspan AirSpeed 1030
* Airspan AirHarmony 1000
* Baicells Neutrino
* Baicells Nova 243
* Baicells Nova 246
* Baicells Nova 436Q
* Baicells Nova 227 (EBS & CBRS)
* Baicells Nova 233
* Airspan AirSpeed 1030
* Airspan AirHarmony 1000
* AirHarmony 4000
* AirHarmony 4200
* AirHarmony 4400
* Gemtek WLTGFC-101 (S/W version 2.1.1746.1116)
* Huawei BTS 3900 (S/W version V100R011C10SPC230)
* NOKIA FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power
* NOKIA FWH1 B38 Flexi Zone Outdoor Micro TD LTE 2600 MHz
### OpenRAN Hardware
---
### 4G/5G Software Stacks + SDRs
---
* [srsLTE / srsENB](https://github.com/srsLTE/srsLTE) + LimeSDR, USRP, BladeRF x40 (BladeRF Not stable)
* [Amarisoft](https://www.amarisoft.com/) + LimeSDR, USRP, Amarisoft PCI Express Card
* [srsLTE / srsENB](https://github.com/srsLTE/srsLTE) + LimeSDR, USRP, BladeRF x40 (BladeRF Not stable)
### Misc Radio Hardware
---
* [OpenAirInterface v1.0.3](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/v1.0.3) 4G RAN Simulator
* [OsmoBTS](https://osmocom.org/projects/osmobts/wiki) controlled ip.access NanoBTS (Used for CSFB with Osmocom)
* [UERANSIM](https://github.com/aligungr/UERANSIM) 5G RAN Simulator
* [OpenAirInterface v1.0.3](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/v1.0.3) 4G RAN Simulator

View File

@@ -67,7 +67,7 @@ $ sudo sh -c "cat << EOF > /etc/systemd/network/99-open5gs.network
Name=ogstun
[Network]
Address=10.45.0.1/16
Address=cafe::1/64
Address=2001:230:cafe::1/48
EOF"
```
@@ -84,7 +84,7 @@ Make sure it is set up properly.
$ ifconfig ogstun
ogstun: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.45.0.1 netmask 255.255.0.0 destination 10.45.0.1
inet6 cafe::1 prefixlen 64 scopeid 0x0<global>
inet6 2001:230:cafe::1 prefixlen 64 scopeid 0x0<global>
inet6 fe80::e86e:86d8:ea24:f8ee prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)

View File

@@ -109,7 +109,7 @@ a base CentOS 8 installation.
```bash
$ sudo dnf install python3 meson 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 libnghttp2-devel
$ sudo dnf install python3 meson ninja-build gcc gcc-c++ 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 libnghttp2-devel
```
### Install the SCTP kernel module in kernel-modules-extra.
@@ -236,7 +236,7 @@ Set the IP address on the `ogstun` TUN interface.
```bash
$ sudo ip addr add 10.45.0.1/16 dev ogstun
$ sudo ip addr add cafe::1/64 dev ogstun
$ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
```
Make sure it is set up properly.
@@ -247,7 +247,7 @@ $ ip link show
**Notice:** This configuration is not persistent after rebooting. The
script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{
site.github_username }}/open5gs/blob/master/misc/netconf.sh) makes it easy
site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy
to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
@@ -325,7 +325,7 @@ $ cd ../
$ ls install/bin
open5gs-amfd open5gs-hssd open5gs-nrfd open5gs-sgwcd open5gs-smfd open5gs-udrd
open5gs-ausfd open5gs-mmed open5gs-pcrfd open5gs-sgwud open5gs-udmd open5gs-pcfd
open5gs-upfd
open5gs-upfd open5gs-nssfd open5gs-bsfd
```
## Building WebUI of Open5GS
@@ -342,7 +342,7 @@ Install the dependencies to run WebUI
```bash
$ cd ~/open5gs
$ cd webui
$ npm install
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.

View File

@@ -52,7 +52,7 @@ You are now ready to set the IP address on TUN device.
```bash
$ sudo ip addr add 10.45.0.1/16 dev ogstun
$ sudo ip addr add cafe::1/64 dev ogstun
$ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
```
Make sure it is set up properly.
@@ -61,7 +61,7 @@ $ sudo ip link set ogstun up
$ ip link show
```
**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:
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
@@ -70,7 +70,7 @@ $ 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 mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel iproute
$ sudo dnf install python3 ninja-build gcc gcc-c++ 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 libnghttp2-devel iproute
```
Install Meson
@@ -127,7 +127,7 @@ Install the dependencies to run WebUI
```bash
$ cd webui
$ npm install
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.

View File

@@ -1,29 +1,53 @@
---
title: FreeBSD
title: Mac OS X
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **FreeBSD Relase 11.1**.
This guide is based on macOS Big Sur 11.2 on a Macbook Air(Apple M1 Chips) computer.
{: .blue}
### Install Xcode Command-Line Tools
---
Homebrew requires the Xcode command-line tools from Apple's Xcode.
```bash
$ xcode-select --install
```
### Installing Homebrew
---
Install brew using the official Homebrew installation instructions.
```bash
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
### Getting MongoDB
---
Install MongoDB with package manager.
Install MongoDB with Package Manager.
```bash
$ sudo pkg install mongodb
$ brew tap mongodb/brew
$ brew install mongodb-community
```
Run MongoDB server.
```bash
$ mkdir -p ./data/db
$ mongod --dbpath ./data/db
$ mongod --config /usr/local/etc/mongod.conf
```
### Setting up TUN device (No persistent after rebooting)
**Tip:** MongoDB is persistent after rebooting with the following commands:
`$ brew services start mongodb-community`
{: .notice--info}
### Setting up network (No persistent after rebooting)
---
Configure the TUN device.
Note that Open5GS uses built-in "utun" device driver. So, You don't have to install external TUN/TAP driver.
{: .blue}
Configure the loopback interface.
```bash
$ sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
@@ -38,15 +62,26 @@ $ sudo ifconfig lo0 alias 127.0.0.10 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.11 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.12 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.13 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.14 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.15 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.16 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.17 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.18 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.19 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.20 netmask 255.255.255.255
```
Enable IP forwarding
Enable IP forwarding & Masquerading
```bash
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo sysctl -w net.inet6.ip6.forwarding=1
$ sudo sh -c "echo 'nat on {en0} from 10.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
$ sudo sh -c "echo 'nat on {en0} from 2001:230:cafe::1/48 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
$ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
```
**Tip:** The script provided in [$GIT_REPO/support/network/restart.sh](https://github.com/{{ site.github_username }}/open5gs/blob/master/support/network/restart.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./support/network/restart.sh`
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
### Building Open5GS
@@ -54,13 +89,20 @@ $ 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 libmicrohttpd curl
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config bison libusrsctp libtins
```
Install Meson using Python.
Configure Homebrew PATH
```bash
$ sudo pip install --upgrade pip
$ sudo pip install meson
$ export PATH="/opt/homebrew/opt/bison/bin:/opt/homebrew/bin:$PATH"
$ export LIBRARY_PATH=/opt/homebrew/lib
$ export C_INCLUDE_PATH=/opt/homebrew/include
$ export CPLUS_INCLUDE_PATH=/opt/homebrew/include
```
Install Meson using Homebrew.
```bash
$ brew install meson
```
Git clone.
@@ -107,20 +149,21 @@ $ ninja install
$ cd ../
```
### Building WebUI of Open5GS
---
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
```bash
$ sudo pkg install node
$ brew install node
```
Install the dependencies to run WebUI
```bash
$ cd webui
$ npm install
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
@@ -128,4 +171,3 @@ The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
$ npm run dev
```

View File

@@ -3,14 +3,23 @@ title: Mac OS X
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **macOS Big Sur 11.0.1**.
This guide is based on macOS Big Sur 11.2 on a Macbook Pro(Intel Chips) computer.
{: .blue}
### Install Xcode Command-Line Tools
---
Homebrew requires the Xcode command-line tools from Apple's Xcode.
```bash
$ xcode-select --install
```
### Installing Homebrew
---
Install brew using the official Homebrew installation instructions.
```bash
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
### Getting MongoDB
@@ -32,14 +41,13 @@ $ mongod --config /usr/local/etc/mongod.conf
{: .notice--info}
### Setting up TUN device (No persistent after rebooting)
### Setting up network (No persistent after rebooting)
---
Install TUN/TAP driver
- You can download it from [http://tuntaposx.sourceforge.net/](http://tuntaposx.sourceforge.net/)
- And then, run tuntap_20150118.pkg to install TUN/TAP driver.
Note that Open5GS uses built-in "utun" device driver. So, You don't have to install external TUN/TAP driver.
{: .blue}
Configure the TUN device.
Configure the loopback interface.
```bash
$ sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
@@ -54,16 +62,25 @@ $ sudo ifconfig lo0 alias 127.0.0.10 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.11 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.12 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.13 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.14 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.15 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.16 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.17 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.18 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.19 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.20 netmask 255.255.255.255
```
Enable IP forwarding & Masquerading
```bash
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo sysctl -w net.inet6.ip6.forwarding=1
$ sudo sh -c "echo 'nat on {en0} from 10.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
$ sudo sh -c "echo 'nat on {en0} from 2001:230:cafe::1/48 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
$ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
```
**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:
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
@@ -72,7 +89,7 @@ $ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
Install the depedencies for building the source code.
```bash
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config libusrsctp libtins
```
Install Bison and Create soft link.
@@ -96,7 +113,7 @@ To compile with meson:
```bash
$ cd open5gs
$ meson build --prefix=`pwd`/install -D c_std=c99
$ meson build --prefix=`pwd`/install
$ ninja -C build
```
@@ -144,7 +161,7 @@ Install the dependencies to run WebUI
```bash
$ cd webui
$ npm install
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
@@ -152,4 +169,3 @@ The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
$ npm run dev
```

View File

@@ -0,0 +1,216 @@
---
title: FreeBSD
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **FreeBSD-11.4-STABLE**.
{: .blue}
## Install **FreeBSD-11.4-STABLE** from Vagrant box (optional)
---
Vagrant provides a simple way to create and deploy Virtual Machines from
pre-built images using VirtualBox, libvirt, or VMWare as a hypervisor engine.
This allows the user to quickly create a virtual machine without the hassle
of installing the operating system by hand.
### Install Vagrant
---
The instructions to install Vagrant are provided at
[vagrantup.com](https://www.vagrantup.com/).
### Create a FreeBSD-11.4-STABLE Virtual Machine using Vagrant
---
Use the supplied `Vagrantfile` in the `vagrant` directory to create the
virtual machine.
Note that this Vagrantfile is identical to the base FreeBSD 11 box, with
the exception that the amount of virtual memory has been increased to 1GB:
```bash
cd vagrant/freebsd
vagrant up --provider virtualbox
```
### Log into the newly created FreeBSD VM
---
Use SSH to log into the FreeBSD 11 VM:
```bash
vagrant ssh
```
Note that the Open5GS source is *not* copied into the VM. The instructions
below provide the step by step instructions for setting up Open5GS for
either a bare metal or virtual FreeBSD 11 system.
The rest of the commands below are performed inside the FreeBSD VM as the
user 'vagrant', or on your bare metal FreeBSD 11 system as any normal user.
### Getting MongoDB
---
Install MongoDB with package manager.
```bash
$ sudo pkg install mongodb44
```
Run MongoDB server.
```bash
$ mkdir -p ./data/db
$ mongod --dbpath ./data/db
```
### Setting up network (No persistent after rebooting)
---
Configure the loopback interface.
```bash
$ sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.6 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.7 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.8 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.9 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.10 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.11 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.12 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.13 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.14 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.15 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.16 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.17 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.18 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.19 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.20 netmask 255.255.255.255
```
Enable IP forwarding
```bash
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo sysctl -w net.inet6.ip6.forwarding=1
```
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
### Building Open5GS
---
Install the depedencies for building the source code.
```bash
$ sudo pkg install meson ninja gcc bison gsed pkgconf git mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2
```
Configure gcc PATH
```bash
$ setenv LIBRARY_PATH /usr/local/lib
$ setenv C_INCLUDE_PATH /usr/local/include
```
If you are using BASH instead of default CSH,
```bash
$ export LIBRARY_PATH=/usr/local/lib
$ export C_INCLUDE_PATH=/usr/local/include
```
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
```
**Note:** No source code changes are required for FreeBSD 11.x version. However, in FreeBSD 12.x version, we'll getting a crash with segmentation fault when calling basename(3). To avoid this, you need to change the freeDiameter source code as below.
{: .blue}
```diff
$ cd open5gs/subprojects/freeDiameter
$ diff --git a/include/freeDiameter/libfdproto.h b/include/freeDiameter/libfdproto.h
index 52c11ef..cd7f383 100644
--- a/include/freeDiameter/libfdproto.h
+++ b/include/freeDiameter/libfdproto.h
@@ -293,7 +293,7 @@ extern int fd_g_debug_lvl;
/* A version of __FILE__ without the full path. This is specific to each C file being compiled */
static char * file_bname = NULL;
-static char * file_bname_init(char * full) { file_bname = basename(full); return file_bname; }
+static char * file_bname_init(char * full) { file_bname = __old_basename(full); return file_bname; }
#define __STRIPPED_FILE__ (file_bname ?: file_bname_init((char *)__FILE__))
```
Now, compile again:
{: .blue}
```bash
$ cd open5gs
$ ninja -C build
```
Check whether the compilation is correct.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
$ sudo ./build/tests/attach/attach ## EPC Only
$ sudo ./build/tests/registration/registration ## 5G Core Only
```
Run all test programs as below.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
$ cd build
$ sudo meson test -v
```
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
{: .notice--info}
You need to perform the **installation process**.
```bash
$ cd build
$ ninja install
$ cd ../
```
### Building WebUI of Open5GS
---
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
```bash
$ sudo pkg install node
```
Install the dependencies to run WebUI
```bash
$ cd webui
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
$ npm run dev
```

View File

@@ -0,0 +1,115 @@
---
title: Alpine
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **Alpine 3.13** Distribution.
{: .blue}
### Getting MongoDB
---
Install MongoDB with package manager.
```bash
$ sudo apk update
$ sudo apk add mongodb
```
Run MongoDB server.
```bash
$ mkdir -p ./data/db
$ mongod --dbpath ./data/db
```
### Setting up TUN device (No persistent after rebooting)
---
Create the TUN device. Interface name will be `ogstun`.
```bash
$ sudo apk add iproute2
$ sudo ip tuntap add name ogstun mode tun
$ ip link show
```
You are now ready to set the IP address on TUN device.
```bash
$ sudo ip addr add 10.45.0.1/16 dev ogstun
$ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
```
Make sure it is set up properly.
```bash
$ sudo ip link set ogstun up
$ ip link show
```
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./misc/netconf.sh`
{: .notice--info}
### Building Open5GS
---
Install the depedencies for building the source code.
```bash
$ sudo apk add alpine-sdk bison flex git meson bash sudo linux-headers bsd-compat-headers yaml-dev lksctp-tools-dev gnutls-dev libgcrypt-dev libidn-dev mongo-c-driver-dev libmicrohttpd-dev curl-dev nghttp2-dev
```
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.
```bash
$ ./build/tests/attach/attach ## EPC Only
$ ./build/tests/registration/registration ## 5G Core Only
```
Run all test programs as below.
```bash
$ cd build
$ meson test -v
```
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
{: .notice--info}
You need to perform the **installation process**.
```bash
$ cd build
$ ninja install
$ cd ../
```
### Building WebUI of Open5GS
---
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
```bash
$ sudo apk add nodejs
```
Install the dependencies to run WebUI
```bash
$ cd webui
$ npm ci --no-optional
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
$ npm run dev
```

View File

@@ -24,10 +24,12 @@ open5gs 27485 0.0 0.0 243816 15064 ? Ssl 12:13 0:00 /usr/bin/open5g
open5gs 27543 0.0 0.0 222416 9672 ? Ssl 12:13 0:00 /usr/bin/open5gs-ausfd -c /etc/open5gs/ausf.yaml
open5gs 27600 0.0 0.0 222328 9668 ? Ssl 12:13 0:00 /usr/bin/open5gs-udmd -c /etc/open5gs/udm.yaml
open5gs 27600 0.0 0.0 222329 9669 ? Ssl 12:13 0:00 /usr/bin/open5gs-pcfd -c /etc/open5gs/pcf.yaml
open5gs 27600 0.0 0.0 222329 9669 ? Ssl 12:13 0:00 /usr/bin/open5gs-nssfd -c /etc/open5gs/nssf.yaml
open5gs 27600 0.0 0.0 222329 9669 ? Ssl 12:13 0:00 /usr/bin/open5gs-bsfd -c /etc/open5gs/bsf.yaml
open5gs 27697 0.0 0.0 243976 13716 ? Ssl 12:13 0:00 /usr/bin/open5gs-udrd -c /etc/open5gs/udr.yaml
```
You should see each of the above services, MME, SGW-C, SMF, AMF, SGW-U, UPF, HSS, PCRF, NRF, AUSF, UDM, PCF & UDR are all running.
You should see each of the above services, MME, SGW-C, SMF, AMF, SGW-U, UPF, HSS, PCRF, NRF, AUSF, UDM, PCF, NSSF, BSF & UDR are all running.
If your instance doesn't show this make sure you're started each service:
```bash
@@ -43,6 +45,8 @@ $ systemctl start open5gs-nrfd.service
$ systemctl start open5gs-ausfd.service
$ systemctl start open5gs-udmd.service
$ systemctl start open5gs-pcfd.service
$ systemctl start open5gs-nssfd.service
$ systemctl start open5gs-bsfd.service
$ systemctl start open5gs-udrd.service
```

View File

@@ -10,35 +10,384 @@ head_inline: "<style> .blue { color: blue; } </style>"
}
</style>
#### Cannot open shared object file when running daemon
#### MME sends Attach reject(EMM-Cause:15) with Diameter error(Result-Code:3002)
An error occurred when running as follows.
If you see the Attach reject(EMM-Cause:15] with Diameter error(Result-Code:3002), it means that HSS is not running.
```
$ ./install/bin/open5gs-nrfd
./install/bin/open5gs-nrfd: error while loading shared libraries: libogscrypt.so.2: cannot open shared object file: No such file or directory
```
You need to specify the absolute path to the shared 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)
5/08 18:22:23.584: [diam] ERROR: pid:Routing-OUT (0x563969fc2060) in md_hook_cb_tree@dbg_msg_dumps.c:113: AVP: 'Vendor-Specific-Application-Id'(260) l=8 f=-M val=(grouped)
((null):0)
05/08 18:22:23.584: [diam] ERROR: pid:Routing-OUT (0x563969fc2060) in md_hook_cb_tree@dbg_msg_dumps.c:113: AVP: 'Vendor-Id'(266) l=12 f=-M val=10415 (0x28af)
((null):0)
05/08 18:22:23.584: [diam] ERROR: pid:Routing-OUT (0x563969fc2060) in md_hook_cb_tree@dbg_msg_dumps.c:113: AVP: 'Auth-Application-Id'(258) l=12 f=-M val=16777251 (0x1000023)
((null):0)
05/08 18:22:23.584: [mme] INFO: Result Code: 3002 (../src/mme/mme-fd-path.c:301)
05/08 18:22:23.585: [mme] INFO: [001010123456792] Attach reject [EMM_CAUSE:15] (../src/mme/mme-sm.c:448)
05/08 18:22:23.612: [mme] INFO: UE Context Release [Action:3] (../src/mme/s1ap-handler.c:1328)
05/08 18:22:23.612: [mme] INFO: ENB_UE_S1AP_ID[1] MME_UE_S1AP_ID[1] (../src/mme/s1ap-handler.c:1330)
05/08 18:22:23.612: [mme] INFO: IMSI[001010123456792] (../src/mme/s1ap-handler.c:1332)
05/08 18:22:23.612: [mme] INFO: [Removed] Number of eNB-UEs is now 0 (../src/mme/mme-context.c:3228)
...
```
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
Please check the status of HSS and restart it.
```
$ sudo systemctl status open5gs-hssd.service
● open5gs-hssd.service - Open5GS HSS Daemon
Loaded: loaded (/lib/systemd/system/open5gs-hssd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
sudo systemctl status open5gs-hssd.service
● open5gs-hssd.service - Open5GS HSS Daemon
Loaded: loaded (/lib/systemd/system/open5gs-hssd.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2021-05-09 18:36:49 KST; 1s ago
Main PID: 6011 (open5gs-hssd)
Tasks: 37 (limit: 19047)
Memory: 14.6M
CGroup: /system.slice/open5gs-hssd.service
└─6011 /usr/bin/open5gs-hssd -c /etc/open5gs/hss.yaml
May 09 18:36:49 open5gs systemd[1]: Started Open5GS HSS Daemon.
May 09 18:36:49 open5gs open5gs-hssd[6011]: Open5GS daemon v2.2.7
May 09 18:36:49 open5gs open5gs-hssd[6011]: 05/09 18:36:49.987: [app] INFO: Configuration: '/etc/ope>
May 09 18:36:49 open5gs open5gs-hssd[6011]: 05/09 18:36:49.987: [app] INFO: File Logging: '/var/log/>
May 09 18:36:49 open5gs open5gs-hssd[6011]: 05/09 18:36:49.994: [dbi] INFO: MongoDB URI: 'mongodb://>
May 09 18:36:50 open5gs open5gs-hssd[6011]: 05/09 18:36:50.116: [app] INFO: HSS initialize...done
```
#### MME Diameter-Error with HSS-crash using v2.2.x package
If the following MME log occurs while connecting to the UE, it means that you may use the old format DB schema.
```
04/14 20:14:21.981: [diam] ERROR: pid:PSM/hss.localdomain in fd_psm_change_state@p_psm.c:287: 'STATE_OPEN' -> 'STATE_CLOSED' 'hss.localdomain'
((null):0)
04/14 20:14:21.982: [diam] ERROR: pid:PSM/hss.localdomain in md_hook_cb_tree@dbg_msg_dumps.c:89: FAILOVER from 'hss.localdomain':
((null):0)
04/14 20:14:21.982: [diam] ERROR: pid:PSM/hss.localdomain in md_hook_cb_tree@dbg_msg_dumps.c:90: 'Update-Location-Request'
((null):0)
```
In this case, the HSS may crash as shown below.
```
04/12 10:13:45.025: [app] INFO: Configuration: '/home/open5gs/install/etc/open5gs/hss.yaml' (../lib/app/ogs-init.c:129)
04/12 10:13:45.025: [app] INFO: File Logging: '/home/open5gs/install/var/log/open5gs/hss.log' (../lib/app/ogs-init.c:132)
04/12 10:13:45.028: [dbi] INFO: MongoDB URI: 'mongodb://localhost/open5gs' (../lib/dbi/ogs-mongoc.c:129)
04/12 10:13:45.068: [diam] INFO: CONNECTED TO 'mme.epc.mnc001.mcc001.3gppnetwork.org' (SCTP,soc#17): (../lib/diameter/common/logger.c:108)
04/12 10:13:45.069: [app] INFO: HSS initialize...done (../src/hss/app-init.c:31)
04/12 10:14:27.167: [core] FATAL: ogs_slice_find_by_s_nssai: Assertion `num_of_slice_data' failed. (../lib/core/ogs-3gpp-types.c:529)
04/12 10:14:27.168: [core] FATAL: backtrace() returned 10 addresses (../lib/core/ogs-abort.c:37)
/home/open5gs/install/lib/x86_64-linux-gnu/libogscore.so.2(ogs_slice_find_by_s_nssai+0xd2) [0x7f3b720a126e]
./install/bin/open5gs-hssd(+0xd12e) [0x55a57bb6f12e]
/home/open5gs/install/lib/x86_64-linux-gnu/libfdproto.so.7(fd_disp_call_cb_int+0x270) [0x7f3b7135acb3]
/home/open5gs/install/lib/x86_64-linux-gnu/libfdproto.so.7(fd_msg_dispatch+0xdca) [0x7f3b7137442f]
home/open5gs/install/lib/x86_64-linux-gnu/libfdcore.so.7(+0x67c3c) [0x7f3b715f9c3c]
/home/open5gs/install/lib/x86_64-linux-gnu/libfdcore.so.7(+0x6ca99) [0x7f3b715fea99]
/open5gs/install/lib/x86_64-linux-gnu/libfdcore.so.7(+0x6cd06) [0x7f3b715fed06]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f3b70d016db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f3b70a2a71f]
```
At this time, you need to check the DB schema is in the form below by using the command the below.
```
$ mongo
> use open5gs
> db.subscribers.find().pretty()
{
"_id" : ObjectId("60969fe79459f8b40d8d3f68"),
"imsi" : "901700000000001",
"__v" : 0,
"access_restriction_data" : 32,
"ambr" : {
"uplink" : {
"value" : 1,
"unit" : 3
},
"downlink" : {
"value" : 1,
"unit" : 3
}
},
"network_access_mode" : 2,
"security" : {
"k" : "465b5ce8b199b49faa5f0a2ee238a6bc",
"amf" : "8000",
"op" : null,
"opc" : "e8ed289deba952e4283b54e88e6183ca",
"sqn" : NumberLong(97)
},
"slice" : [
{
"sst" : 1,
"default_indicator" : true,
"_id" : ObjectId("60969fe7de8743b3c7b1a973"),
"session" : [
{
"name" : "internet",
"type" : 3,
"_id" : ObjectId("60969fe7de8743b3c7b1a974"),
"pcc_rule" : [ ],
"ambr" : {
"uplink" : {
"value" : 1,
"unit" : 3
},
"downlink" : {
"value" : 1,
"unit" : 3
}
},
"qos" : {
"index" : 9,
"arp" : {
"priority_level" : 8,
"pre_emption_capability" : 1,
"pre_emption_vulnerability" : 1
}
}
}
]
}
],
"subscribed_rau_tau_timer" : 12,
"subscriber_status" : 0
}
```
If you see below, you are using the old format DB schema.
```
$ mongo
> use open5gs
> db.subscribers.find().pretty()
{
"_id" : ObjectId("609715fda08851a0744e6ae7"),
"imsi" : "901700000021309",
"__v" : 0,
"access_restriction_data" : 32,
"ambr" : {
"downlink" : NumberLong(1024000),
"uplink" : NumberLong(1024000)
},
"network_access_mode" : 2,
"pdn" : [
{
"apn" : "internet",
"_id" : ObjectId("609715fd455bcd38c884ce85"),
"pcc_rule" : [ ],
"ambr" : {
"downlink" : NumberLong(1024000),
"uplink" : NumberLong(1024000)
},
"qos" : {
"qci" : 9,
"arp" : {
"priority_level" : 8,
"pre_emption_vulnerability" : 1,
"pre_emption_capability" : 0
}
},
"type" : 0
}
],
"security" : {
"k" : "70D49A71DD1A2B806A25ABE0EF749F1E",
"amf" : "8000",
"op" : null,
"opc" : "6F1BF53D624B3A43AF6592854E2444C7"
},
"subscribed_rau_tau_timer" : 12,
"subscriber_status" : 0
}
```
If you are using old format DB schema, please perform the following step.
1. First of all, it is recommended to use the following command to remove all existing subscription DB.
```
$ mongo
> use open5gs
switched to db open5gs
> db.subscribers.drop()
true
```
2. Then, if you are using a version of WebUI prior to v2.1.7, you need to do a WebUI logout from your web browser.
3. Finally, install the latest version of WebUI with the following command.
```
$ curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
```
4. Log in to the new WebUI and add new subscriber information using your web browser.
5. Make sure it is a new DB schema as below:
```
$ mongo
> use open5gs
> db.subscribers.find().pretty()
{
...
"slice" : [
{
"sst" : 1,
"default_indicator" : true,
"_id" : ObjectId("60969fe7de8743b3c7b1a973"),
"session" : [
...
}
```
If the above problem still occurs, we recommend that you delete all Open5GS and start from scratch.
#### 5G Core test failed (e.g. `./build/tests/registration/registration`)
The AUSF(or SMF) has already been started, but NRF-discovery fails and the test program does not work as shown below.
```
$ ./build/tests/registration/registration
...
04/12 14:26:25.885: [app] ERROR: Cannot discover [AUSF] (../lib/sbi/path.c:119)
...
04/12 14:27:25.666: [app] ERROR: Cannot discover [SMF] (../lib/sbi/path.c:119)
```
This is a test program bug and has not yet been resolved.
{: .blue}
To restart the test program, first remove all subscriber information using MongoDB Client
```
$ mongo
> use open5gs
switched to db open5gs
> db.subscribers.find() ### Check the test subscriber
> db.subscribers.drop() ### Remove all subscriber
> db.subscribers.find() ### Check that all subscribers are empty
```
Kill all processes.
```bash
$ ps -ef | grep open5gs
$ sudo pkill -9 open5gs-mmed
$ sudo pkill -9 open5gs-sgwcd
$ sudo pkill -9 open5gs-smfd
$ sudo pkill -9 open5gs-amfd
$ sudo pkill -9 open5gs-sgwud
$ sudo pkill -9 open5gs-upfd
$ sudo pkill -9 open5gs-hssd
$ sudo pkill -9 open5gs-pcrfd
$ sudo pkill -9 open5gs-nrfd
$ sudo pkill -9 open5gs-ausfd
$ sudo pkill -9 open5gs-udmd
$ sudo pkill -9 open5gs-pcfd
$ sudo pkill -9 open5gs-nssfd
$ sudo pkill -9 open5gs-bsfd
$ sudo pkill -9 open5gs-udrd
```
Run `./build/tests/registration/registration` again
```
$ ./build/tests/registration/registration
guti-test : SUCCESS
auth-test : SUCCESS
idle-test : SUCCESS
dereg-test : SUCCESS
paging-test : SUCCESS
identity-test : SUCCESS
gmm-status-test : SUCCESS
ue-context-test : SUCCESS
reset-test : SUCCESS
All tests passed.
```
In general, if this test program succeeds at least once, you can assume that you have successfully built the development environment.
#### How to use a different Slice for each SMF
To add a slice with SST of 1 and SD of 000080, you need to update the configuration file as shown below.
```diff
### amf.yaml
$ diff --git a/configs/open5gs/amf.yaml.in b/configs/open5gs/amf.yaml.in
index 7e939e81..dfe4456d 100644
--- a/configs/open5gs/amf.yaml.in
+++ b/configs/open5gs/amf.yaml.in
@@ -199,6 +199,12 @@ amf:
mnc: 70
s_nssai:
- sst: 1
+ - plmn_id:
+ mcc: 901
+ mnc: 70
+ s_nssai:
+ - sst: 1
+ sd: 000080
security:
integrity_order : [ NIA2, NIA1, NIA0 ]
ciphering_order : [ NEA0, NEA1, NEA2 ]
### FIRST smf.yaml
$ diff --git a/configs/open5gs/smf.yaml.in b/configs/open5gs/smf.yaml.in
index d45aa60f..701ee533 100644
--- a/configs/open5gs/smf.yaml.in
+++ b/configs/open5gs/smf.yaml.in
@@ -317,6 +317,11 @@ logger:
#
smf:
+ info:
+ - s_nssai:
+ - sst: 1
+ dnn:
+ - internet
sbi:
- addr: 127.0.0.4
port: 7777
### SECOND smf.yaml
$ diff --git a/configs/open5gs/smf.yaml.in b/configs/open5gs/smf.yaml.in
index d45aa60f..949da220 100644
--- a/configs/open5gs/smf.yaml.in
+++ b/configs/open5gs/smf.yaml.in
@@ -317,6 +317,12 @@ logger:
#
smf:
+ info:
+ - s_nssai:
+ - sst: 1
+ sd: 000080
+ dnn:
+ - internet
sbi:
- addr: 127.0.0.4
port: 7777
### nssf.yaml
$ diff --git a/configs/open5gs/nssf.yaml.in b/configs/open5gs/nssf.yaml.in
index ecd4f7e2..04d9c4ba 100644
--- a/configs/open5gs/nssf.yaml.in
+++ b/configs/open5gs/nssf.yaml.in
@@ -119,6 +119,11 @@ nssf:
port: 7777
s_nssai:
sst: 1
+ - addr: 127.0.0.10
+ port: 7777
+ s_nssai:
+ sst: 1
+ sd: 000080
#
# nrf:
```
Then add a slice to MongoDB's subscriber info.
![Subscriber Info]({{ site.url }}{{ site.baseurl }}/assets/images/subscriber_info_with_two_slice.png)
#### Can I disable specific services if 5G functionally is not needed?
@@ -64,6 +413,8 @@ $ open5gs-amfd
$ open5gs-ausfd
$ open5gs-udmd
$ open5gs-pcfd
$ open5gs-nssfd
$ open5gs-bsfd
$ open5gs-udrd
```
@@ -133,7 +484,7 @@ $ diff -u /etc/systemd/network/99-open5gs.network /etc/systemd/network/99-open5g
[Network]
-Address=10.45.0.1/16
+Address=10.46.0.1/16
Address=cafe::1/64
Address=2001:230:cafe::1/48
```
Restart systemd-networkd
@@ -141,6 +492,11 @@ Restart systemd-networkd
$ sudo systemctl restart systemd-networkd
```
And then, you need to chanage NAT table as below.
```
$ sudo iptables -t nat -A POSTROUTING -s 10.46.0.0/16 ! -o ogstun -j MASQUERADE
```
Now, you need to modify the configuration file of Open5GS to adjust the UE IP Pool. UE IP Pool can be allocated by SMF or UPF, but in this tutorial, we will modify both configuration files.
```diff
@@ -150,10 +506,10 @@ $ diff -u smf.yaml smf.yaml.new
@@ -190,7 +190,7 @@
- addr: 127.0.0.4
- addr: ::1
pdn:
subnet:
- - addr: 10.45.0.1/16
+ - addr: 10.46.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
```
@@ -165,10 +521,10 @@ $ diff -u upf.yaml upf.yaml.new
@@ -139,7 +139,7 @@
gtpu:
- addr: 127.0.0.7
pdn:
subnet:
- - addr: 10.45.0.1/16
+ - addr: 10.46.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
#
```
@@ -263,6 +619,8 @@ $ sudo pkill -9 open5gs-nrfd
$ sudo pkill -9 open5gs-ausfd
$ sudo pkill -9 open5gs-udmd
$ sudo pkill -9 open5gs-pcfd
$ sudo pkill -9 open5gs-nssfd
$ sudo pkill -9 open5gs-bsfd
$ sudo pkill -9 open5gs-udrd
```
@@ -357,9 +715,10 @@ Timeout: 0
#### Is it possible to setup IP/NAT table along with Docker?
Enable IP Forward.
Enable IPv4/IPv6 Forward.
```
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
$ sudo sysctl -w net.ipv4.ip_forward=1
$ sudo sysctl -w net.ipv6.conf.all.forwarding=1
```
The following is the default docker IP/NAT table.
@@ -435,6 +794,11 @@ And then, apply **newtables** as below.
$ sudo iptables-restore < newtables
```
Docker doesn't have IPv6 NAT rules. In this case, you just add the NAT rule as below.
```
$ sudo ip6tables -t nat -A POSTROUTING -s 2001:230:cafe::/48 ! -o ogstun -j MASQUERADE
```
The above operation is the same as described in the following manuals.
```
### Check IP Tables
@@ -462,11 +826,13 @@ 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"
### Enable IPv4/IPv6 Forwarding
$ sudo sysctl -w net.ipv4.ip_forward=1
$ sudo sysctl -w net.ipv6.conf.all.forwarding=1
### Add NAT Rule
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
$ sudo ip6tables -t nat -A POSTROUTING -s 2001:230:cafe::/48 ! -o ogstun -j MASQUERADE
```
#### How to use a different DNN/APN for each SMF
@@ -521,81 +887,64 @@ The IP address of the UE can also use a different UE pool depending on the DNN/A
```
### For reference, see `smf.yaml`
# <PDN Configuration with UE Pool>
# <Subnet for UE Pool>
#
# o IPv4 Pool
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
#
# pdn:
# subnet:
# 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
# $ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
#
# pdn:
# subnet:
# - addr: 10.45.0.1/16
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
#
#
# o Specific DNN/APN(e.g 'volte') uses 10.46.0.1/16, cafe:2::1/64
# All other DNNs/APNs use 10.45.0.1/16, cafe:1::1/64
# o Specific DNN/APN(e.g 'volte') uses 10.46.0.1/16, 2001:230:babe::1/48
# All other DNNs/APNs use 10.45.0.1/16, 2001:230:cafe::1/48
# $ 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
# $ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
# $ sudo ip addr add 2001:230:babe::1/48 dev ogstun
#
# pdn:
# subnet:
# - addr: 10.45.0.1/16
# - addr: cafe:1::1/64
# - addr: 2001:230:cafe::1/48
# - addr: 10.46.0.1/16
# dnn: volte
# - addr: cafe:2::1/64
# - addr: 2001:230:babe::1/48
# dnn: 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
# dnn: volte
# dev: ogstun3
# - addr: cafe:2::1/64
# dnn: volte
# dev: ogstun3
#
# o Pool Range Sample
# pdn:
# subnet:
# - addr: 10.45.0.1/24
# range: 10.45.0.100-10.45.0.200
#
# pdn:
# subnet:
# - addr: 10.45.0.1/24
# range:
# - 10.45.0.5-10.45.0.50
# - 10.45.0.100-
#
# pdn:
# subnet:
# - addr: 10.45.0.1/24
# range:
# - -10.45.0.200
# - 10.45.0.210-10.45.0.220
#
# pdn:
# subnet:
# - 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
# - addr: 2001:230:cafe::1/48
# range:
# - cafe::a0-cafe:b0
# - cafe::c0-cafe:d0
# - 2001:230:cafe:a0::0-2001:230:cafe:b0::0
# - 2001:230:cafe:c0::0-2001:230:cafe:d0::0
#
```
@@ -693,7 +1042,7 @@ You should configure the domain name on your computer. Otherwise, freeDiameter r
#### How many of UEs can Open5GS support?
See the [lib/core/ogs-3gpp-types.h](https://github.com/{{ site.github_username }}/open5gs/blob/master/lib/core/ogs-3gpp-types.h).
See the [lib/core/ogs-3gpp-types.h](https://github.com/{{ site.github_username }}/open5gs/blob/main/lib/core/ogs-3gpp-types.h).
```
#define MAX_NUM_OF_ENB 128
@@ -731,6 +1080,8 @@ Currently, the number of UE is limited to `128*128`.
* AUSF : 127.0.0.11
* UDM : 127.0.0.12
* PCF : 127.0.0.13
* NSSF : 127.0.0.14
* BSF : 127.0.0.15
* UDR : 127.0.0.20
```
@@ -774,7 +1125,7 @@ Currently, the number of UE is limited to `128*128`.
```
* IPv4 : 10.45.0.1/16
* IPv6 : cafe::1/64
* IPv6 : 2001:230:cafe::1/48
```
- DNS
@@ -904,3 +1255,33 @@ getsockopt level=132 optname=0 not yet supported
The SCTP module is not included in the QEMU kernel. I believe that if the Linux kernel installed on your target platform contains an SCTP module, it will work normally.
{: .notice--warning}
#### Cannot open shared object file when running daemon
An error occurred when running as follows.
```
$ ./install/bin/open5gs-nrfd
./install/bin/open5gs-nrfd: error while loading shared libraries: libogscrypt.so.2: cannot open shared object file: No such file or directory
```
You need to specify the absolute path to the shared 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
```

View File

@@ -173,9 +173,9 @@ $ sudo apt install open5gs
The following shows how to install the Web UI of Open5GS.
```bash
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt install nodejs
$ curl -sL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
$ curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
```
### Configuration & Running
@@ -222,7 +222,7 @@ Then proceed as follows:
3. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
4. Click `SAVE` Button
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
```diff
$ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
@@ -257,7 +257,7 @@ $ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
ciphering_order : [ EEA0, EEA1, EEA2 ]
```
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
```diff
$ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
--- sgwu.yaml.old 2020-08-22 12:08:44.782880778 -0400
@@ -308,11 +308,13 @@ 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"
### Enable IPv4/IPv6 Forwarding
$ sudo sysctl -w net.ipv4.ip_forward=1
$ sudo sysctl -w net.ipv6.conf.all.forwarding=1
### Add NAT Rule
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
$ sudo ip6tables -t nat -A POSTROUTING -s 2001:230:cafe::/48 ! -o ogstun -j MASQUERADE
```
**Note:** For the first time, it is a good condition if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add a rule differently.

View File

@@ -754,22 +754,22 @@ Below startup script can be used for setting up interfaces:
```
#!/bin/bash
sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sh -c "echo 1 > /proc/sys/net/ipv6/ip_forward"
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
ip tuntap add name ogstun mode tun
ip addr add 192.168.100.1/24 dev ogstun
ip addr add fd84:6aea:c36e:2b69::/64 dev ogstun
ip addr add fd84:6aea:c36e:2b69::/48 dev ogstun
ip link set ogstun mtu 1400
ip link set ogstun up
iptables -t nat -A POSTROUTING -s 192.168.100.0/24 ! -o ogstun -j MASQUERADE
ip6tables -t nat -A POSTROUTING -s fd84:6aea:c36e:2b69::/64 ! -o ogstun -j MASQUERADE
ip6tables -t nat -A POSTROUTING -s fd84:6aea:c36e:2b69::/48 ! -o ogstun -j MASQUERADE
iptables -I INPUT -i ogstun -j ACCEPT
ip6tables -I INPUT -i ogstun -j ACCEPT
ip tuntap add name ogstun2 mode tun
ip addr add 192.168.101.1/24 dev ogstun2
ip addr add fd1f:76f3:da9b:0101::/64 dev ogstun2
ip addr add fd1f:76f3:da9b:0101::/48 dev ogstun2
ip link set ogstun2 mtu 1400
ip link set ogstun2 up
iptables -I INPUT -i ogstun2 -j ACCEPT
@@ -787,6 +787,7 @@ APN Configuration:
---------------------------------------------------------------------------------------------------------------------
| ims | IPv4 | 5 | 1 | Disabled | Disabled | 3850/1530 | | |
| | | 1 | 2 | Enabled | Enabled | 128/128 | 128/128 | |
| | | 2 | 4 | Enabled | Enabled | 128/128 | 128/128 | |
---------------------------------------------------------------------------------------------------------------------
</pre>
@@ -1131,13 +1132,13 @@ Visited Network = ims.mnc001.mcc001.3gppnetwork.org
Click Add
Associate IMPI(s) to IMPU
IMPI Identity = 001011234567891@ims.mnc001.mcc001.3gppnetwork.org
IMPI Identity = 001010123456791@ims.mnc001.mcc001.3gppnetwork.org
Click Add
2. sip:0198765432100
2. sip:0198765432100@ims.mnc001.mcc001.3gppnetwork.org
Public User Identity -IMPU-
Identity = sip:0198765432100
Identity = sip:0198765432100@ims.mnc001.mcc001.3gppnetwork.org
Service Profile = default_sp
Charging-Info Set = default_charging_set
Can Register = Yes
@@ -1150,12 +1151,12 @@ Visited Network = ims.mnc001.mcc001.3gppnetwork.org
Click Add
Associate IMPI(s) to IMPU
IMPI Identity = 001011234567891@ims.mnc001.mcc001.3gppnetwork.org
IMPI Identity = 001010123456791@ims.mnc001.mcc001.3gppnetwork.org
Click Add
And, finally add these IMPUs as implicit set of IMSI derived IMPU in HSS i.e sip:001011234567891@ims.mnc001.mcc001.3gppnetwork.org as follows:
And, finally add these IMPUs as implicit set of IMSI derived IMPU in HSS i.e sip:001010123456791@ims.mnc001.mcc001.3gppnetwork.org as follows:
1. Goto to IMPU sip:001011234567891@ims.mnc001.mcc001.3gppnetwork.org
1. Goto to IMPU sip:001010123456791@ims.mnc001.mcc001.3gppnetwork.org
2. In "Add IMPU(s) to Implicit-Set" section give IMPU Identity created above to be added to this IMPU
```

View File

@@ -14,42 +14,31 @@ Setup description:
#### 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.
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 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.
You have to prepare IMSI, Ki, OP/OPc, SQN of your SIM cards.
#### 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.
2. Use MCC = 001, MNC = 01 for a test 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
Refer to: https://github.com/herlesupreeth/CoIMS_Wiki/blob/master/README.md
* 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`.
* gp --acr-list-aram
#### 2. Build Open5GS, Kamailio with docker-compose
@@ -62,54 +51,76 @@ 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
git clone https://github.com/herlesupreeth/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. Configuring your setup
`.env` is the only file most of them need to edit as per their deployment needs
{: .notice--warning}
#### 3. (Optional) Run srsENB in a separate container
Edit only the following parameters in `.env` as per your setup
```
MCC
MNC
TEST_NETWORK --> Change this only if it clashes with the internal network at your home/office
DOCKER_HOST_IP --> This is the IP address of the host running your docker setup
SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB is not running the same docker network/host
```
If eNB is NOT running in the same docker network/host as the host running the dockerized Core + IMS then follow the below additional steps
Under `mme` section in docker compose file (`docker-compose.yaml`, `nsa-deploy.yaml`), uncomment the following part
```
...
# ports:
# - "36412:36412/sctp"
...
```
Under `sgwu` section in docker compose file (`docker-compose.yaml`, `nsa-deploy.yaml`), uncomment the following part
```
...
# ports:
# - "2152:2152/udp"
...
```
#### 4. Building 4G/5G Core + IMS related components images
```
cd docker_open5gs
source .env
docker-compose build --no-cache
```
#### 5. (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,
```
cd docker_open5gs
source .env
docker-compose -f srsenb.yaml build --no-cache
docker-compose -f srsenb.yaml up
```
#### 6. Configuration and register two UE
#### 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
If there is a need to change the Core Network component configuration files
found under their respective folder, make sure to re-compile images using
`docker-compose build` again.
{: .notice--warning}
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
@@ -129,14 +140,12 @@ Follow the instructions in [VoLTE Setup](https://open5gs.org/open5gs/docs/tutori
![Set both type to IPv4 only](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/subscriber-type-ipv4.png)
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.
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
Pay special attention to copy/paste. You might have leading or trailing spaces
in FHoSS, resulting in failed connections!
#### 5. Debugging with Wireshark
#### 7. 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).
@@ -174,8 +183,7 @@ order to add xfrm state and policy.
![401 Unauthorized](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/401-unauthorized.png)
#### 6. Successful calls
#### 8. 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)
@@ -230,14 +238,11 @@ Trying, a UE that does not support IPSec is sent a SIP INVITE in clear text:
![non-ipsec callee](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/ipsec-to-noipsec.png)
#### 7. Known issues
#### 9. Known issues
- IPv6 is not supported.
#### 8. References
#### 10. 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/)

View File

@@ -14,15 +14,17 @@ Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core
- Support of USIM cards using Milenage
- IPv6 support
- Multiple PDU session
- S1/X2 and Xn Handover
- Handover(5GC Xn/N2 and EPC S1/X2)
- CSFB(Circuit Switched Fall Back) and SMSoS(SMS Over SGs)
- VoLTE(Voice over LTE)
#### Known Limitations
---
- No OCS/OFCS
- No VoNR(Voice over NR)
- No Interworking with EPC
- No NB-IoT
- No OCS/OFCS
- No eMBMS
- No SRVCC
- No Roaming

View File

@@ -8,19 +8,11 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
- User's Guide
- [Quickstart](guide/01-quickstart)
- [Building Open5GS from Sources](guide/02-building-open5gs-from-sources)
- [Splitting Network Functions](guide/03-splitting-network-functions)
- Tutorials
- [Your First LTE](tutorial/01-your-first-lte)
- [EPC Advanced Example with OpenAirInterface UE/RAN](https://github.com/s5uishida/open5gs_epc_oai_sample_config)
- [VoLTE Setup with Kamailio IMS and Open5GS](tutorial/02-VoLTE-setup)
- [Dockerized VoLTE Setup](tutorial/03-VoLTE-dockerized)
- [My first 5G Core : Open5GS and UERANSIM](http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
- [5GC Advanced Example with UERANSIM](https://github.com/s5uishida/open5gs_5gc_ueransim_sample_config)
- [Sending SMS in Open5GS LTE Networks using the SGs Interface and OsmoMSC](https://nickvsnetworking.com/sending-sms-in-open5gs-lte-networks-using-the-sgs-interface-and-osmomsc-with-smsos/)
- [OsmoMSC and Open5GS MME SGs Interface for CSCF / InterRAT Handover](https://nickvsnetworking.com/osmomsc-and-open5gs-mme-sgs-interface-for-cscf-interran-handover/)
- [Static IPs for UEs](http://nickvsnetworking.com/open5gs-epc-static-ip-addresses-for-ues-apns-subscribers/)
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
- Troubleshooting
- [Simple Issues](troubleshoot/01-simple-issues)
@@ -30,8 +22,24 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
- [Debian/Ubuntu](platform/01-debian-ubuntu)
- [CentOS](platform/02-centos)
- [Fedora](platform/03-fedora)
- [MacOSX](platform/05-macosx)
- [MacOSX(Apple Silicon)](platform/05-macosx-apple-silicon)
- [MacOSX(Intel)](platform/06-macosx-intel)
- [FreeBSD](platform/07-freebsd)
- [Alpine](platform/08-alpine)
- Hardware Specific Notes
- [Tested e/gNodeBs](hardware/01-genodebs)
- [eNodeBs/gNodeBs tested on Open5GS](hardware/01-genodebs)
- @infinitydon
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
- @nickvsnetworking
- [My first 5G Core : Open5GS and UERANSIM](http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
- [Sending SMS in Open5GS LTE Networks using the SGs Interface and OsmoMSC](https://nickvsnetworking.com/sending-sms-in-open5gs-lte-networks-using-the-sgs-interface-and-osmomsc-with-smsos/)
- [OsmoMSC and Open5GS MME SGs Interface for CSCF / InterRAT Handover](https://nickvsnetworking.com/osmomsc-and-open5gs-mme-sgs-interface-for-cscf-interran-handover/)
- [Static IPs for UEs](http://nickvsnetworking.com/open5gs-epc-static-ip-addresses-for-ues-apns-subscribers/)
- @s5uishida
- [EPC Advanced Example with OpenAirInterface UE/RAN](https://github.com/s5uishida/open5gs_epc_oai_sample_config)
- [5GC Advanced Example with UERANSIM](https://github.com/s5uishida/open5gs_5gc_ueransim_sample_config)

View File

@@ -79,7 +79,7 @@ pgw:
- addr: ::1
ue_pool:
- addr: 10.45.0.1/16
- addr: cafe::1/64
- addr: 2001:230:cafe::1/48
dns:
- 8.8.8.8
- 8.8.4.4

View File

@@ -0,0 +1,23 @@
---
title: "v2.1.4 - Paging was added"
date: 2021-01-18 21:23:00 -0500
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New feature
- [5GC] Paging ([c9363b1](https://github.com/open5gs/open5gs/commit/c9363b132093581b6fd2ce794aa63cd597bf83a6))
#### Enhancement
- [PFCP] Legacy support for pre-release LTE11 devices while performing VoLTE call([#757](https://github.com/open5gs/open5gs/pull/757)) -- [herlesupreeth](https://github.com/herlesupreeth)
#### Bug Fixes
- [EPC] Use ESM cause(43:Invalid EPS bearer identity) if SGW-C sends GTP cause(Context Not Found) ([#755](https://github.com/open5gs/open5gs/issues/755)) -- [herlesupreeth](https://github.com/herlesupreeth)
- [MME] fix a bug where SCTP stream number was not set while sending S1-Paging message. ([c9363b1](https://github.com/open5gs/open5gs/commit/c9363b132093581b6fd2ce794aa63cd597bf83a6))
Download -- [v2.1.4.tar.gz](https://github.com/open5gs/open5gs/archive/v2.1.4.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,29 @@
---
title: "v2.1.5 - 5G Core N2 based handover"
date: 2021-02-02 14:52:00 -0500
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New feature
- [5GC] N2 Handver ([49a9e58](https://github.com/open5gs/open5gs/commit/49a9e58efe3f6ecd482c3b77b98cd0841688b647), [ff5236f](https://github.com/open5gs/open5gs/commit/ff5236f3e01ee6984bc78eaacc7d84e08c321266))
#### Enhancement
- [AMF/MME] Check IMEISV length == 16 digits ([388e642](https://github.com/open5gs/open5gs/commit/388e64213fcebc257eb7bd0223105c3055c56252))
- [AMF] Add Handling Duplicated PDU Session ID ([d9417be](https://github.com/open5gs/open5gs/commit/d9417be9a62255efa91a11ee2c424ec1e739b919))
- [ASN] S1AP/NGAP update to v16.4.0(2021-01-04) ([ada01fc](https://github.com/open5gs/open5gs/commit/ada01fca8ffaea029d2ae04e6bc1bb499ab37894))
- [AMF/MME] Add UserLocation Handling in UplinkNASTransport ([#772](https://github.com/open5gs/open5gs/pull/772)) -- [zhonglin6666](https://github.com/zhonglin6666)
#### Bug Fixes
- [UDR] Modify SmfSelectionSubscriptionData ([#785](https://github.com/open5gs/open5gs/pull/785)) -- [zhonglin6666](https://github.com/zhonglin6666)
- [MME] ENBDirectInformationTransfer decoding problem ([#783](https://github.com/open5gs/open5gs/issues/783)) -- [kuanghanqian](https://github.com/kuanghanqian)
- [AMF] PartOfNG-Interface in NGReset decoding problem ([#773](https://github.com/open5gs/open5gs/issues/773)) -- [acetcom](https://github.com/acetcom)
- [AMF] Fix UE Context Request IE Handling ([#771](https://github.com/open5gs/open5gs/issues/771)) -- [kuanghanqian](https://github.com/kuanghanqian)
- [5GC] Fix the AMF/SMF/UDM crash issues ([#770](https://github.com/open5gs/open5gs/issues/770), [#771](https://github.com/open5gs/open5gs/issues/771)) -- [kuanghanqian](https://github.com/kuanghanqian)
Download -- [v2.1.5.tar.gz](https://github.com/open5gs/open5gs/archive/v2.1.5.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,22 @@
---
title: "v2.1.7 - 5G Core Hotfix"
date: 2021-02-07 22:31:00 -0500
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### Bug Fixes
- [5GC/EPC] Pool size adjusted to support 1,024 UEs ([#753](https://github.com/open5gs/open5gs/issues/753)) -- [zhouxiang93123](https://github.com/zhouxiang93123)
- [AMF] Crash during handling Duplicated PDU Session ID ([#793](https://github.com/open5gs/open5gs/issues/783)) -- [kuanghanqian](https://github.com/kuanghanqian)
#### New Platform
- MacOSX with Apple M1 Silicon ([7901a1](https://github.com/open5gs/open5gs/commit/7901a1164fdaa04cf72a5a944f50474d569f619d))
- FreeBSD ([852756](https://github.com/open5gs/open5gs/commit/852756f90222a8e0821f6e1994baa32eafbdc47c))
Download -- [v2.1.7.tar.gz](https://github.com/open5gs/open5gs/archive/v2.1.7.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,30 @@
---
title: "v2.2.0 - DB Schema Changes"
date: 2021-03-08 21:35:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### DB Schema Changes
- No backward compatibility. If you are using an old subscription DB, you should change to the new DB schema.
#### New features
- NSSF(Network Slice Selection Function) is added.
- SMF selection is added.
#### Enhancement
- [DB] Masking MongoDB credentials when logging ([#827](https://github.com/open5gs/open5gs/pull/827)) -- [cglewis](https://github.com/cglewis)
- [EPC/5GC] Branch name changes from master to main ([#811](https://github.com/open5gs/open5gs/pull/811)) -- [PawelMack](https://github.com/PawelMack)
- [AMF] Cause of UEContextRelaseCommand uses Cause of UEContextReleaseRequest ([#789](https://github.com/open5gs/open5gs/issues/789)) -- [PawelMack](https://github.com/PawelMack)
#### Bug Fixes
- [SMF] Fix the bug for DataForwardingNotPossible ([31977bf](https://github.com/open5gs/open5gs/commit/31977bf30a396389557c8be0f82cfdfb8152d580))
- [AMF] Fix the exception handling routine when UE/gNB repeatedly sends NGAP messages ([#804](https://github.com/open5gs/open5gs/issues/804)) -- [strongcourage](https://github.com/strongcourage)
Download -- [v2.2.0.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.0.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,31 @@
---
title: "v2.2.1 - UE IPv6 Support"
date: 2021-03-15 09:38:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
---
#### IMPORTANT
To use the new WebUI v2.2.1, you have to log out and log back in to reset your browser token information.
{: .blue}
#### UE IPv6 Support
- If the SMF receives Router Solicitation Message through UPF, it sends Router Advertisement Message to the UE through UPF.
- If the UPF matches the IPv6 Prefix instead of Full IPv6 address, it forwards the packet to the UE. ([#808](https://github.com/open5gs/open5gs/issues/808)) -- [kbarlee](https://github.com/kbarlee), [byteburner](https://github.com/byteburner)
#### Enhancement
- Adding API tokens to WebUI to improve security vulnerabilities ([#838](https://github.com/open5gs/open5gs/pull/838)) -- [rashley-iqt](https://github.com/rashley-iqt)
#### Bug Fixes
- [AMF] Fixed a problem that occurs when the UE does not send S-NSSAI in UL NAS Transport message ([#845](https://github.com/open5gs/open5gs/issues/845)) -- [mcatalancid](https://github.com/mcatalancid)
- [AMF] Fixed a problem that occurs when the UE does not send Request-NSSAI in Registration request([#844](https://github.com/open5gs/open5gs/issues/844)) -- [ggardikis](https://github.com/ggardikis)
- [MME] Fixed the infinit loop related to Delete-Session-Request ([#568](https://github.com/open5gs/open5gs/issues/568)) -- [domgth](https://github.com/domgth)
Download -- [v2.2.1.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.1.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,93 @@
---
title: "v2.2.6 - HSS Cx Added"
date: 2021-04-09 21:15:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
---
#### New Features
- [HSS] Cx Interface Added
- [EPC] Added E-RABModificationIndication/E-RABModificationConfirm ([#834](https://github.com/open5gs/open5gs/issues/834)) -- [alf-askey](https://github.com/alf-askey)
- [ALL] Advertising address for all SBI and GTP-U interfaces ([#825](https://github.com/open5gs/open5gs/issues/825)) -- [infinitydon](https://github.com/infinitydon)
#### Enhancement
- [MME/AMF] Added SACK_DELAY_TIME in the AMF/MME configuration files ([#895](https://github.com/open5gs/open5gs/issues/895)) -- [RafalArciszewski](https://github.com/RafalArciszewski)
- [DB] Updated Python Lib docs and script to migrate DB data to new format ([#889](https://github.com/open5gs/open5gs/pull/889)) -- [nickvsnetworking](https://github.com/nickvsnetworking)
#### Bug Fixes
- [AMF] Fixed a crash when gNB with 40+ connected UE's disconnect ([#925](https://github.com/open5gs/open5gs/issues/925)) -- [Spectranis](https://github.com/Spectranis)
- [WebUI] Fixed the installation script for solving the debian mongod dependency problem ([#915](https://github.com/open5gs/open5gs/issues/915)) -- [iman432](https://github.com/iman432)
- [AMF] Fixed a crash for unknown timezone offset ([#914](https://github.com/open5gs/open5gs/issues/914)) -- [iman432](https://github.com/iman432)
- [AMF] Always Include Allow NSSAI in Registration accept ([#910](https://github.com/open5gs/open5gs/issues/910)) -- [chliny2016](https://github.com/chliny2016)
- [freeDiameter] A crash has been fixed when using a version prior to v2.2.3 ([#898](https://github.com/open5gs/open5gs/issues/898)) -- [Nour963](https://github.com/Nour963), [kbarlee](https://github.com/kbarlee)
- [AMF] Fixed a crash when a lot of number simultaneous connections occur. ([#886](https://github.com/open5gs/open5gs/issues/886)) -- [dongzx666](https://github.com/dongzx666)
- [MME/AMF] Fixed a bug when S-TMSI does not exist in InitialUEMessage ([#890](https://github.com/open5gs/open5gs/issues/890)) -- [chliny2016](https://github.com/chliny2016)
- [MME] Fix an issue where Modify Bearer Request was not sent ([#885](https://github.com/open5gs/open5gs/issues/885)) -- [RafalArciszewski](https://github.com/RafalArciszewski)
- [PFCP/GTP] Fix to be able to ignore unknown TLV type ([#871](https://github.com/open5gs/open5gs/issues/871)) -- [infinitydon](https://github.com/infinitydon)
- [IMS] Fix the problem with managingg multiple calls ([#869](https://github.com/open5gs/open5gs/issues/869)) -- [ngvoice](https://github.com/ngvoice)
- [AMF] Fix creating allowed-NSSAI ([#859](https://github.com/open5gs/open5gs/issues/859)) -- [AniketTiw](https://github.com/AniketTiw)
- [5GC] When PDR is created without deleting session, there is a bug to create new PDR. ([#860](https://github.com/open5gs/open5gs/issues/860)) -- [kbarlee](https://github.com/kbarlee)
- [NSSF] Add default NSI configuration for NSSF ([#859](https://github.com/open5gs/open5gs/issues/859)) -- [AniketTiw](https://github.com/AniketTiw)
- [MME] Fixed the MME crash during HandoverCancel without Target eNB ([#855](https://github.com/open5gs/open5gs/issues/855)) -- [kuanghanqian](https://github.com/kuanghanqian)
#### IMPORTANT Using v2.2.x
- **DB Schema Changes:** If you are using an existing subscription DB, you should delete the existing DB. Then you can add a new subscription DB.
{: .blue}
```
$ mongo
> use open5gs
switched to db open5gs
> db.subscribers.drop()
true
```
- **The New WebUI:** You have to log out using the old WebUI backend/frontend. Then, you can log back in again using the new WebUI backend/frontend.
{: .blue}
```
$ git checkout v2.1.7
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You should log out
$ git checkout main
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You can log back in
```
- freeDiameter version has changed from 1.3.2 to 1.5.0. If you want to compile the source code, you need to update meson subprojects as shown below.
{: .blue}
```
$ cd open5gs
$ git pull
$ meson subprojects update
$ cd build
$ ninja
```
Or just use a clean github repository.
```
$ rm -Rf open5gs
$ git clone https://github.com/open5gs/open5gs
$ cd open5gs
$ meson build --prefix=`pwd`/install
$ cd build
$ ninja
```
Download -- [v2.2.6.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.6.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,87 @@
---
title: "v2.2.7 - Tested with 500 UEs simultaneous connection"
date: 2021-04-30 14:29:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
---
#### Bug Fixes
- [ALL] 500 UEs simultaneous connection test with [UERANSIM](https://github.com/aligungr/UERANSIM) ([#949](https://github.com/open5gs/open5gs/issues/949)) -- [chenhao5651](https://github.com/chenhao5651)
- [MME] Fix the Invalid AMBR Unit ([#967](https://github.com/open5gs/open5gs/issues/967)) -- [matt9j](https://github.com/matt9j)
- [PFCP] Fix the DNS delay during PFCP association ([#891](https://github.com/open5gs/open5gs/issues/891)) -- [DendoD96](https://github.com/DendoD96)
- [Cx] Change the order of IMPUs sent in XML ([#921](https://github.com/open5gs/open5gs/issues/921)) -- [herlesupreeth](https://github.com/herlesupreeth)
- [PFCP] Changed the PFCP RR selection method ([#953](https://github.com/open5gs/open5gs/issues/953)) -- [infinitydon](https://github.com/infinitydon)
- [ALL] Changed the terminate sequence to avoid crash when an invalid IP address is configured ([#938](https://github.com/open5gs/open5gs/issues/938)) -- [myonlystarWang](https://github.com/myonlystarWang)
- [Docker] Update WebUI version to latest ([#945](https://github.com/open5gs/open5gs/issues/945)) -- [rriggio](https://github.com/rriggio)
#### Enhancement
- [MME/AMF] Retransmission on timer expiration for Registration accept / Attach accept
- [MME/AMF] GUTI generation changed ([#910](https://github.com/open5gs/open5gs/issues/910)) -- [chliny2016](https://github.com/chliny2016)
- [DB] Update open5gs-dbctl ([#940](https://github.com/open5gs/open5gs/pull/940)) -- [Spectranis](https://github.com/Spectranis)
#### New Features
- [DB] Added DB migration script ([#956](https://github.com/open5gs/open5gs/pull/956), [#968](https://github.com/open5gs/open5gs/pull/968)) -- [matt9j](https://github.com/matt9j)
- [AMF] Added RANConfigurationUpdate ([#943](https://github.com/open5gs/open5gs/issues/943)) -- [navidsol9](https://github.com/navidsol9)
#### IMPORTANT Using v2.2.x
- **DB Schema Changes:** If you are using an existing subscription DB, you should delete the existing DB. Then you can add a new subscription DB.
{: .blue}
```
$ mongo
> use open5gs
switched to db open5gs
> db.subscribers.drop()
true
```
- **The New WebUI:** You have to log out using the old WebUI backend/frontend. Then, you can log back in again using the new WebUI backend/frontend.
{: .blue}
```
$ git checkout v2.1.7
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You should log out
$ git checkout main
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You can log back in
```
- freeDiameter version has changed from 1.3.2 to 1.5.0. If you want to compile the source code, you need to update meson subprojects as shown below.
{: .blue}
```
$ cd open5gs
$ git pull
$ meson subprojects update
$ cd build
$ ninja
```
Or just use a clean github repository.
```
$ rm -Rf open5gs
$ git clone https://github.com/open5gs/open5gs
$ cd open5gs
$ meson build --prefix=`pwd`/install
$ cd build
$ ninja
```
Download -- [v2.2.7.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.7.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,83 @@
---
title: "v2.2.8 - Security Protection"
date: 2021-05-09 11:27:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
---
#### Bug Fixes
- [AMF] Distinguish between Cleartext and Non-cleartext IEs ([#958](https://github.com/open5gs/open5gs/issues/958), [UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [p1-bmu](https://github.com/p1-bmu), [aligungr](https://github.com/aligungr)
- [AMF] Fix SBI convert error for ng_ap_cause ([UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [aligungr](https://github.com/aligungr)
- [AMF] Allocate ngKSI other than the value already used ([UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [aligungr](https://github.com/aligungr)
- [AMF] fix the UE-AMBR usage in NGAP message ([#979](https://github.com/open5gs/open5gs/issues/979)) -- [mcatalancid](https://github.com/mcatalancid)
- [SMF/UPF] Add assertion for getprotobyname() error when decoding IPFilterRule ([#977](https://github.com/open5gs/open5gs/issues/977)) -- [herlesupreeth](https://github.com/herlesupreeth)
- [MME/SGW-C] Fix the bug of encoding GTPv2 PLMN-ID ([#969](https://github.com/open5gs/open5gs/issues/969)) -- [gusbourg](https://github.com/gusbourg)
- [MME] Fix the bug of encoding NAS AMBR ([#967](https://github.com/open5gs/open5gs/issues/967)) -- [matt9j](https://github.com/matt9j)
- [AMF] Protetion of malformed NGAP message ([#960](https://github.com/open5gs/open5gs/issues/960)) -- [p1-bmu](https://github.com/p1-bmu)
- [AMF] Protetion of malformed NAS message ([#959](https://github.com/open5gs/open5gs/issues/959)) -- [p1-bmu](https://github.com/p1-bmu)
- [WebUI] fix the security flaw in default admin account ([#764](https://github.com/open5gs/open5gs/issues/764)) -- [martinzhou2015](https://github.com/martinzhou2015)
#### New Features
- [OS] Support Alpine ([#957](https://github.com/open5gs/open5gs/pull/957), [#968](https://github.com/open5gs/open5gs/pull/968)) -- [venkatpilla](https://github.com/venkatpilla)
#### IMPORTANT Using v2.2.x
- **DB Schema Changes:** If you are using an existing subscription DB, you should delete the existing DB. Then you can add a new subscription DB.
{: .blue}
```
$ mongo
> use open5gs
switched to db open5gs
> db.subscribers.drop()
true
```
- **The New WebUI:** You have to log out using the old WebUI backend/frontend. Then, you can log back in again using the new WebUI backend/frontend.
{: .blue}
```
$ git checkout v2.1.7
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You should log out
$ git checkout main
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You can log back in
```
- freeDiameter version has changed from 1.3.2 to 1.5.0. If you want to compile the source code, you need to update meson subprojects as shown below.
{: .blue}
```
$ cd open5gs
$ git pull
$ meson subprojects update
$ cd build
$ ninja
```
Or just use a clean github repository.
```
$ rm -Rf open5gs
$ git clone https://github.com/open5gs/open5gs
$ cd open5gs
$ meson build --prefix=`pwd`/install
$ cd build
$ ninja
```
Download -- [v2.2.8.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.8.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,77 @@
---
title: "v2.2.9 - Ubuntu 21.04(hirsute) Release"
date: 2021-05-19 14:13:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
---
#### Bug Fixes
- [AMF] Fix the bug related to Cleartext and Non-cleartext IEs
([#1006](https://github.com/open5gs/open5gs/issues/1006), [#958](https://github.com/open5gs/open5gs/issues/958), [UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [ramonss](https://github.com/ramonss), [p1-bmu](https://github.com/p1-bmu), [aligungr](https://github.com/aligungr)
- [AMF] Add protection code for message(asn1c, nas, gtp, pfcp) encoding ([#991](https://github.com/open5gs/open5gs/issues/991)) -- [shuimoshusheng](https://github.com/shuimoshusheng)
- [MME] Packet filter (flow) precedence should be assigned within the session, not bearer. ([#1001](https://github.com/open5gs/open5gs/pull/1001)) -- [herlesupreeth](https://github.com/herlesupreeth)
- [MME/SGW-C/SGW-U/SMF/UPF] Force shutdown when UDP port duplicated with other process ([#986](https://github.com/open5gs/open5gs/issues/986), [#992](https://github.com/open5gs/open5gs/issues/992)) -- [ybouhamza](https://github.com/ybouhamza), [polhenarejos](https://github.com/polhenarejos)
- [AMF] Fix the error of decoding Extended-RANNodeName ([#994](https://github.com/open5gs/open5gs/issues/994)) -- [fefer](https://github.com/fefer)
- [AMF] Add more buffer for 5GMM capability ([#959](https://github.com/open5gs/open5gs/issues/959)) -- [p1-bmu](https://github.com/p1-bmu)
#### IMPORTANT Using v2.2.x
- **DB Schema Changes:** If you are using an existing subscription DB, you should delete the existing DB. Then you can add a new subscription DB.
{: .blue}
```
$ mongo
> use open5gs
switched to db open5gs
> db.subscribers.drop()
true
```
- **The New WebUI:** You have to log out using the old WebUI backend/frontend. Then, you can log back in again using the new WebUI backend/frontend.
{: .blue}
```
$ git checkout v2.1.7
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You should log out
$ git checkout main
$ cd webui
$ rm -Rf ./node_modules
$ npm ci --no-optional
$ npm run dev
## You can log back in
```
- freeDiameter version has changed from 1.3.2 to 1.5.0. If you want to compile the source code, you need to update meson subprojects as shown below.
{: .blue}
```
$ cd open5gs
$ git pull
$ meson subprojects update
$ cd build
$ ninja
```
Or just use a clean github repository.
```
$ rm -Rf open5gs
$ git clone https://github.com/open5gs/open5gs
$ cd open5gs
$ meson build --prefix=`pwd`/install
$ cd build
$ ninja
```
Download -- [v2.2.9.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.9.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,27 @@
---
title: "v2.3.0 - BSF Added in 5G Core"
date: 2021-06-08 21:37:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
---
#### New Features
- [BSF] New NF is added ([commit-6119867](https://github.com/open5gs/open5gs/commit/fe89f7cd11d415ae89da2724fc67aa573efa83c3))
- [UPF] Support TAP interfaces with ARP/ND ([#1022](https://github.com/open5gs/open5gs/pull/1022)) -- [anarkiwi](https://github.com/anarkiwi)
#### Enhancement
- [ALL] Add more memory log ([commit-118d62d](https://github.com/open5gs/open5gs/commit/118d62d42df5037665b93698cfaa67d34a7519ec))
- [ALL] Add more error log ([commit-80a9497](https://github.com/open5gs/open5gs/commit/80a9497afdefe72e9deacbaa66ebc1c203de23ea))
#### Bug Fixes
- [SMF] Fix the crash bug ([#1034](https://github.com/open5gs/open5gs/issues/1034), [#1006](https://github.com/open5gs/open5gs/issues/1006)) -- [mcatalancid](https://github.com/mcatalancid), [ramonss](https://github.com/ramonss)
- [SBI] Fix the default SBI port number([#1008](https://github.com/open5gs/open5gs/issues/1008), [#997](https://github.com/open5gs/open5gs/issues/997)) -- [mmailand](https://github.com/mmailand), [plutec](https://github.com/plutec)
- [SMF] Fix DRB lost issue when additional TFTs needs to be added to existing bearer with TFTs ([#1019](https://github.com/open5gs/open5gs/pull/1019)) -- [herlesupreeth](https://github.com/herlesupreeth)
Download -- [v2.3.0.tar.gz](https://github.com/open5gs/open5gs/archive/v2.3.0.tar.gz)
{: .notice--info}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 326 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -4,13 +4,13 @@
#
# Run as root or insert `sudo -E` before `bash`:
#
# curl -sL http://open5gs.org/static/setup_3.x | bash -
# curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
# or
# wget -qO- http://open5gs.org/static/setup_3.x | bash -
# wget -qO- https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
#
PACKAGE="open5gs"
VERSION="2.0.0"
VERSION="2.2.8"
print_status() {
echo
@@ -68,16 +68,28 @@ exec_cmd() {
}
uninstall() {
exec_cmd_nobail "deb-systemd-invoke stop open5gs-webui"
exec_cmd_nobail "systemctl disable open5gs-webui"
exec_cmd_nobail "rm -f /lib/systemd/system/${PACKAGE}-webui.service"
exec_cmd_nobail "systemctl daemon-reload"
if [ -f /lib/systemd/system/${PACKAGE}-webui.service ]; then
STATUS="$(systemctl is-active open5gs-webui.service)"
if [ "${STATUS}" = "active" ]; then
exec_cmd_nobail "deb-systemd-invoke stop open5gs-webui"
fi
STATUS="$(systemctl is-enabled open5gs-webui.service)"
if [ "${STATUS}" = "enabled" ]; then
exec_cmd_nobail "systemctl disable open5gs-webui"
fi
exec_cmd_nobail "rm -f /lib/systemd/system/${PACKAGE}-webui.service"
exec_cmd_nobail "systemctl daemon-reload"
fi
if [ -d /usr/lib/node_modules/${PACKAGE} ]; then
exec_cmd_nobail "rm -rf /usr/lib/node_modules/${PACKAGE}"
fi
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
exec_cmd "rm -rf /usr/lib/node_modules/${PACKAGE}"
}
setup() {
preinstall() {
PRE_INSTALL_PKGS=""
@@ -228,7 +240,7 @@ if [[ $RC != 0 ]]; then
fi
print_status "Build the Open5GS WebUI..."
exec_cmd "cd ./${PACKAGE}-${VERSION}/webui && npm install && npm run build"
exec_cmd "cd ./${PACKAGE}-${VERSION}/webui && npm ci --no-optional && npm run build"
print_status "Install the Open5GS WebUI..."
exec_cmd "mv ./${PACKAGE}-${VERSION}/webui /usr/lib/node_modules/${PACKAGE}"
@@ -237,8 +249,7 @@ exec_cmd_nobail "chown -R open5gs:open5gs /usr/lib/node_modules/${PACKAGE}"
exec_cmd "cat << EOF > /lib/systemd/system/open5gs-webui.service
[Unit]
Description=Open5GS WebUI
BindTo=mongodb.service
After=networking.service mongodb.service
Wants=mongodb.service mongod.service
[Service]
Type=simple
@@ -260,6 +271,23 @@ exec_cmd "deb-systemd-invoke start open5gs-webui"
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
}
postinstall() {
print_status "Default Administrator Account [Username:admin, Password:1423]..."
exec_cmd "cat << EOF > ./account.js
db = db.getSiblingDB('open5gs')
cursor = db.accounts.find()
if ( cursor.count() == 0 ) {
db.accounts.insert({ salt: 'f5c15fa72622d62b6b790aa8569b9339729801ab8bda5d13997b5db6bfc1d997', hash: '402223057db5194899d2e082aeb0802f6794622e1cbc47529c419e5a603f2cc592074b4f3323b239ffa594c8b756d5c70a4e1f6ecd3f9f0d2d7328c4cf8b1b766514effff0350a90b89e21eac54cd4497a169c0c7554a0e2cd9b672e5414c323f76b8559bc768cba11cad2ea3ae704fb36abc8abc2619231ff84ded60063c6e1554a9777a4a464ef9cfdfa90ecfdacc9844e0e3b2f91b59d9ff024aec4ea1f51b703a31cda9afb1cc2c719a09cee4f9852ba3cf9f07159b1ccf8133924f74df770b1a391c19e8d67ffdcbbef4084a3277e93f55ac60d80338172b2a7b3f29cfe8a36738681794f7ccbe9bc98f8cdeded02f8a4cd0d4b54e1d6ba3d11792ee0ae8801213691848e9c5338e39485816bb0f734b775ac89f454ef90992003511aa8cceed58a3ac2c3814f14afaaed39cbaf4e2719d7213f81665564eec02f60ede838212555873ef742f6666cc66883dcb8281715d5c762fb236d72b770257e7e8d86c122bb69028a34cf1ed93bb973b440fa89a23604cd3fefe85fbd7f55c9b71acf6ad167228c79513f5cfe899a2e2cc498feb6d2d2f07354a17ba74cecfbda3e87d57b147e17dcc7f4c52b802a8e77f28d255a6712dcdc1519e6ac9ec593270bfcf4c395e2531a271a841b1adefb8516a07136b0de47c7fd534601b16f0f7a98f1dbd31795feb97da59e1d23c08461cf37d6f2877d0f2e437f07e25015960f63', username: 'admin', roles: [ 'admin' ], "__v" : 0})
}
EOF"
exec_cmd "mongo open5gs ./account.js"
exec_cmd "rm -f ./account.js"
}
## Defer setup until we have the complete script
setup
uninstall
preinstall
install
postinstall

View File

@@ -4,9 +4,9 @@
#
# Run as root or insert `sudo -E` before `bash`:
#
# curl -sL http://open5gs.org/static/uninstall_webui.sh | bash -
# curl -fsSL https://open5gs.org/open5gs/assets/webui/uninstall | sudo -E bash -
# or
# wget -qO- http://open5gs.org/static/uninstall_webui.shx | bash -
# wget -qO- https://open5gs.org/open5gs/assets/webui/uninstall | sudo -E bash -
#
exec_cmd_nobail() {

View File

@@ -78,6 +78,12 @@ void ausf_terminate(void);
int pcf_initialize(void);
void pcf_terminate(void);
int nssf_initialize(void);
void nssf_terminate(void);
int bsf_initialize(void);
void bsf_terminate(void);
int upf_initialize(void);
void upf_terminate(void);

View File

@@ -71,9 +71,12 @@ static void recalculate_pool_size(void)
#define MAX_NUM_OF_TIMER 16
self.pool.timer = self.max.ue * MAX_NUM_OF_TIMER;
self.pool.message = self.max.ue;
self.pool.event = self.max.ue;
self.pool.packet = self.max.ue * OGS_MAX_NUM_OF_PACKET_BUFFER;
self.pool.nf = self.max.gnb;
self.pool.packet = self.max.ue * OGS_MAX_NUM_OF_PACKET_BUFFER;
#define MAX_NUM_OF_SOCKET 4 /* Num of socket per NF */
self.pool.socket = self.pool.nf * MAX_NUM_OF_SOCKET;
@@ -86,17 +89,17 @@ static void recalculate_pool_size(void)
self.pool.pfcp_node = self.pool.nf;
#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_SBI_MESSAGE 4 /* Num of HTTP(s) Request/Response per NF */
#define MAX_NUM_OF_NF_SUBSCRIPTION 4 /* Num of Subscription per NF */
self.pool.nf_service = self.pool.nf * MAX_NUM_OF_NF_SERVICE;
self.pool.sbi_message = self.pool.nf * MAX_NUM_OF_SBI_MESSAGE;
self.pool.nf_subscription = self.pool.nf * MAX_NUM_OF_NF_SUBSCRIPTION;
#define MAX_EVENT_POOL 32
self.pool.event = MAX_EVENT_POOL;
#define MAX_CSMAP_POOL 128
self.pool.csmap = MAX_CSMAP_POOL; /* Num of TAI-LAI Mapping Table */
#define MAX_NUM_OF_IMPU 8
self.pool.impi = self.max.ue;
self.pool.impu = self.pool.impi * MAX_NUM_OF_IMPU;
}
static void regenerate_all_timer_duration(void)
@@ -173,6 +176,18 @@ static void app_context_prepare(void)
#define USRSCTP_LOCAL_UDP_PORT 9899
self.usrsctp.udp_port = USRSCTP_LOCAL_UDP_PORT;
self.sctp.heartbit_interval = 5000; /* 5 seconds */
self.sctp.sack_delay = 200; /* 200 ms */
self.sctp.rto_initial = 3000; /* 3 seconds */
self.sctp.rto_min = 1000; /* 1 seconds */
self.sctp.rto_max = 5000; /* 5 seconds */
self.sctp.max_num_of_ostreams = OGS_DEFAULT_SCTP_MAX_NUM_OF_OSTREAMS;
self.sctp.max_num_of_istreams = 65535;
self.sctp.max_attempts = 4;
self.sctp.max_initial_timeout = 8000; /* 8 seconds */
self.sockopt.no_delay = true;
#define MAX_NUM_OF_UE 1024 /* Num of UE per AMF/MME */
#define MAX_NUM_OF_GNB 32 /* Num of gNB per AMF/MME */
@@ -203,6 +218,14 @@ static void app_context_prepare(void)
*/
self.time.message.duration = ogs_time_from_sec(10);
/*
* Handover Wait Duration : 300 ms (Default)
*
* Time to wait for AMF/MME to send UEContextReleaseCommand
* to the source gNB/eNB after receiving HandoverNotify
*/
self.time.handover.duration = ogs_time_from_msec(300);
regenerate_all_timer_duration();
}
@@ -306,6 +329,12 @@ int ogs_app_context_parse_config(void)
} else if (!strcmp(parameter_key, "no_pcf")) {
self.parameter.no_pcf =
ogs_yaml_iter_bool(&parameter_iter);
} else if (!strcmp(parameter_key, "no_nssf")) {
self.parameter.no_nssf =
ogs_yaml_iter_bool(&parameter_iter);
} else if (!strcmp(parameter_key, "no_bsf")) {
self.parameter.no_bsf =
ogs_yaml_iter_bool(&parameter_iter);
} else if (!strcmp(parameter_key, "no_udr")) {
self.parameter.no_udr =
ogs_yaml_iter_bool(&parameter_iter);
@@ -321,9 +350,6 @@ int ogs_app_context_parse_config(void)
} else if (!strcmp(parameter_key, "multicast")) {
self.parameter.multicast =
ogs_yaml_iter_bool(&parameter_iter);
} else if (!strcmp(parameter_key, "no_slaac")) {
self.parameter.no_slaac =
ogs_yaml_iter_bool(&parameter_iter);
} else if (!strcmp(parameter_key, "use_openair")) {
self.parameter.use_openair =
ogs_yaml_iter_bool(&parameter_iter);
@@ -331,9 +357,28 @@ int ogs_app_context_parse_config(void)
parameter_key, "no_ipv4v6_local_addr_in_packet_filter")) {
self.parameter.no_ipv4v6_local_addr_in_packet_filter =
ogs_yaml_iter_bool(&parameter_iter);
} else if (!strcmp(parameter_key, "no_pfcp_rr_select")) {
self.parameter.no_pfcp_rr_select =
ogs_yaml_iter_bool(&parameter_iter);
} else
ogs_warn("unknown key `%s`", parameter_key);
}
} else if (!strcmp(root_key, "sockopt")) {
ogs_yaml_iter_t sockopt_iter;
ogs_yaml_iter_recurse(&root_iter, &sockopt_iter);
while (ogs_yaml_iter_next(&sockopt_iter)) {
const char *sockopt_key = ogs_yaml_iter_key(&sockopt_iter);
ogs_assert(sockopt_key);
if (!strcmp(sockopt_key, "no_delay")) {
self.sockopt.no_delay =
ogs_yaml_iter_bool(&sockopt_iter);
} else if (!strcmp(sockopt_key, "linger")) {
const char *v = ogs_yaml_iter_value(&sockopt_iter);
if (v) self.sockopt.l_linger = atoi(v);
self.sockopt.l_onoff = true;
} else
ogs_warn("unknown key `%s`", sockopt_key);
}
} else if (!strcmp(root_key, "sctp")) {
ogs_yaml_iter_t sctp_iter;
ogs_yaml_iter_recurse(&root_iter, &sctp_iter);
@@ -342,31 +387,34 @@ int ogs_app_context_parse_config(void)
ogs_assert(sctp_key);
if (!strcmp(sctp_key, "heartbit_interval")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.sockopt.sctp.heartbit_interval = atoi(v);
if (v) self.sctp.heartbit_interval = atoi(v);
} else if (!strcmp(sctp_key, "sack_delay")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.sctp.sack_delay = atoi(v);
} else if (!strcmp(sctp_key, "rto_initial")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.sockopt.sctp.rto_initial = atoi(v);
if (v) self.sctp.rto_initial = atoi(v);
} else if (!strcmp(sctp_key, "rto_min")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.sockopt.sctp.rto_min = atoi(v);
if (v) self.sctp.rto_min = atoi(v);
} else if (!strcmp(sctp_key, "rto_max")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.sockopt.sctp.rto_max = atoi(v);
if (v) self.sctp.rto_max = atoi(v);
} else if (!strcmp(sctp_key, "max_num_of_ostreams")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v)
self.sockopt.sctp.max_num_of_ostreams = atoi(v);
self.sctp.max_num_of_ostreams = atoi(v);
} else if (!strcmp(sctp_key, "max_num_of_istreams")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v)
self.sockopt.sctp.max_num_of_istreams = atoi(v);
self.sctp.max_num_of_istreams = atoi(v);
} else if (!strcmp(sctp_key, "max_attempts")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.sockopt.sctp.max_attempts = atoi(v);
if (v) self.sctp.max_attempts = atoi(v);
} else if (!strcmp(sctp_key, "max_initial_timeout")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v)
self.sockopt.sctp.max_initial_timeout = atoi(v);
self.sctp.max_initial_timeout = atoi(v);
} else if (!strcmp(sctp_key, "usrsctp_udp_port")) {
const char *v = ogs_yaml_iter_value(&sctp_iter);
if (v) self.usrsctp.udp_port = atoi(v);
@@ -482,13 +530,31 @@ int ogs_app_context_parse_config(void)
if (!strcmp(msg_key, "duration")) {
const char *v = ogs_yaml_iter_value(&msg_iter);
if (v) {
self.time.message.duration =
self.time.message.duration =
ogs_time_from_msec(atoll(v));
regenerate_all_timer_duration();
}
} else
ogs_warn("unknown key `%s`", msg_key);
}
} else if (!strcmp(time_key, "handover")) {
ogs_yaml_iter_t msg_iter;
ogs_yaml_iter_recurse(&time_iter, &msg_iter);
while (ogs_yaml_iter_next(&msg_iter)) {
const char *msg_key =
ogs_yaml_iter_key(&msg_iter);
ogs_assert(msg_key);
if (!strcmp(msg_key, "duration")) {
const char *v = ogs_yaml_iter_value(&msg_iter);
if (v) {
self.time.handover.duration =
ogs_time_from_msec(atoll(v));
}
} else
ogs_warn("unknown key `%s`", msg_key);
}
} else
ogs_warn("unknown key `%s`", time_key);
}

View File

@@ -63,6 +63,8 @@ typedef struct ogs_app_context_s {
int no_ausf;
int no_udm;
int no_pcf;
int no_nssf;
int no_bsf;
int no_udr;
int no_nrf;
@@ -71,13 +73,31 @@ typedef struct ogs_app_context_s {
int no_ipv6;
int prefer_ipv4;
int multicast;
int no_slaac;
int use_openair;
int no_ipv4v6_local_addr_in_packet_filter;
int no_pfcp_rr_select;
} parameter;
ogs_sockopt_t sockopt;
struct {
int no_delay;
int l_onoff;
int l_linger;
} sockopt;
struct {
int heartbit_interval;
int sack_delay;
int rto_initial;
int rto_min;
int rto_max;
int max_num_of_ostreams;
int max_num_of_istreams;
int max_attempts;
int max_initial_timeout;
} sctp;
struct {
int udp_port;
} usrsctp;
@@ -98,17 +118,21 @@ typedef struct ogs_app_context_s {
uint64_t tunnel;
uint64_t nf_service;
uint64_t nf_subscription;
uint64_t sbi_message;
uint64_t csmap;
uint64_t message;
uint64_t event;
uint64_t timer;
uint64_t socket;
uint64_t gtp_xact;
uint64_t gtp_node;
uint64_t pfcp_xact;
uint64_t pfcp_node;
uint64_t impi;
uint64_t impu;
} pool;
struct {
@@ -146,6 +170,12 @@ typedef struct ogs_app_context_s {
ogs_time_t no_heartbeat_duration;
} pfcp;
} message;
struct {
ogs_time_t duration;
ogs_time_t complete_delay;
} handover;
} time;
} ogs_app_context_t;

View File

@@ -4,447 +4,72 @@
*/
#include <asn_internal.h>
#include <ANY.h>
#include <errno.h>
asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
sizeof(ANY_t),
offsetof(ANY_t, _asn_ctx),
ASN_OSUBV_ANY
sizeof(ANY_t),
offsetof(ANY_t, _asn_ctx),
ASN_OSUBV_ANY
};
asn_TYPE_operation_t asn_OP_ANY = {
OCTET_STRING_free,
OCTET_STRING_print,
OCTET_STRING_compare,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
ANY_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0,
0,
OCTET_STRING_free,
#if !defined(ASN_DISABLE_PRINT_SUPPORT)
OCTET_STRING_print,
#else
0,
0,
#endif /* ASN_DISABLE_OER_SUPPORT */
#ifdef ASN_DISABLE_PER_SUPPORT
0, 0, 0, 0,
0,
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
OCTET_STRING_compare,
#if !defined(ASN_DISABLE_BER_SUPPORT)
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
#else
ANY_decode_uper,
ANY_encode_uper,
ANY_decode_aper,
ANY_encode_aper,
#endif /* ASN_DISABLE_PER_SUPPORT */
0, /* Random fill is not defined for ANY type */
0 /* Use generic outmost tag fetcher */
0,
0,
#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
#if !defined(ASN_DISABLE_XER_SUPPORT)
OCTET_STRING_decode_xer_hex,
ANY_encode_xer,
#else
0,
0,
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
#if !defined(ASN_DISABLE_OER_SUPPORT)
0,
0,
#else
0,
0,
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
#if !defined(ASN_DISABLE_UPER_SUPPORT)
ANY_decode_uper,
ANY_encode_uper,
#else
0,
0,
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
#if !defined(ASN_DISABLE_APER_SUPPORT)
ANY_decode_aper,
ANY_encode_aper,
#else
0,
0,
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
0, /* Random fill is not defined for ANY type */
0 /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_ANY = {
"ANY",
"ANY",
&asn_OP_ANY,
0, 0, 0, 0,
{ 0, 0, asn_generic_no_constraint }, /* No constraints */
0, 0, /* No members */
&asn_SPC_ANY_specs,
"ANY",
"ANY",
&asn_OP_ANY,
0, 0, 0, 0,
{
#if !defined(ASN_DISABLE_OER_SUPPORT)
0,
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
0,
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
asn_generic_no_constraint
}, /* No constraints */
0, 0, /* No members */
&asn_SPC_ANY_specs,
};
#undef RETURN
#define RETURN(_code) \
do { \
asn_dec_rval_t tmprval; \
tmprval.code = _code; \
tmprval.consumed = consumed_myself; \
return tmprval; \
} while(0)
asn_enc_rval_t
ANY_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) {
if(flags & XER_F_CANONICAL) {
/*
* Canonical XER-encoding of ANY type is not supported.
*/
ASN__ENCODE_FAILED;
}
/* Dump as binary */
return OCTET_STRING_encode_xer(td, sptr, ilevel, flags, cb, app_key);
}
struct _callback_arg {
uint8_t *buffer;
size_t offset;
size_t size;
};
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 = {0,0,0};
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
arg.offset = arg.size = 0;
arg.buffer = 0;
erval = der_encode(td, sptr, ANY__consume_bytes, &arg);
if(erval.encoded == -1) {
if(arg.buffer) FREEMEM(arg.buffer);
return -1;
}
assert((size_t)erval.encoded == arg.offset);
if(st->buf) FREEMEM(st->buf);
st->buf = arg.buffer;
st->size = arg.offset;
return 0;
}
int
ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
uint8_t *buffer = NULL;
ssize_t erval;
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
erval = aper_encode_to_new_buffer(td, td->encoding_constraints.per_constraints, sptr, (void**)&buffer);
if(erval == -1) {
if(buffer) FREEMEM(buffer);
return -1;
}
assert((size_t)erval > 0);
if(st->buf) FREEMEM(st->buf);
st->buf = buffer;
st->size = erval;
return 0;
}
ANY_t *
ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
ANY_t *
ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType_aper(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
int
ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = ber_decode(0, td, (void **)&newst, st->buf, st->size);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
int
ANY_to_type_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = aper_decode(0, td, (void **)&newst, st->buf, st->size, 0, 0);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
static int ANY__consume_bytes(const void *buffer, size_t size, void *key) {
struct _callback_arg *arg = (struct _callback_arg *)key;
if((arg->offset + size) >= arg->size) {
size_t nsize = (arg->size ? arg->size << 2 : 16) + size;
void *p = REALLOC(arg->buffer, nsize);
if(!p) return -1;
arg->buffer = (uint8_t *)p;
arg->size = nsize;
}
memcpy(arg->buffer + arg->offset, buffer, size);
arg->offset += size;
assert(arg->offset < arg->size);
return 0;
}
#ifndef ASN_DISABLE_PER_SUPPORT
asn_dec_rval_t
ANY_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) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("UPER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = uper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = uper_put_length(po, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}
asn_dec_rval_t
ANY_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) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("APER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = aper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = uper_put_length(po, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}
#endif /* ASN_DISABLE_PER_SUPPORT */

View File

@@ -22,23 +22,34 @@ extern asn_TYPE_descriptor_t asn_DEF_ANY;
extern asn_TYPE_operation_t asn_OP_ANY;
extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
asn_struct_free_f ANY_free;
asn_struct_print_f ANY_print;
ber_type_decoder_f ANY_decode_ber;
der_type_encoder_f ANY_encode_der;
#define ANY_free OCTET_STRING_free
#if !defined(ASN_DISABLE_PRINT_SUPPORT)
#define ANY_print OCTET_STRING_print
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
#define ANY_compare OCTET_STRING_compare
#define ANY_constraint asn_generic_no_constraint
#if !defined(ASN_DISABLE_BER_SUPPORT)
#define ANY_decode_ber OCTET_STRING_decode_ber
#define ANY_encode_der OCTET_STRING_encode_der
#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
#if !defined(ASN_DISABLE_XER_SUPPORT)
#define ANY_decode_xer OCTET_STRING_decode_xer_hex
xer_type_encoder_f ANY_encode_xer;
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
#if !defined(ASN_DISABLE_UPER_SUPPORT)
per_type_decoder_f ANY_decode_uper;
per_type_encoder_f ANY_encode_uper;
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
#if !defined(ASN_DISABLE_APER_SUPPORT)
per_type_decoder_f ANY_decode_aper;
per_type_encoder_f ANY_encode_aper;
#define ANY_free OCTET_STRING_free
#define ANY_print OCTET_STRING_print
#define ANY_compare OCTET_STRING_compare
#define ANY_constraint asn_generic_no_constraint
#define ANY_decode_ber OCTET_STRING_decode_ber
#define ANY_encode_der OCTET_STRING_encode_der
#define ANY_decode_xer OCTET_STRING_decode_xer_hex
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
/******************************
* Handy conversion routines. *
@@ -46,13 +57,17 @@ per_type_encoder_f ANY_encode_aper;
/* Convert another ASN.1 type into the ANY. This implies DER encoding. */
int ANY_fromType(ANY_t *, asn_TYPE_descriptor_t *td, void *struct_ptr);
int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr);
ANY_t *ANY_new_fromType(asn_TYPE_descriptor_t *td, void *struct_ptr);
#if !defined(ASN_DISABLE_APER_SUPPORT)
int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr);
ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr);
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
/* Convert the contents of the ANY type into the specified type. */
int ANY_to_type(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
#if !defined(ASN_DISABLE_APER_SUPPORT)
int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
#define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size))
#define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \

190
lib/asn1c/common/ANY_aper.c Normal file
View File

@@ -0,0 +1,190 @@
/*
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <ANY.h>
#include <errno.h>
#undef RETURN
#define RETURN(_code) \
do { \
asn_dec_rval_t tmprval; \
tmprval.code = _code; \
tmprval.consumed = consumed_myself; \
return tmprval; \
} while(0)
int
ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
uint8_t *buffer = NULL;
ssize_t erval;
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
erval = aper_encode_to_new_buffer(td, td->encoding_constraints.per_constraints, sptr, (void**)&buffer);
if(erval == -1) {
if(buffer) FREEMEM(buffer);
return -1;
}
assert((size_t)erval > 0);
if(st->buf) FREEMEM(st->buf);
st->buf = buffer;
st->size = erval;
return 0;
}
ANY_t *
ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType_aper(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
int
ANY_to_type_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = aper_decode(0, td, (void **)&newst, st->buf, st->size, 0, 0);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
asn_dec_rval_t
ANY_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) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("APER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = aper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = aper_put_length(po, -1, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && aper_put_length(po, -1, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}

Some files were not shown because too many files have changed in this diff Show More