Neels Hofmeyr | 73a6803 | 2020-06-11 02:53:48 +0200 | [diff] [blame^] | 1 | == MSC Pooling |
| 2 | |
| 3 | MSC pooling is described in 3GPP TS 23.236 <<3gpp-ts-23-236>>, and is supported |
| 4 | by OsmoBSC since mid 2020. |
| 5 | |
| 6 | The aim of MSC pooling is to distribute load from a BSC across multiple MSCs, |
| 7 | which are equivalent and redundant infrastructure for the same core network. |
| 8 | |
| 9 | The main mechanism for MSC pooling is the TMSI identity, which an MSC hands out |
| 10 | to its attached subscribers. Typically 10 bits of the TMSI are designated as a |
| 11 | Network Resource Identifier (NRI) that identifies the originating MSC, and |
| 12 | allows OsmoBSC to direct a subscriber back to the same MSC instance that |
| 13 | previously negotiated the IMSI Attach procedure. Typically, the full NRI value |
| 14 | range available is divided into N even ranges, where each MSC is assigned one |
| 15 | NRI range. |
| 16 | |
| 17 | Subscribers attaching without a TMSI identity, or those with unknown NRI value, |
| 18 | are evenly distributed across MSC instances. OsmoBSC uses a round-robin |
| 19 | approach to distribute load across all connected MSCs. |
| 20 | |
| 21 | A Paging Response from a subscriber is always returned back to whichever MSC |
| 22 | initiated the Paging, regardless of the Mobile Identity used. |
| 23 | |
| 24 | Finally, a NULL-NRI is a special NRI value that indicates that the MSC wishes |
| 25 | to offload this subscriber to a different MSC. A NULL-NRI is an arbitrary NRI |
| 26 | value that is chosen distinctly for each PLMN served by a BSC, so that a |
| 27 | subscriber can be reassigned within that PLMN. Upon (periodic) Location |
| 28 | Updating, an offloading MSC hands out a NULL-NRI value in the assigned TMSI, |
| 29 | along with a non-broadcast LAI. The subscriber will notice the LAI mismatch, |
| 30 | and immediately re-attempt the attach using the TMSI containing the NULL-NRI. |
| 31 | The BSC recognises the NULL-NRI and redirects the subscriber to one of the |
| 32 | other MSCs. A prerequisite for this to work well is that the particular MSC is |
| 33 | previously marked as not accepting new subscribers, in the BSC's configuration. |
| 34 | |
| 35 | The mechanisms described above make up the NAS node selection function |
| 36 | implemented in the BSC. |
| 37 | |
| 38 | 3GPP TS 23.236 also defines that an offloading MSC hands subscriber information |
| 39 | to the newly assigned MSC, which takes place outside the scope of the BSC. |
| 40 | |
| 41 | === Configuring MSC Pooling |
| 42 | |
| 43 | The NRI ranges assigned to each MSC must match in the BSC and the MSC |
| 44 | configuration. If MSC and BSC had inconsistent NRI value ranges configured, |
| 45 | attached subscribers would be redirected MSC instances that did not perform the |
| 46 | attach, possibly rendering the core network unusable. |
| 47 | |
| 48 | ==== Connecting Multiple MSCs |
| 49 | |
| 50 | The `cs7 instance` configuration defines the SCCP addresses to reach the MSCs |
| 51 | at. In addition, each MSC is configured by its own `msc` section in the |
| 52 | configuration. An example osmo-bsc.cfg serving three MSCs: |
| 53 | |
| 54 | ---- |
| 55 | cs7 instance 0 |
| 56 | # SCCP address book entries for the three MSCs |
| 57 | sccp-address my-msc-0 |
| 58 | point-code 0.23.0 |
| 59 | sccp-address my-msc-1 |
| 60 | point-code 0.23.1 |
| 61 | sccp-address my-msc-2 |
| 62 | point-code 0.23.2 |
| 63 | |
| 64 | # assign each MSC configuration its remote SCCP address |
| 65 | msc 0 |
| 66 | msc-addr my-msc-0 |
| 67 | msc 1 |
| 68 | msc-addr my-msc-1 |
| 69 | msc 2 |
| 70 | msc-addr my-msc-2 |
| 71 | |
| 72 | # configure NRI value ranges |
| 73 | network |
| 74 | nri bitlen 10 |
| 75 | nri null add 0 |
| 76 | msc 0 |
| 77 | nri add 1 341 |
| 78 | msc 1 |
| 79 | nri add 342 682 |
| 80 | msc 2 |
| 81 | nri add 683 1023 |
| 82 | ---- |
| 83 | |
| 84 | ==== NRI Value Bit Length |
| 85 | |
| 86 | In OsmoBSC, the NRI value's bit length is freely configurable from 1 to 15 |
| 87 | bits. 3GPP TS 23.236 suggests a typical bit length of 10, which is OsmoBSC's |
| 88 | default. The NRI bit length must be identical across the entire MSC pool. |
| 89 | |
| 90 | Change the NRI value bit length in OsmoBSC's VTY configuration like this: |
| 91 | |
| 92 | ---- |
| 93 | network |
| 94 | nri bitlen 10 |
| 95 | ---- |
| 96 | |
| 97 | In the TMSI bits, regardless of the NRI bit length, the NRI value always starts |
| 98 | just after the most significant octet of a TMSI (most significant bit at TMSI's |
| 99 | bit 23). |
| 100 | |
| 101 | ==== NULL-NRI |
| 102 | |
| 103 | Since OsmoBSC supports serving only one PLMN, NULL-NRI are configured globally. |
| 104 | Even though 3GPP TS 23.236 indicates that there is a single NULL-NRI per PLMN, |
| 105 | OsmoBSC allows configuring multiple NULL-NRI values. |
| 106 | |
| 107 | ---- |
| 108 | network |
| 109 | nri null add 0 |
| 110 | nri null add 423 |
| 111 | ---- |
| 112 | |
| 113 | ==== Assigning NRI Ranges to MSCs |
| 114 | |
| 115 | Each MSC configured in OsmoBSC must be assigned a distinct NRI value range. |
| 116 | Overlapping NRI value ranges will cause failure to serve subscribers. |
| 117 | |
| 118 | NRI values are typically configured in ranges, here dividing a 10bit range |
| 119 | (0..1023) into three equal ranges, while leaving 0 available to be configured |
| 120 | as NULL-NRI: |
| 121 | |
| 122 | ---- |
| 123 | msc 0 |
| 124 | nri add 1 341 |
| 125 | msc 1 |
| 126 | nri add 342 684 |
| 127 | msc 2 |
| 128 | nri add 685 1023 |
| 129 | ---- |
| 130 | |
| 131 | NRI can also be assigned in single values: |
| 132 | |
| 133 | ---- |
| 134 | msc 0 |
| 135 | nri add 23 |
| 136 | ---- |
| 137 | |
| 138 | Ranges can be constructed arbitrarily by a sequence of `add` and `del` |
| 139 | configurations, here a contrived example: |
| 140 | |
| 141 | ---- |
| 142 | msc 0 |
| 143 | nri add 0 342 |
| 144 | nri del 23 |
| 145 | nri del 42 235 |
| 146 | nri add 1000 1023 |
| 147 | ---- |
| 148 | |
| 149 | To view the current NRI config in a running OsmoBSC instance, use the |
| 150 | `show nri` command, here showing the result of the contrived example: |
| 151 | |
| 152 | ---- |
| 153 | OsmoBSC(config-msc)# show nri |
| 154 | msc 0 |
| 155 | nri add 0 22 |
| 156 | nri add 24 41 |
| 157 | nri add 236 342 |
| 158 | nri add 1000 1023 |
| 159 | ---- |
| 160 | |
| 161 | On the VIEW and ENABLE VTY nodes, `show nri` shows all MSCs: |
| 162 | |
| 163 | ---- |
| 164 | OsmoBSC> show nri |
| 165 | msc 0 |
| 166 | nri add 1 341 |
| 167 | msc 1 |
| 168 | nri add 342 684 |
| 169 | msc 2 |
| 170 | nri add 685 1023 |
| 171 | ---- |
| 172 | |
| 173 | When configuring overlapping NRI value ranges across MSCs, the telnet VTY warns |
| 174 | about it, and starting OsmoBSC with such a configuration will fail: |
| 175 | |
| 176 | ---- |
| 177 | msc 0 |
| 178 | nri add 1 511 |
| 179 | msc 1 |
| 180 | nri add 512 1023 |
| 181 | msc 2 |
| 182 | nri add 500 555 |
| 183 | ---- |
| 184 | |
| 185 | This results in: |
| 186 | |
| 187 | ---- |
| 188 | $ osmo-bsc |
| 189 | DMSC ERROR msc 2: NRI range [500..555] overlaps between msc 2 and msc 0. For overlaps, msc 0 has higher priority than msc 2 |
| 190 | DMSC ERROR msc 2: NRI range [500..555] overlaps between msc 2 and msc 1. For overlaps, msc 1 has higher priority than msc 2 |
| 191 | ---- |
| 192 | |
| 193 | ==== MSC Offloading |
| 194 | |
| 195 | To effectively offload a particular MSC, it must be marked as no longer taking |
| 196 | new subscribers in OsmoBSC. This can be achieved in the telnet VTY by: |
| 197 | |
| 198 | ---- |
| 199 | msc 0 |
| 200 | no allow-attach |
| 201 | ---- |
| 202 | |
| 203 | This MSC will, as long as it is connected, continue to serve subscribers |
| 204 | already attached to it: those that yield an NRI matching this MSC, and those |
| 205 | that are being paged by this MSC. But OsmoBSC will no longer direct new |
| 206 | subscribers to this MSC. |
| 207 | |
| 208 | To re-enable an MSC for attaching new subscribers: |
| 209 | |
| 210 | ---- |
| 211 | msc 0 |
| 212 | allow-attach |
| 213 | ---- |