Project

General

Profile

OsmoNITB Migration Guide » History » Version 26

laforge, 12/01/2020 08:30 AM
osmo-mgw, not osmo-bsc-mgcp

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 26 laforge
<pre>apt-get install osmo-bsc osmo-stp osmo-mgw osmo-msc osmo-hlr</pre>
33 15 neels
34 2 neels
h1. Subscriber Database
35
36 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.
37
38 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:
39
40 1 neels
<pre>
41 14 lynxis
osmo-hlr-db-tool --database /var/lib/osmocom/hlr.db import-nitb-db /var/lib/osmocom/hlr.sqlite3
42 4 neels
</pre>
43
44 8 neels
If no @--database@ is passed, @./hlr.db@ is assumed.
45 1 neels
If the target @hlr.db@ does not exist yet, it is created.
46 8 neels
47
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.
48
49
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.
50 4 neels
51 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.
52 5 neels
53
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.
54 2 neels
55
h1. Configuration Files
56
57 6 neels
Most of the current OsmoNITB config options still exist, but are now moved to OsmoMSC or OsmoBSC. Few are required in both.
58
59 9 neels
New configuration is available to set up:
60 24 laforge
* the [[GSUP]] connection from OsmoMSC to the OsmoHLR, and
61 9 neels
* the SCCP connection for the A-interface between OsmoBSC and OsmoMSC, established via OsmoSTP.
62 2 neels
63 10 neels
Let's take this standard OsmoNITB configuration and split it up in OsmoBSC and OsmoMSC parts:
64
65
*OsmoNITB config*:
66
<pre>
67 11 neels
# ---------- to OsmoBSC:
68 10 neels
e1_input
69
 e1_line 0 driver ipa
70
 ipa bind 10.42.42.2
71 11 neels
# ---------- to both OsmoBSC and OsmoMSC:
72 10 neels
network
73
 network country code 901
74
 mobile network code 70
75 18 neels
 short name my-nitb
76
 long name my-nitb
77 1 neels
 location updating reject cause 13
78 10 neels
 encryption a5 0
79 18 neels
 # ---------- to OsmoMSC only:
80
 auth policy closed
81 21 neels
 mm info 1
82 18 neels
 # ---------- to OsmoBSC only:
83 10 neels
 neci 1
84
 rrlp mode none
85
 handover 0
86
 handover window rxlev averaging 10
87
 handover window rxqual averaging 1
88
 handover window rxlev neighbor averaging 10
89
 handover power budget interval 6
90
 handover power budget hysteresis 3
91
 handover maximum distance 9999
92
 bts 0
93
  type sysmobts
94
  band GSM-1800
95
  cell_identity 0
96
  location_area_code 23
97
  training_sequence_code 7
98
  base_station_id_code 63
99
  ms max power 33
100
  cell reselection hysteresis 4
101
  rxlev access min 0
102
  channel allocator ascending
103
  rach tx integer 9
104
  rach max transmission 7
105
  ip.access unit_id 1 0
106
  oml ip.access stream_id 255 line 0
107
  gprs mode none
108
  trx 0
109
   rf_locked 0
110
   arfcn 868
111
   nominal power 23
112
   max_power_red 0
113
   rsl e1 tei 0
114
   timeslot 0
115
    phys_chan_config CCCH+SDCCH4
116
   timeslot 1
117
    phys_chan_config SDCCH8
118
   timeslot 2
119
    phys_chan_config TCH/F
120
   timeslot 3
121
    phys_chan_config TCH/F
122
   timeslot 4
123
    phys_chan_config TCH/F
124
   timeslot 5
125
    phys_chan_config TCH/F
126
   timeslot 6
127
    phys_chan_config TCH/F
128
   timeslot 7
129
    phys_chan_config TCH/F
130 11 neels
# ---------- to OsmoMSC:
131 10 neels
smpp
132
 local-tcp-ip 10.42.42.2 2775
133
 system-id test-nitb
134
 policy closed
135 1 neels
</pre>
136
137 11 neels
h2. OsmoBSC config
138
139
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.
140
141
You also need to add an 'msc' section to tell OsmoBSC where to reach the MSC.
142
143
*additions to OsmoBSC's config*:
144
<pre>
145
cs7 instance 0
146
 point-code 0.0.2
147
 sccp-address msc_remote
148
  point-code 0.0.1
149 1 neels
msc
150
 msc-addr msc_remote
151
</pre>
152
153 18 neels
You need to drop these sections from OsmoBSC:
154
155
* 'auth policy'
156
* 'authorized-regexp'
157
* 'authentication'
158 22 neels
* 'mm-info'
159 18 neels
160 11 neels
This should give you an OsmoBSC config file like:
161
162 10 neels
*OsmoBSC config*:
163
<pre>
164
e1_input
165 1 neels
 e1_line 0 driver ipa
166 10 neels
 ipa bind 10.42.42.5
167
cs7 instance 1
168 11 neels
 point-code 0.0.2
169
 sccp-address msc_remote
170 1 neels
  point-code 0.0.1
171
msc
172 10 neels
 ! 'msc_remote' is an address book entry defined above under 'cs7'
173
 msc-addr msc_remote
174
network
175
 network country code 901
176
 mobile network code 70
177 18 neels
 short name my-bsc
178
 long name my-bsc
179 10 neels
 location updating reject cause 13
180
 encryption a5 0
181
 neci 1
182
 rrlp mode none
183
 handover 0
184
 handover window rxlev averaging 10
185
 handover window rxqual averaging 1
186
 handover window rxlev neighbor averaging 10
187
 handover power budget interval 6
188
 handover power budget hysteresis 3
189
 handover maximum distance 9999
190
 bts 0
191
  type sysmobts
192
  band GSM-1800
193
  cell_identity 0
194
  location_area_code 23
195
  training_sequence_code 7
196
  base_station_id_code 63
197
  ms max power 33
198
  cell reselection hysteresis 4
199
  rxlev access min 0
200
  channel allocator ascending
201
  rach tx integer 9
202
  rach max transmission 7
203
  ip.access unit_id 1 0
204
  oml ip.access stream_id 255 line 0
205
  gprs mode none
206
  trx 0
207
   rf_locked 0
208
   arfcn 868
209
   nominal power 23
210
   max_power_red 0
211
   rsl e1 tei 0
212
   timeslot 0
213
    phys_chan_config CCCH+SDCCH4
214
   timeslot 1
215
    phys_chan_config SDCCH8
216
   timeslot 2
217
    phys_chan_config TCH/F
218
   timeslot 3
219 1 neels
    phys_chan_config TCH/F
220 10 neels
   timeslot 4
221
    phys_chan_config TCH/F
222 1 neels
   timeslot 5
223
    phys_chan_config TCH/F
224
   timeslot 6
225
    phys_chan_config TCH/F
226
   timeslot 7
227
    phys_chan_config TCH/F
228 11 neels
</pre>
229
230
h2. OsmoMSC config
231
232
To the MSC bits copied from OsmoNITB, you may want to add:
233
234
* a 'cs7 instance' section to configure the SCCP point codes and connection to the OsmoSTP. Note that if omitted, default values apply.
235
* an 'hlr' section if your OsmoHLR is not running on localhost.
236
* an 'msc' section to indicate where to reach the MGW, if it is not on localhost.
237
238
<pre>
239 1 neels
cs7 instance 0
240
 point-code 0.0.1
241 11 neels
hlr
242
 remote-ip 10.42.42.2
243
msc
244
 mgcpgw remote-ip 10.42.42.3
245 10 neels
</pre>
246 11 neels
247 18 neels
You will now use an external HLR to manage the subscriber database, hence change to 'auth policy remote'.
248
249 11 neels
This should give you an OsmoMSC config file like:
250 10 neels
251 12 neels
*OsmoMSC config*:
252 1 neels
253
<pre>
254
cs7 instance 0
255 12 neels
 point-code 0.0.1
256
msc
257
 mgcpgw remote-ip 10.42.42.3
258
hlr
259
 remote-ip 10.42.42.2
260 10 neels
network
261
 network country code 901
262
 mobile network code 70
263 23 neels
 mm info 1
264 18 neels
 short name my-msc
265
 long name my-msc
266
 auth policy remote
267 10 neels
 location updating reject cause 13
268
 encryption a5 0
269
 authentication optional
270
smpp
271
 local-tcp-ip 10.42.42.4 2775
272
 system-id test-msc
273 2 neels
 policy closed
274
</pre>
275
276 1 neels
h1. Service Files
277
278
TODO
Add picture from clipboard (Maximum size: 48.8 MB)