Project

General

Profile

OsmoNITB Migration Guide » History » Version 16

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