blob: 27b9abf4b0d720495591f6e26dfe025b9fc565ac [file] [log] [blame]
Jacob Erlbeck0024cee2014-12-11 15:14:14 +01001
2 GPRS Subscriber Update Protocol
3
41. General
5
6This document describes the remote protocol that is used by the SGSN to update
7and manage the local subscriber list. The protocol and the messages are
8designed after the corresponding MAP messages (see GSM 09.02) with the
9following differences:
10
11 - The encoding uses TLV structures instead of ASN.1 encodings
12 - Segmentation is not used
13
14See the specification of the Gr interface (GSM 03.60).
15
162. Connection
17
18The protocol expects that a reliable, ordered, packet boundaries preserving
19connection is used (e.g. IPA over TCP). The remote peer is either a service
20that understands the protocol natively or a wrapper service that maps the
21messages to/from real MAP messages that can be used to directly communicate
22with an HLR.
23
Jacob Erlbeck46684dc2014-12-15 10:16:02 +0100242.1. Using IPA
25
26By default, the following identifiers should be used:
27 - IPA protocol: 0xee (OSMO)
28 - IPA OSMO protocol extension: 0x05
29
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100302. Procedures
31
322.1. Authentication management
33
34The SGSN sends a SEND_AUTHENTICATION_INFO_REQ message containing the MS's IMSI
35to the peer. On errors, especially if authentication info is not availabe for
36that IMSI, the peer returns a SEND_AUTHENTICATION_INFO_ERR message. Otherwise
37the peer returns a SEND_AUTHENTICATION_INFO_RES message. If this message
38contains at least one authentication tuple, the SGSN replaces all tuples that
39are assigned to the subscriber. If the message doesn't contain any tuple the
40SGSN may reject the Attach Request. (see GSM 09.02, 25.5.6)
41
422.2. Location Updating
43
44The SGSN sends a UPDATE_LOCATION_REQ to the peer. If the request is denied by
45the network, the peer returns an UPDATE_LOCATION_ERR message to the SGSN.
46Otherwise the peer returns an UPDATE_LOCATION_RES message containing all
47information fields that shall be inserted into the subscriber record. If
48the 'PDP info complete' information element is set in the message, the SGSN
49clears existing PDP information fields in the subscriber record first.
50(see GSM 09.02, 19.1.1.8)
51
52[...]
53
543. Message Format
55
563.1. General
57
58Every message is based on the following message format
59
60 IEI Info Element Type Pres. Format Length
61 Message type 4.2.1 M V 1
62 01 IMSI 4.2.9 M TLV 2-10
63
64If a numeric range is indicated in the 'presence' column, multiple information
65elements with the same tag may be used in sequence. The information elements
66shall be sent in the given order. Nevertheless after the generic part the
67receiver shall be able to received them in any order. Unknown IE shall be
68ignored.
69
703.2.1. Send Authentication Info Request
71
72SGSN -> Network peer
73
74 IEI Info Element Type Pres. Format Length
75 Message type 4.2.1 M V 1
76 01 IMSI 4.2.9 M TLV 2-10
77
783.2.2. Send Authentication Info Error
79
80Network peer -> SGSN
81
82 IEI Info Element Type Pres. Format Length
83 Message type 4.2.1 M V 1
84 01 IMSI 4.2.9 M TLV 2-10
85 02 Cause GMM cause, M TLV 3
86 04.08: 10.5.5.14
87
883.2.3. Send Authentication Info Response
89
90Network peer -> SGSN
91
92 IEI Info Element Type Pres. Format Length
93 Message type 4.2.1 M V 1
94 01 IMSI 4.2.9 M TLV 2-10
95 03 Auth tuple 4.2.5 0-5 TLV 36
96
973.2.4. Update Location Request
98
99SGSN -> Network peer
100
101 IEI Info Element Type Pres. Format Length
102 Message type 4.2.1 M V 1
103 01 IMSI 4.2.9 M TLV 2-10
104
1053.2.5. Update Location Error
106
107Network peer -> SGSN
108
109 IEI Info Element Type Pres. Format Length
110 Message type 4.2.1 M V 1
111 01 IMSI 4.2.9 M TLV 2-10
112 02 Cause GMM cause, M TLV 3
113 04.08: 10.5.5.14
114
1153.2.6. Update Location Result
116
117Network peer -> SGSN
118
119 IEI Info Element Type Pres. Format Length
120 Message type 4.2.1 M V 1
121 01 IMSI 4.2.9 M TLV 2-10
Holger Hans Peter Freythere4485542015-04-22 22:10:44 -0400122 08 MSISDN 4.2.10 O TLV 0-9
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100123 04 PDP info complete 4.2.8 O TLV 2
124 05 PDP info 4.2.3 1-10 TLV
125
126If the PDP info complete IE is present, the old PDP info list shall be cleared.
127
1283.2.7. Location Cancellation Request
129
130Network peer -> SGSN
131
132 IEI Info Element Type Pres. Format Length
133 Message type 4.2.1 M V 1
134 01 IMSI 4.2.9 M TLV 2-10
135 06 Cancellation type 4.2.6 M TLV 3
136
1373.2.8. Location Cancellation Result
138
139SGSN -> Network peer
140
141 IEI Info Element Type Pres. Format Length
142 Message type 4.2.1 M V 1
143 01 IMSI 4.2.9 M TLV 2-10
144
1453.2.9. Purge MS Request
146
147SGSN -> Network peer
148
149 IEI Info Element Type Pres. Format Length
150 Message type 4.2.1 M V 1
151 01 IMSI 4.2.9 M TLV 2-10
152
1533.2.10. Purge MS Error
154
155Network peer -> SGSN
156
Jacob Erlbeckcde0bb22015-01-09 09:46:43 +0100157 IEI Info Element Type Pres. Format Length
158 Message type 4.2.1 M V 1
159 01 IMSI 4.2.9 M TLV 2-10
160 02 Cause GMM cause, M TLV 3
161 04.08: 10.5.5.14
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100162
1633.2.11. Purge MS Result
164
165Network peer -> SGSN
166
Jacob Erlbeckcde0bb22015-01-09 09:46:43 +0100167 IEI Info Element Type Pres. Format Length
168 Message type 4.2.1 M V 1
169 01 IMSI 4.2.9 M TLV 2-10
170 07 Freeze P-TMSI 4.2.8 O TLV 2
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100171
1723.2.12. Insert Subscriber Data Request
173
174Network peer -> SGSN
175
176 IEI Info Element Type Pres. Format Length
177 Message type 4.2.1 M V 1
178 01 IMSI 4.2.9 M TLV 2-10
179 04 PDP info complete 4.2.8 O TLV 2
180 05 PDP info 4.2.3 0-10 TLV
181
182If the PDP info complete IE is present, the old PDP info list shall be cleared.
183
1843.2.13. Insert Subscriber Data Error
185
186SGSN -> Network peer
187
188 IEI Info Element Type Pres. Format Length
189 Message type 4.2.1 M V 1
190 01 IMSI 4.2.9 M TLV 2-10
191 02 Cause GMM cause, M TLV 3
192 04.08: 10.5.5.14
193
1943.2.14. Insert Subscriber Data Result
195
196SGSN -> Network peer
197
198 IEI Info Element Type Pres. Format Length
199 Message type 4.2.1 M V 1
200 01 IMSI 4.2.9 M TLV 2-10
201
2023.2.15. Delete Subscriber Data Request
203
204Network peer -> SGSN
205
206 IEI Info Element Type Pres. Format Length
207 Message type 4.2.1 M V 1
208 01 IMSI 4.2.9 M TLV 2-10
209 10 PDP context id 4.2.3 0-10 TLV
210 (no conditional IE)
211
2123.2.16. Delete Subscriber Data Error
213
214SGSN -> Network peer
215
216 IEI Info Element Type Pres. Format Length
217 Message type 4.2.1 M V 1
218 01 IMSI 4.2.9 M TLV 2-10
219 02 Cause GMM cause, M TLV 3
220 04.08: 10.5.5.14
221
2223.2.17. Delete Subscriber Data Result
223
224Network peer -> SGSN
225
226 IEI Info Element Type Pres. Format Length
227 Message type 4.2.1 M V 1
228 01 IMSI 4.2.9 M TLV 2-10
229
2304. Information Elements
231
2324.1. General
233
234[...]
235
2364.2.1. Message Type
237
238 +---------------------------------------------------+
239 | 8 7 6 5 4 3 2 1 |
240 | |
241 | 0 0 0 0 0 1 0 0 - Update Location Request |
242 | 0 0 0 0 0 1 0 1 - Update Location Error |
243 | 0 0 0 0 0 1 1 0 - Update Location Result |
244 | |
245 | 0 0 0 0 1 0 0 0 - Send Auth Info Request |
246 | 0 0 0 0 1 0 0 1 - Send Auth Info Error |
247 | 0 0 0 0 1 0 1 0 - Send Auth Info Result |
248 | |
249 | 0 0 0 0 1 1 0 0 - Purge MS Request |
250 | 0 0 0 0 1 1 0 1 - Purge MS Error |
251 | 0 0 0 0 1 1 1 0 - Purge MS Result |
252 | |
253 | 0 0 0 1 0 0 0 0 - Insert Subscr. Data Request |
254 | 0 0 0 1 0 0 0 1 - Insert Subscr. Data Error |
255 | 0 0 0 1 0 0 1 0 - Insert Subscr. Data Result |
256 | |
257 | 0 0 0 1 0 1 0 0 - Delete Subscr. Data Request |
258 | 0 0 0 1 0 1 0 1 - Delete Subscr. Data Error |
259 | 0 0 0 1 0 1 1 0 - Delete Subscr. Data Result |
260 | |
261 | 0 0 0 1 1 1 0 0 - Location Cancellation Request |
262 | 0 0 0 1 1 1 0 1 - Location Cancellation Error |
263 | 0 0 0 1 1 1 1 0 - Location Cancellation Result |
264 | |
265 +---------------------------------------------------+
266
2674.2.2. IP Address
268
269The value part is encoded like in the Packet data protocol address IE defined
270in GSM 04.08, 10.5.6.4. PDP type organization must be set to 'IETF allocated
271address'.
272
2734.2.3. PDP Info
274
275This is a container for information elements describing a single PDP.
276
277 IEI Info Element Type Pres. Format Length
278 PDP Info IEI M V 1
279 Length of PDP Info IE length, no ext M V 1
280 10 PDP context id big endian int, 1-N C TLV 3
281 11 PDP type 4.2.4 C TLV 4
282 12 Access point name 04.08, 10.5.6.1 C TLV 3-102
283
284The conditional IE are mandantory unless mentioned otherwise.
285
2864.2.4. PDP Type
287
288The PDP type value consists of 2 octets that are encoded like octet 4-5 of the
289End User Address defined in GSM 09.60, 7.9.18.
290
291 8 7 6 5 4 3 2 1
292 +-----------------------------------------------------+
293 | | PDP type IEI | octet 1
294 +-----------------------------------------------------+
295 | Length of PDP type IE contents (2) | octet 2
296 +-----------------------------------------------------+
297 | Spare | PDP type org. | octet 3
298 +-----------------------------------------------------+
299 | PDP type number | octet 4
300 +-----------------------------------------------------+
301
302The spare bits are left undefined. While 09.60 defines them as '1 1 1 1', there
303are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall
304ignore these bits.
305
306Examples:
307
308 IPv4: PDP type org: 1 (IETF), PDP type number: 0x21
309 IPv6: PDP type org: 1 (IETF), PDP type number: 0x57
310
3114.2.5. Auth tuple
312
313This is a container for information elements describing a single authentication
314tuple.
315
316IEI Info Element Type Pres. Format Length
317 Auth. Tuple IEI M V 1
318 Length of Ath Tuple IE length, no ext M V 1
31920 RAND octet string (16) M TLV 18
32021 SRES octet string (4) M TLV 6
32122 Kc octet string (8) M TLV 10
322
3234.2.6. Cancellation Type
324
325 8 7 6 5 4 3 2 1
326 +-----------------------------------------------------+
327 | | Cancellation type IEI | octet 1
328 +-----------------------------------------------------+
329 | Length of Cancellation Type IE contents (1) | octet 2
330 +-----------------------------------------------------+
331 | Cancellation type number | octet 4
332 +-----------------------------------------------------+
333
334Where the cancellation type number is:
335
336 +---------------------------------------------------+
337 | 8 7 6 5 4 3 2 1 |
338 | |
339 | 0 0 0 0 0 0 0 0 - Update Procedure |
340 | 0 0 0 0 0 0 0 1 - Subscription Withdraw |
341 +---------------------------------------------------+
342
3434.2.7. IE Identifier (informational)
344
345These are the standard values for the IEI. See the message definitions for the
346IEI that shall be used for the encoding.
347
348 +---------------------------------------------------------+
349 | IEI Info Element Type |
350 | |
351 | 0x01 IMSI Mobile identity, 04.08: 10.5.1.4 |
352 | 0x02 Cause GMM cause, 04.08: 10.5.5.14 |
353 | 0x03 Auth tuple 4.2.5 |
354 | 0x04 PDP info compl 4.2.8 |
355 | 0x05 PDP info 4.2.3 |
356 | 0x06 Cancel type 4.2.6 |
Jacob Erlbeckcde0bb22015-01-09 09:46:43 +0100357 | 0x07 Freeze P-TMSI 4.2.8 |
Holger Hans Peter Freythere4485542015-04-22 22:10:44 -0400358 | 0x08 MSISDN ISDN-AddressString/octet, 4.2.10 |
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100359 | 0x10 PDP context id big endian int |
360 | 0x11 PDP type 4.2.4 |
361 | 0x12 APN 04.08, 10.5.6.1 |
362 | 0x20 RAND octet string |
363 | 0x21 SRES octet string |
364 | 0x22 Kc octet string |
365 +---------------------------------------------------------+
366
367
3684.2.8 Empty field
369
370This is used for flags, if and only if this IE is present, the flag is set.
371The semantics depend on the IEI and the context.
372
373 8 7 6 5 4 3 2 1
374 +-----------------------------------------------------+
375 | | IEI | octet 1
376 +-----------------------------------------------------+
377 | Length of IE contents (0) | octet 2
378 +-----------------------------------------------------+
379
3804.2.9. IMSI
381
382The IMSI is encoded like in octet 4-N of the Called Party BCD Number defined in GSM 04.08, 10.5.4.7.
383
384 8 7 6 5 4 3 2 1
385 +-----------------------------------------------------+
386 | | IMSI IEI | octet 1
387 +-----------------------------------------------------+
388 | Length of IMSI IE contents | octet 2
389 +-----------------------------------------------------+
390 | Number digit 2 | Number digit 1 | octet 3
391 +-----------------------------------------------------+
392 | Number digit 4 | Number digit 3 | octet 4
393 +-----------------------------------------------------+
394 : : :
395 +-----------------------------------------------------+
396 | see note 1) | octet 2+(N+1)div2
397 +-----------------------------------------------------+
398
399Note 1) Either '1 1 1 1 | Number digit N' (N odd) or
400 'Number digit N | Number digit N-1' (N even),
401 where N is the number of digits.
Holger Hans Peter Freythere4485542015-04-22 22:10:44 -0400402
4034.2.10. ISDN-AddressString / MSISDN / Called Party BCD Number
404
405The MSISDN is encoded as an ISDN-AddressString in GSM 09.02 and Called Party
406BCD Number in GSM 04.08. It will be stored by the SGSN and then passed as is
407to the GGSN during the activation of the primary PDP Context.
408
409 8 7 6 5 4 3 2 1
410 +-----------------------------------------------------+
411 | | IEI | octet 1
412 +-----------------------------------------------------+
413 | Length of IE contents | octet 2
414 +-----------------------------------------------------+
415 | ext | Type of num | Numbering plan | octet 2
416 +-----------------------------------------------------+
417 | Number digit 2 | Number digit 1 | octet 3
418 +-----------------------------------------------------+
419 | Number digit 4 | Number digit 3 | octet 4
420 +-----------------------------------------------------+
421 : : :
422 +-----------------------------------------------------+