Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 1 | [[chapter_overview]] |
| 2 | == Overview |
| 3 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 4 | === About OsmoGbProxy |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 5 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 6 | OsmoGbProxy is the Osmocom proxy for the 3GPP Gb interface. The Gb |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 7 | interface is defined by 3GPP as the protocol between the BSS and the |
| 8 | SGSN inside the 2G/2.5G/2.75G packet switched network domain. |
| 9 | |
| 10 | As Osmocom implements a BTS-colocated PCU, there are potentially many |
| 11 | Gb interface connections between all those many PCUs in the network |
| 12 | and the SGSN. This can be cumbersome to configure/maintain at the |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 13 | SGSN side. |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 14 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 15 | OsmoGbProxy aggregates many PCU-facing Gb connections into one Gb |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 16 | connection to the SGSN. This is achieved by |
| 17 | |
| 18 | * maintaining sepaate NS-VCs on the PCU side and on the SGSN side |
| 19 | * more or less transparently routing BSSGP peer-to-peer Virtual Circuits |
| 20 | (BVCs) through the proxy |
| 21 | * having some special handling for the signaling BVC (BVCI=0) which is |
| 22 | shared among all the PCUs connected to the proxy |
| 23 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 24 | |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 25 | === Data Model |
| 26 | |
| 27 | ==== gbproxy_config |
| 28 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 29 | This contains the parsed configuration of the OsmoGbProxy. |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 30 | |
| 31 | ==== gproxy_peer |
| 32 | |
| 33 | A "peer" is any remote NS-entity that the proxy interacts with. A peer |
| 34 | includes information about: |
| 35 | |
| 36 | * the [unique] NSEI of the peer |
| 37 | * the [unique] BVCI of the peer |
| 38 | * the Routeing Area (RA) of the peer |
| 39 | |
| 40 | ==== gbproxy_tlli_state |
| 41 | |
| 42 | One of the (unique) TLLI of any of the subscribers/UEs attached to any of |
| 43 | the BTSs/PCUs served by the proxy. |
| 44 | |
| 45 | ==== gbproxy_link_info |
| 46 | |
| 47 | One of the [unique] subscribers/connections that are served through this |
| 48 | proxy. The information includes |
| 49 | |
| 50 | * the TLLI on BSS side |
| 51 | * the TLLI on SGSN side (may be different due to P-TMSI rewriting) |
| 52 | * the NSEI of the SGSN for this link |
| 53 | * a timestamp when we last conversed with this subscriber |
| 54 | * state related to IMSI acquisition |
| 55 | ** a temporary queue of stored messages (until IMSI acquisition succeeds) |
| 56 | ** N(U) rewriting state (inserting IDENTTIY REQ changes LLC sequence numbers) |
| 57 | |
| 58 | ==== gbproxy_match |
| 59 | |
| 60 | A single matching rule against which IMSIs are matched. The matching rule |
| 61 | is expressed as regular expression. There can be one such matching rule for |
| 62 | each |
| 63 | |
| 64 | * routing between two different SGSNs, see below |
| 65 | * patching of messages (e.g. APN, PLMN) |
| 66 | |
| 67 | |
| 68 | === Advanced Features |
| 69 | |
| 70 | ==== PLMN patching |
| 71 | |
| 72 | This feature permits to modify the PLMN inside any BSSGP messages |
| 73 | containing the Routing Area ID (RAID). |
| 74 | |
| 75 | The configured core-mcc and core-mnc will be used towards the SGSN, |
| 76 | irrespective of which MCC/MNC the PCU is using/reporting on Gb. |
| 77 | |
| 78 | ==== APN patching |
| 79 | |
| 80 | This will transparently re-write the APN name inside SM ACTIVATE PDP |
| 81 | REQUEST messages on the way from the MS to the SGSN. The patching is |
| 82 | performed based on matching on the IMSI of the subscriber. |
| 83 | |
| 84 | The configured core-apn will be used towards the SGSN, irrespective |
| 85 | of which APN the MS is requesting in its Layer3 signaling. |
| 86 | |
| 87 | APN patching can only be performed if no GPRS encryption is enabled in |
| 88 | the network! |
| 89 | |
| 90 | APN patching is useful in case a valid APN cannot reliably be |
| 91 | provisioned via other means, such as via the SIM Card, OTA-DM or via |
| 92 | CAMEL rewriting in the SGSN. |
| 93 | |
| 94 | ==== P-TMSI patching |
| 95 | |
| 96 | This feature transparently rewrite the P-TMSI between MS and SGSN. This |
| 97 | is required when using the Secondary SGSN support, as both SGSNs could |
| 98 | allocate overlapping TMSIs and we must make sure they're unique across |
| 99 | both SGSNs. |
| 100 | |
| 101 | P-TMSI patching is required by (and hence automatically enablede if |
| 102 | secondary SGSN support is enabled. |
| 103 | |
| 104 | P-TMSI patching can only be performed if no GPRS encryption is enabled in |
| 105 | the network! |
| 106 | |
| 107 | ==== IMSI Acquisition |
| 108 | |
| 109 | This is a special feature where the proxy will by itself inject GMM IDENTITY |
| 110 | REQUEST messages for the IMSI into the downlink BSSGP traffic in order |
| 111 | to establish the IMSI of subscribers for which it is not otherwise known |
| 112 | |
| 113 | IMSI acquisition is automatically enabled if secondary SGSN support is |
| 114 | enabled. |
| 115 | |
| 116 | ==== Secondary SGSN Support |
| 117 | |
| 118 | This allows the proxy to connect not only to one SGSN, but to two |
| 119 | different SGSNs. IMSI matching rules are applied to determine which of |
| 120 | the SGSNs is to be used for traffic of this subscriber. |
| 121 | |
| 122 | One possible use case of this feature is to have a "local break-out" for |
| 123 | subscribers who are native to this network (and hence save |
| 124 | latencies/overhead of back-hauling all related traffic via the |
| 125 | SGSN+GGSN) while at the same time maintaining the classic behavior for |
| 126 | inbound roaming subscribers, where the roaming agreements mandate that |
| 127 | data traffic is brought back to the GGSN in the HPLMN via the SGSN of |
| 128 | the VPLMN. |