Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 1 | == SGSN Pooling |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 2 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 3 | SGSN pooling is described in 3GPP TS 23.236 <<3gpp-ts-23-236>>, and is supported |
| 4 | by OsmoGbProxy since early 2021. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 5 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 6 | The aim of SGSN pooling is to distribute load from a BSS across multiple SGSNs, |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 7 | which are equivalent and redundant infrastructure for the same core network. |
| 8 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 9 | The main mechanism for SGSN pooling is the TLLI/P-TMSI, which an SGSN hands out |
| 10 | to its attached subscribers. Typically 10 bits of the P-TMSI are designated as a |
| 11 | Network Resource Identifier (NRI) that identifies the originating SGSN, and |
| 12 | allows OsmoGbProxy to direct a subscriber back to the same SGSN instance that |
| 13 | previously negotiated the Attach procedure. Typically, the full NRI value |
| 14 | range available is divided into N even ranges, where each SGSN is assigned one |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 15 | NRI range. |
| 16 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 17 | Subscribers attaching without a TLLI, or those with unknown NRI value, |
| 18 | are evenly distributed across SGSN instances. OsmoGbProxy uses a hash-based |
| 19 | approach to distribute load across all connected SGSNs. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 20 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 21 | A Paging Response from a subscriber is always returned back to whichever SGSN |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 22 | initiated the Paging, regardless of the Mobile Identity used. |
| 23 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 24 | Finally, a NULL-NRI is a special NRI value that indicates that the SGSN wishes |
| 25 | to offload this subscriber to a different SGSN. A NULL-NRI is an arbitrary NRI |
| 26 | value that is chosen distinctly for each PLMN served by a BSS, so that a |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 27 | subscriber can be reassigned within that PLMN. Upon (periodic) Location |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 28 | Updating, an offloading SGSN hands out a NULL-NRI value in the assigned TLLI, |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 29 | along with a non-broadcast LAI. The subscriber will notice the LAI mismatch, |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 30 | and immediately re-attempt the attach using the TLLI containing the NULL-NRI. |
| 31 | OsmoGbProxy recognises the NULL-NRI and redirects the subscriber to one of the |
| 32 | other SGSNs. A prerequisite for this to work well is that the particular SGSN is |
| 33 | previously marked as not accepting new subscribers, in OsmoGbProxy's configuration. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 34 | |
| 35 | The mechanisms described above make up the NAS node selection function |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 36 | implemented in OsmoGbProxy. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 37 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 38 | 3GPP TS 23.236 also defines that an offloading SGSN hands subscriber information |
| 39 | to the newly assigned SGSN, which takes place outside the scope of OsmoGbProxy. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 40 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 41 | === Configuring SGSN Pooling |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 42 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 43 | The NRI ranges assigned to each SGSN must match in the OsmoGbProxy and the SGSN |
| 44 | configuration. If inconsistent NRI value ranges are configured, |
| 45 | attached subscribers would be redirected to SGSN instances that did not perform the |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 46 | attach, possibly rendering the core network unusable. |
| 47 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 48 | ==== Connecting Multiple SGSNs |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 49 | |
| 50 | ---- |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 51 | ! Configure the Network Service |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 52 | ns |
| 53 | bind udp sgsn |
| 54 | listen 10.0.0.1 23000 |
| 55 | nse 1 |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 56 | ip-sns-bind sgsn |
| 57 | ip-sns-remote 10.0.1.1 23000 |
| 58 | ip-sns-remote 10.0.1.1 23001 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 59 | nse 2 |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 60 | ip-sns-bind sgsn |
| 61 | ip-sns-remote 10.0.1.2 23000 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 62 | nse 3 |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 63 | ip-sns-bind sgsn |
| 64 | ip-sns-remote 10.0.1.3 23000 |
| 65 | ! configure NRI value ranges |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 66 | gbproxy |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 67 | nri bitlen 10 |
| 68 | nri null add 0 |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 69 | sgsn nsei 1 |
| 70 | name SGSN01 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 71 | nri add 1 341 |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 72 | sgsn nsei 2 |
| 73 | name SGSN02 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 74 | nri add 342 682 |
Daniel Willmann | 5b75f85 | 2021-04-22 16:01:53 +0200 | [diff] [blame] | 75 | sgsn nsei 3 |
| 76 | name SGSN03 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 77 | nri add 683 1023 |
| 78 | ---- |
| 79 | |
| 80 | ==== NRI Value Bit Length |
| 81 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 82 | In OsmGbProxy, the NRI value's bit length is freely configurable from 0 to 15 |
| 83 | bits. 3GPP TS 23.236 suggests a typical bit length of 10. Setting the length |
| 84 | to 0 disables SGSN pooling, this is also the default. |
| 85 | The NRI bit length must be identical across the entire SGSN pool. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 86 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 87 | Change the NRI value bit length in OsmoGbProxy's VTY configuration like this: |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 88 | |
| 89 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 90 | gbproxy |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 91 | nri bitlen 10 |
| 92 | ---- |
| 93 | |
| 94 | In the TMSI bits, regardless of the NRI bit length, the NRI value always starts |
| 95 | just after the most significant octet of a TMSI (most significant bit at TMSI's |
| 96 | bit 23). |
| 97 | |
| 98 | ==== NULL-NRI |
| 99 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 100 | Since OsmoGbProxy supports serving only one PLMN, NULL-NRI are configured globally. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 101 | Even though 3GPP TS 23.236 indicates that there is a single NULL-NRI per PLMN, |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 102 | OsmoGbProxy allows configuring multiple NULL-NRI values. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 103 | |
| 104 | ---- |
| 105 | network |
| 106 | nri null add 0 |
| 107 | nri null add 423 |
| 108 | ---- |
| 109 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 110 | ==== Assigning NRI Ranges to SGSNs |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 111 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 112 | Each SGSN configured in OsmoGbProxy must be assigned a distinct NRI value range. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 113 | Overlapping NRI value ranges will cause failure to serve subscribers. |
| 114 | |
| 115 | NRI values are typically configured in ranges, here dividing a 10bit range |
| 116 | (0..1023) into three equal ranges, while leaving 0 available to be configured |
| 117 | as NULL-NRI: |
| 118 | |
| 119 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 120 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 121 | nri add 1 341 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 122 | sgsn nsei 2 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 123 | nri add 342 684 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 124 | sgsn nsei 3 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 125 | nri add 685 1023 |
| 126 | ---- |
| 127 | |
| 128 | NRI can also be assigned in single values: |
| 129 | |
| 130 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 131 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 132 | nri add 23 |
| 133 | ---- |
| 134 | |
| 135 | Ranges can be constructed arbitrarily by a sequence of `add` and `del` |
| 136 | configurations, here a contrived example: |
| 137 | |
| 138 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 139 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 140 | nri add 0 342 |
| 141 | nri del 23 |
| 142 | nri del 42 235 |
| 143 | nri add 1000 1023 |
| 144 | ---- |
| 145 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 146 | On the VIEW and ENABLE VTY nodes, `show nri all` shows all SGSNs: |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 147 | |
| 148 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 149 | OsmoGbProxy> show nri all |
| 150 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 151 | nri add 1 341 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 152 | sgsn nsei 2 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 153 | nri add 342 684 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 154 | sgsn nsei 3 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 155 | nri add 685 1023 |
| 156 | ---- |
| 157 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 158 | When configuring overlapping NRI value ranges across SGSNs, the telnet VTY warns |
| 159 | about it, and starting OsmoGbProxy with such a configuration will fail: |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 160 | |
| 161 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 162 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 163 | nri add 1 511 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 164 | sgsn nsei 2 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 165 | nri add 512 1023 |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 166 | sgsn nsei 3 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 167 | nri add 500 555 |
| 168 | ---- |
| 169 | |
| 170 | This results in: |
| 171 | |
| 172 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 173 | $ osmo-gbproxy |
| 174 | % Warning: NSE(00003/SGSN): NRI range [500..555] overlaps between NSE 00003 and NSE 00001. For overlaps, NSE 00001 has higher priority than NSE 00003 |
| 175 | % Warning: NSE(00003/SGSN): NRI range [500..555] overlaps between NSE 00003 and NSE 00002. For overlaps, NSE 00002 has higher priority than NSE 00003 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 176 | ---- |
| 177 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 178 | ==== SGSN Offloading |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 179 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 180 | To effectively offload a particular SGSN, it must be marked as no longer taking |
| 181 | new subscribers in OsmoGbProxy. This can be achieved in the telnet VTY by: |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 182 | |
| 183 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 184 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 185 | no allow-attach |
| 186 | ---- |
| 187 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 188 | This SGSN will, as long as it is connected, continue to serve subscribers |
| 189 | already attached to it: those that yield an NRI matching this SGSN, and those |
| 190 | that are being paged by this SGSN. But OsmoGbProxy will no longer direct new |
| 191 | subscribers to this SGSN. |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 192 | |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 193 | To re-enable an SGSN for attaching new subscribers: |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 194 | |
| 195 | ---- |
Daniel Willmann | ae303b4 | 2021-01-27 19:24:41 +0100 | [diff] [blame] | 196 | sgsn nsei 1 |
Daniel Willmann | 22248f3 | 2021-01-27 18:34:02 +0100 | [diff] [blame] | 197 | allow-attach |
| 198 | ---- |
Daniel Willmann | 852ebad | 2021-01-27 19:32:33 +0100 | [diff] [blame] | 199 | |
| 200 | ==== Traffic allocation |
| 201 | |
| 202 | In a SGSN pool, osmo-gbproxy is facing the problem of dividing the downlink |
| 203 | capacity of a cell towards the SGSN. The BSS advertises the per-BVC capacity |
| 204 | by means of the BSSGP FLOW-CONTROL-BVC messages, but as there are multiple |
| 205 | SGSN in a pool, they all have to share / divide that total capacity. |
| 206 | |
| 207 | By default, osmo-gbproxy advertises the full capacity to _each_ of the SGSN |
| 208 | pool members, which results in significant over-provisioning and can lead to |
| 209 | overload situations. |
| 210 | |
| 211 | The administrator can configure the _percentage_ of the overall BSS-advertised |
| 212 | capacity that shall be reported to each pool member SGSN using the |
| 213 | `pool bvc-flow-control-ratio <1-100>` configuration command. |
| 214 | |
| 215 | A setting of 100 means that each pool member is informed of 100% of the |
| 216 | BSS side capacity. |
| 217 | |
| 218 | A setting of 25 means that each pool member is informed of 25% of the |
| 219 | BSS side capacity. This would make most sense in a set-up with four |
| 220 | SGSN of equal share. |
| 221 | |
| 222 | More complex capacity division schemes are so far not supported by |
| 223 | osmo-gbproxy. |