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