Project

General

Profile

OsmoNITB Migration Guide » History » Version 25

laforge, 12/01/2020 08:28 AM

1 3 neels
{{>toc}}
2
3 1 neels
h1. OsmoNITB Migration Guide
4
5 20 neels
Historically, Osmocom offered the [[OsmoNITB:]] "Network-In-The-Box" as an actual single program. It was a useful simplification at the time, but in 2017, Osmocom have decided to split OsmoNITB into programs more closely resembling traditional network architecture. It is recommended to use the new separate components instead of the OsmoNITB, since active development focus has moved there, but see also the [[OsmoNITB Migration Guide#Pros_and_Cons|Pros and Cons]].
6 2 neels
7
Creating a new Network In The Box from scratch is described at [[Osmocom Network In The Box]], please refer to that page to complement the descriptions found here.
8
9
This page aims at describing the steps necessary to move from a working operation of osmo-nitb to the new split components.
10
11 19 neels
h1. Pros and Cons
12
13
Features currently *not* present in the new split components:
14
15
* In osmo-nitb we could easily log/query which BTS and which timeslot a subscriber was served on. Now you need to ask (each) BSC for that and correlate phone number to TMSI manually. We may want to add Osmocom-specific TLVs to the A interface in order to communicate that information to OsmoMSC and re-enable the old feature set. Related:
16
17
* We currently cannot provide Osmocom specific TLVs in SMPP messages, which used to provide information only available on the BSC layer. https://osmocom.org/issues/2390
18
19
Things you *get* from the split repositories:
20
21
* Same subscriber database for CS and PS (OsmoHLR).
22
* No blocking of the core network while accessing the db = more scalable.
23
* Support for 3G.
24
* Support for Milenage (UMTS authentication).
25
* Support of a true A interface between BSC and MSC.
26
* You're set up for the future: new development focuses here, hardly any effort will be spent on OsmoNITB (without explicit requests and funding).
27
28 15 neels
h1. Components
29
30
The OsmoNITB combined the BSC, MSC+VLR, HLR and MGW. In the new setup, SCCP/M3UA is spoken between BSC, MSC and SGSN, and OsmoSTP is used to route messages between them. On a system where OsmoNITB is installed, to replace it, you need to install these components:
31
32
<pre>apt-get install osmo-bsc osmo-stp osmo-bsc-mgcp osmo-mgw osmo-hlr</pre>
33
34
*NOTE: at the time of writing, you need to use osmo-bsc-mgcp, but this should move to osmo-mgw in a matter of weeks.*
35
36 2 neels
h1. Subscriber Database
37
38 4 neels
With OsmoHLR comes *@osmo-hlr-db-tool@*, which is capable of importing the most important subscriber data from a database that was used with OsmoNITB.
39
40 5 neels
In a standard installation, the osmo-nitb database should be found at @/var/lib/osmocom/hlr.sqlite3@, and the osmo-hlr database is expected at @/var/lib/osmocom/hlr.db@. Hence the migration command becomes:
41
42 1 neels
<pre>
43 14 lynxis
osmo-hlr-db-tool --database /var/lib/osmocom/hlr.db import-nitb-db /var/lib/osmocom/hlr.sqlite3
44 4 neels
</pre>
45
46 8 neels
If no @--database@ is passed, @./hlr.db@ is assumed.
47 1 neels
If the target @hlr.db@ does not exist yet, it is created.
48 8 neels
49
You may repeat / combine imports to the same @hlr.db@; any subscribers that already exist will be skipped with an error message. It is possible to do an import while osmo-hlr is actively using the database, but that is not recommended.
50
51
Take care that the resulting hlr.db has the proper read and write permissions by the user that will run OsmoHLR. Probably, the same ownership and permissions that the previous OsmoNITB database had is the correct choice.
52 4 neels
53 13 neels
Note that not all information is copied to the hlr.db, so far just IMSI, MSISDN and 2G auth tokens are migrated -- check the @osmo-hlr-db-tool@ cmdline help to find out what exactly is migrated at the time you're reading this.
54 5 neels
55
To avoid future confusion, it may be desirable to remove the legacy hlr.sqlite3 from the system (i.e. backup to somewhere else), or rename it to something like @osmo-nitb.db@, so that it is not mistaken for the OsmoHLR database.
56 2 neels
57
h1. Configuration Files
58
59 6 neels
Most of the current OsmoNITB config options still exist, but are now moved to OsmoMSC or OsmoBSC. Few are required in both.
60
61 9 neels
New configuration is available to set up:
62 24 laforge
* the [[GSUP]] connection from OsmoMSC to the OsmoHLR, and
63 9 neels
* the SCCP connection for the A-interface between OsmoBSC and OsmoMSC, established via OsmoSTP.
64 2 neels
65 10 neels
Let's take this standard OsmoNITB configuration and split it up in OsmoBSC and OsmoMSC parts:
66
67
*OsmoNITB config*:
68
<pre>
69 11 neels
# ---------- to OsmoBSC:
70 10 neels
e1_input
71
 e1_line 0 driver ipa
72
 ipa bind 10.42.42.2
73 11 neels
# ---------- to both OsmoBSC and OsmoMSC:
74 10 neels
network
75
 network country code 901
76
 mobile network code 70
77 18 neels
 short name my-nitb
78
 long name my-nitb
79 1 neels
 location updating reject cause 13
80 10 neels
 encryption a5 0
81 18 neels
 # ---------- to OsmoMSC only:
82
 auth policy closed
83 21 neels
 mm info 1
84 18 neels
 # ---------- to OsmoBSC only:
85 10 neels
 neci 1
86
 rrlp mode none
87
 handover 0
88
 handover window rxlev averaging 10
89
 handover window rxqual averaging 1
90
 handover window rxlev neighbor averaging 10
91
 handover power budget interval 6
92
 handover power budget hysteresis 3
93
 handover maximum distance 9999
94
 bts 0
95
  type sysmobts
96
  band GSM-1800
97
  cell_identity 0
98
  location_area_code 23
99
  training_sequence_code 7
100
  base_station_id_code 63
101
  ms max power 33
102
  cell reselection hysteresis 4
103
  rxlev access min 0
104
  channel allocator ascending
105
  rach tx integer 9
106
  rach max transmission 7
107
  ip.access unit_id 1 0
108
  oml ip.access stream_id 255 line 0
109
  gprs mode none
110
  trx 0
111
   rf_locked 0
112
   arfcn 868
113
   nominal power 23
114
   max_power_red 0
115
   rsl e1 tei 0
116
   timeslot 0
117
    phys_chan_config CCCH+SDCCH4
118
   timeslot 1
119
    phys_chan_config SDCCH8
120
   timeslot 2
121
    phys_chan_config TCH/F
122
   timeslot 3
123
    phys_chan_config TCH/F
124
   timeslot 4
125
    phys_chan_config TCH/F
126
   timeslot 5
127
    phys_chan_config TCH/F
128
   timeslot 6
129
    phys_chan_config TCH/F
130
   timeslot 7
131
    phys_chan_config TCH/F
132 11 neels
# ---------- to OsmoMSC:
133 10 neels
smpp
134
 local-tcp-ip 10.42.42.2 2775
135
 system-id test-nitb
136
 policy closed
137 1 neels
</pre>
138
139 11 neels
h2. OsmoBSC config
140
141
To above snippets from the OsmoNITB config, you may want to add a 'cs7 instance' section to configure the SCCP point codes and connection to the OsmoSTP. Note that if omitted, default values apply.
142
143
You also need to add an 'msc' section to tell OsmoBSC where to reach the MSC.
144
145
*additions to OsmoBSC's config*:
146
<pre>
147
cs7 instance 0
148
 point-code 0.0.2
149
 sccp-address msc_remote
150
  point-code 0.0.1
151 1 neels
msc
152
 msc-addr msc_remote
153
</pre>
154
155 18 neels
You need to drop these sections from OsmoBSC:
156
157
* 'auth policy'
158
* 'authorized-regexp'
159
* 'authentication'
160 22 neels
* 'mm-info'
161 18 neels
162 11 neels
This should give you an OsmoBSC config file like:
163
164 10 neels
*OsmoBSC config*:
165
<pre>
166
e1_input
167 1 neels
 e1_line 0 driver ipa
168 10 neels
 ipa bind 10.42.42.5
169
cs7 instance 1
170 11 neels
 point-code 0.0.2
171
 sccp-address msc_remote
172 1 neels
  point-code 0.0.1
173
msc
174 10 neels
 ! 'msc_remote' is an address book entry defined above under 'cs7'
175
 msc-addr msc_remote
176
network
177
 network country code 901
178
 mobile network code 70
179 18 neels
 short name my-bsc
180
 long name my-bsc
181 10 neels
 location updating reject cause 13
182
 encryption a5 0
183
 neci 1
184
 rrlp mode none
185
 handover 0
186
 handover window rxlev averaging 10
187
 handover window rxqual averaging 1
188
 handover window rxlev neighbor averaging 10
189
 handover power budget interval 6
190
 handover power budget hysteresis 3
191
 handover maximum distance 9999
192
 bts 0
193
  type sysmobts
194
  band GSM-1800
195
  cell_identity 0
196
  location_area_code 23
197
  training_sequence_code 7
198
  base_station_id_code 63
199
  ms max power 33
200
  cell reselection hysteresis 4
201
  rxlev access min 0
202
  channel allocator ascending
203
  rach tx integer 9
204
  rach max transmission 7
205
  ip.access unit_id 1 0
206
  oml ip.access stream_id 255 line 0
207
  gprs mode none
208
  trx 0
209
   rf_locked 0
210
   arfcn 868
211
   nominal power 23
212
   max_power_red 0
213
   rsl e1 tei 0
214
   timeslot 0
215
    phys_chan_config CCCH+SDCCH4
216
   timeslot 1
217
    phys_chan_config SDCCH8
218
   timeslot 2
219
    phys_chan_config TCH/F
220
   timeslot 3
221 1 neels
    phys_chan_config TCH/F
222 10 neels
   timeslot 4
223
    phys_chan_config TCH/F
224 1 neels
   timeslot 5
225
    phys_chan_config TCH/F
226
   timeslot 6
227
    phys_chan_config TCH/F
228
   timeslot 7
229
    phys_chan_config TCH/F
230 11 neels
</pre>
231
232
h2. OsmoMSC config
233
234
To the MSC bits copied from OsmoNITB, you may want to add:
235
236
* a 'cs7 instance' section to configure the SCCP point codes and connection to the OsmoSTP. Note that if omitted, default values apply.
237
* an 'hlr' section if your OsmoHLR is not running on localhost.
238
* an 'msc' section to indicate where to reach the MGW, if it is not on localhost.
239
240
<pre>
241 1 neels
cs7 instance 0
242
 point-code 0.0.1
243 11 neels
hlr
244
 remote-ip 10.42.42.2
245
msc
246
 mgcpgw remote-ip 10.42.42.3
247 10 neels
</pre>
248 11 neels
249 18 neels
You will now use an external HLR to manage the subscriber database, hence change to 'auth policy remote'.
250
251 11 neels
This should give you an OsmoMSC config file like:
252 10 neels
253 12 neels
*OsmoMSC config*:
254 1 neels
255
<pre>
256
cs7 instance 0
257 12 neels
 point-code 0.0.1
258
msc
259
 mgcpgw remote-ip 10.42.42.3
260
hlr
261
 remote-ip 10.42.42.2
262 10 neels
network
263
 network country code 901
264
 mobile network code 70
265 23 neels
 mm info 1
266 18 neels
 short name my-msc
267
 long name my-msc
268
 auth policy remote
269 10 neels
 location updating reject cause 13
270
 encryption a5 0
271
 authentication optional
272
smpp
273
 local-tcp-ip 10.42.42.4 2775
274
 system-id test-msc
275 2 neels
 policy closed
276
</pre>
277
278 1 neels
h1. Service Files
279
280
TODO
Add picture from clipboard (Maximum size: 48.8 MB)