Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 1 | [[chapter_overview]] |
| 2 | == Overview |
| 3 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 4 | IMPORTANT: If you have used an earlier version of OsmoGbProxy please note |
| 5 | that support for various features such as PLMN/APN patching, support for a |
| 6 | secondary SGSN has been removed. |
| 7 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 8 | === About OsmoGbProxy |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 9 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 10 | OsmoGbProxy is the Osmocom proxy for the 3GPP Gb interface. The Gb |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 11 | interface is defined by 3GPP as the protocol between the BSS and the |
| 12 | SGSN inside the 2G/2.5G/2.75G packet switched network domain. |
| 13 | |
| 14 | As Osmocom implements a BTS-colocated PCU, there are potentially many |
| 15 | Gb interface connections between all those many PCUs in the network |
| 16 | and the SGSN. This can be cumbersome to configure/maintain at the |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 17 | SGSN side. |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 18 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 19 | OsmoGbProxy aggregates many PCU-facing Gb connections into one Gb |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 20 | connection to the SGSN. This is achieved by |
| 21 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 22 | * maintaining separate NS-VCs on the PCU side and on the SGSN side |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 23 | * more or less transparently routing BSSGP peer-to-peer Virtual Circuits |
| 24 | (BVCs) through the proxy |
| 25 | * having some special handling for the signaling BVC (BVCI=0) which is |
| 26 | shared among all the PCUs connected to the proxy |
| 27 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 28 | |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 29 | === Data Model |
| 30 | |
| 31 | ==== gbproxy_config |
| 32 | |
Daniel Willmann | 376aa9e | 2020-09-24 20:23:34 +0200 | [diff] [blame] | 33 | This contains the parsed configuration of the OsmoGbProxy. |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 34 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 35 | ==== gbproxy_nse |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 36 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 37 | The remote NS-entity that the proxy interacts with. Includes |
| 38 | information about: |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 39 | |
| 40 | * the [unique] NSEI of the peer |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 41 | * the Routeing Area (RA) of the peer |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 42 | * which side this NSE is facing - SGSN or BSS |
| 43 | * the list of BVCs in this NSE |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 44 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 45 | ==== gbproxy_bvc |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 46 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 47 | A ptp-BVC on an NSE |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 48 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 49 | * the BVCI of this BVC |
| 50 | * the routing area of this BVC |
| 51 | * the BVC state machine |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 52 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 53 | ==== gbproxy_cell |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 54 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 55 | This contains a view of the cell and its associated BVCs |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 56 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 57 | * the unique BVCI of this cell |
| 58 | * the routing area of this cell |
| 59 | * one bss-side BVC |
| 60 | * one BVC per SGSN in the pool |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 61 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 62 | ==== gbproxy_sgsn |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 63 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 64 | Represents one SGSN in the pool. Contains: |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 65 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 66 | * the NSE belonging to this SGSN |
| 67 | * a (configurable) name of the SGSN |
| 68 | * pool-related configuration of the SGSNs |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 69 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 70 | ==== IMSI cache |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 71 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 72 | In order to route messages to the correct BSS or SGSN OsmoGbProxy |
| 73 | sometimes needs to cache where messages came from. |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 74 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 75 | In BSS->SGSN direction the IMSI-cache is needed for |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 76 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 77 | * paging ps reject |
| 78 | * dummy paging response |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 79 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 80 | when SGSN-pooling is enabled and multiple SGSNs are configured. The IMSI |
| 81 | contained in a paging ps or dummy paging message is cached together with |
| 82 | the originating SGSN/NSE. The answer, which also contains the IMSI, is |
| 83 | then routed back to the original SGSN. |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 84 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 85 | ==== TLLI cache |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 86 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 87 | In SGSN->BSS direction OsmoGbProxy needs a TLLI cache to correctly route the |
| 88 | following messages: |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 89 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 90 | * suspend ack/nack |
| 91 | * resume ack/nack |
Harald Welte | a5ad7a4 | 2019-03-21 22:52:44 +0100 | [diff] [blame] | 92 | |
Daniel Willmann | 7061bed | 2021-01-25 17:54:08 +0100 | [diff] [blame] | 93 | Suspend/resume are sent over the signalling BVC to the SGSN. OsmoGbProxy saves |
| 94 | the TLLI->NSE association in the TLLI cache and routes the ack/nack back to |
| 95 | the signalling BVC of the originating NSE. |