Project

General

Profile

OsmoNITB Migration Guide » History » Version 18

neels, 11/29/2017 01:24 PM

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