blob: 6591d638e1559a2485daba417b1a3fe216731ab5 [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
Holger Hans Peter Freythere54a24d2015-05-17 18:24:40 +0200123 09 HLR Number 4.2.12 O TLV 0-9
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100124 04 PDP info complete 4.2.8 O TLV 2
125 05 PDP info 4.2.3 1-10 TLV
126
127If the PDP info complete IE is present, the old PDP info list shall be cleared.
128
1293.2.7. Location Cancellation Request
130
131Network peer -> SGSN
132
133 IEI Info Element Type Pres. Format Length
134 Message type 4.2.1 M V 1
135 01 IMSI 4.2.9 M TLV 2-10
136 06 Cancellation type 4.2.6 M TLV 3
137
1383.2.8. Location Cancellation Result
139
140SGSN -> Network peer
141
142 IEI Info Element Type Pres. Format Length
143 Message type 4.2.1 M V 1
144 01 IMSI 4.2.9 M TLV 2-10
145
1463.2.9. Purge MS Request
147
148SGSN -> Network peer
149
150 IEI Info Element Type Pres. Format Length
151 Message type 4.2.1 M V 1
152 01 IMSI 4.2.9 M TLV 2-10
Holger Hans Peter Freythere54a24d2015-05-17 18:24:40 +0200153 09 HLR Number 4.2.12 M TLV 0-9
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100154
1553.2.10. Purge MS Error
156
157Network peer -> SGSN
158
Jacob Erlbeckcde0bb22015-01-09 09:46:43 +0100159 IEI Info Element Type Pres. Format Length
160 Message type 4.2.1 M V 1
161 01 IMSI 4.2.9 M TLV 2-10
162 02 Cause GMM cause, M TLV 3
163 04.08: 10.5.5.14
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100164
1653.2.11. Purge MS Result
166
167Network peer -> SGSN
168
Jacob Erlbeckcde0bb22015-01-09 09:46:43 +0100169 IEI Info Element Type Pres. Format Length
170 Message type 4.2.1 M V 1
171 01 IMSI 4.2.9 M TLV 2-10
172 07 Freeze P-TMSI 4.2.8 O TLV 2
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100173
1743.2.12. Insert Subscriber Data Request
175
176Network peer -> SGSN
177
178 IEI Info Element Type Pres. Format Length
179 Message type 4.2.1 M V 1
180 01 IMSI 4.2.9 M TLV 2-10
181 04 PDP info complete 4.2.8 O TLV 2
182 05 PDP info 4.2.3 0-10 TLV
183
184If the PDP info complete IE is present, the old PDP info list shall be cleared.
185
1863.2.13. Insert Subscriber Data Error
187
188SGSN -> Network peer
189
190 IEI Info Element Type Pres. Format Length
191 Message type 4.2.1 M V 1
192 01 IMSI 4.2.9 M TLV 2-10
193 02 Cause GMM cause, M TLV 3
194 04.08: 10.5.5.14
195
1963.2.14. Insert Subscriber Data Result
197
198SGSN -> Network peer
199
200 IEI Info Element Type Pres. Format Length
201 Message type 4.2.1 M V 1
202 01 IMSI 4.2.9 M TLV 2-10
203
2043.2.15. Delete Subscriber Data Request
205
206Network peer -> SGSN
207
208 IEI Info Element Type Pres. Format Length
209 Message type 4.2.1 M V 1
210 01 IMSI 4.2.9 M TLV 2-10
211 10 PDP context id 4.2.3 0-10 TLV
212 (no conditional IE)
213
2143.2.16. Delete Subscriber Data Error
215
216SGSN -> Network peer
217
218 IEI Info Element Type Pres. Format Length
219 Message type 4.2.1 M V 1
220 01 IMSI 4.2.9 M TLV 2-10
221 02 Cause GMM cause, M TLV 3
222 04.08: 10.5.5.14
223
2243.2.17. Delete Subscriber Data Result
225
226Network peer -> SGSN
227
228 IEI Info Element Type Pres. Format Length
229 Message type 4.2.1 M V 1
230 01 IMSI 4.2.9 M TLV 2-10
231
2324. Information Elements
233
2344.1. General
235
236[...]
237
2384.2.1. Message Type
239
240 +---------------------------------------------------+
241 | 8 7 6 5 4 3 2 1 |
242 | |
243 | 0 0 0 0 0 1 0 0 - Update Location Request |
244 | 0 0 0 0 0 1 0 1 - Update Location Error |
245 | 0 0 0 0 0 1 1 0 - Update Location Result |
246 | |
247 | 0 0 0 0 1 0 0 0 - Send Auth Info Request |
248 | 0 0 0 0 1 0 0 1 - Send Auth Info Error |
249 | 0 0 0 0 1 0 1 0 - Send Auth Info Result |
250 | |
251 | 0 0 0 0 1 1 0 0 - Purge MS Request |
252 | 0 0 0 0 1 1 0 1 - Purge MS Error |
253 | 0 0 0 0 1 1 1 0 - Purge MS Result |
254 | |
255 | 0 0 0 1 0 0 0 0 - Insert Subscr. Data Request |
256 | 0 0 0 1 0 0 0 1 - Insert Subscr. Data Error |
257 | 0 0 0 1 0 0 1 0 - Insert Subscr. Data Result |
258 | |
259 | 0 0 0 1 0 1 0 0 - Delete Subscr. Data Request |
260 | 0 0 0 1 0 1 0 1 - Delete Subscr. Data Error |
261 | 0 0 0 1 0 1 1 0 - Delete Subscr. Data Result |
262 | |
263 | 0 0 0 1 1 1 0 0 - Location Cancellation Request |
264 | 0 0 0 1 1 1 0 1 - Location Cancellation Error |
265 | 0 0 0 1 1 1 1 0 - Location Cancellation Result |
266 | |
267 +---------------------------------------------------+
268
2694.2.2. IP Address
270
271The value part is encoded like in the Packet data protocol address IE defined
272in GSM 04.08, 10.5.6.4. PDP type organization must be set to 'IETF allocated
273address'.
274
2754.2.3. PDP Info
276
277This is a container for information elements describing a single PDP.
278
279 IEI Info Element Type Pres. Format Length
280 PDP Info IEI M V 1
281 Length of PDP Info IE length, no ext M V 1
282 10 PDP context id big endian int, 1-N C TLV 3
283 11 PDP type 4.2.4 C TLV 4
284 12 Access point name 04.08, 10.5.6.1 C TLV 3-102
Holger Hans Peter Freyther02d8c472015-04-22 22:42:23 -0400285 13 Quality of Service 4.2.11 O TLV 1-20
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100286
287The conditional IE are mandantory unless mentioned otherwise.
288
2894.2.4. PDP Type
290
291The PDP type value consists of 2 octets that are encoded like octet 4-5 of the
292End User Address defined in GSM 09.60, 7.9.18.
293
294 8 7 6 5 4 3 2 1
295 +-----------------------------------------------------+
296 | | PDP type IEI | octet 1
297 +-----------------------------------------------------+
298 | Length of PDP type IE contents (2) | octet 2
299 +-----------------------------------------------------+
300 | Spare | PDP type org. | octet 3
301 +-----------------------------------------------------+
302 | PDP type number | octet 4
303 +-----------------------------------------------------+
304
305The spare bits are left undefined. While 09.60 defines them as '1 1 1 1', there
306are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall
307ignore these bits.
308
309Examples:
310
311 IPv4: PDP type org: 1 (IETF), PDP type number: 0x21
312 IPv6: PDP type org: 1 (IETF), PDP type number: 0x57
313
3144.2.5. Auth tuple
315
316This is a container for information elements describing a single authentication
317tuple.
318
319IEI Info Element Type Pres. Format Length
320 Auth. Tuple IEI M V 1
321 Length of Ath Tuple IE length, no ext M V 1
32220 RAND octet string (16) M TLV 18
32321 SRES octet string (4) M TLV 6
32422 Kc octet string (8) M TLV 10
325
3264.2.6. Cancellation Type
327
328 8 7 6 5 4 3 2 1
329 +-----------------------------------------------------+
330 | | Cancellation type IEI | octet 1
331 +-----------------------------------------------------+
332 | Length of Cancellation Type IE contents (1) | octet 2
333 +-----------------------------------------------------+
334 | Cancellation type number | octet 4
335 +-----------------------------------------------------+
336
337Where the cancellation type number is:
338
339 +---------------------------------------------------+
340 | 8 7 6 5 4 3 2 1 |
341 | |
342 | 0 0 0 0 0 0 0 0 - Update Procedure |
343 | 0 0 0 0 0 0 0 1 - Subscription Withdraw |
344 +---------------------------------------------------+
345
3464.2.7. IE Identifier (informational)
347
348These are the standard values for the IEI. See the message definitions for the
349IEI that shall be used for the encoding.
350
351 +---------------------------------------------------------+
352 | IEI Info Element Type |
353 | |
354 | 0x01 IMSI Mobile identity, 04.08: 10.5.1.4 |
355 | 0x02 Cause GMM cause, 04.08: 10.5.5.14 |
356 | 0x03 Auth tuple 4.2.5 |
357 | 0x04 PDP info compl 4.2.8 |
358 | 0x05 PDP info 4.2.3 |
359 | 0x06 Cancel type 4.2.6 |
Jacob Erlbeckcde0bb22015-01-09 09:46:43 +0100360 | 0x07 Freeze P-TMSI 4.2.8 |
Holger Hans Peter Freythere4485542015-04-22 22:10:44 -0400361 | 0x08 MSISDN ISDN-AddressString/octet, 4.2.10 |
Holger Hans Peter Freythere54a24d2015-05-17 18:24:40 +0200362 | 0x09 HLR Number 4.2.12 |
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100363 | 0x10 PDP context id big endian int |
364 | 0x11 PDP type 4.2.4 |
365 | 0x12 APN 04.08, 10.5.6.1 |
Holger Hans Peter Freyther02d8c472015-04-22 22:42:23 -0400366 | 0x13 QoS 4.2.11 |
Jacob Erlbeck0024cee2014-12-11 15:14:14 +0100367 | 0x20 RAND octet string |
368 | 0x21 SRES octet string |
369 | 0x22 Kc octet string |
370 +---------------------------------------------------------+
371
372
3734.2.8 Empty field
374
375This is used for flags, if and only if this IE is present, the flag is set.
376The semantics depend on the IEI and the context.
377
378 8 7 6 5 4 3 2 1
379 +-----------------------------------------------------+
380 | | IEI | octet 1
381 +-----------------------------------------------------+
382 | Length of IE contents (0) | octet 2
383 +-----------------------------------------------------+
384
3854.2.9. IMSI
386
387The IMSI is encoded like in octet 4-N of the Called Party BCD Number defined in GSM 04.08, 10.5.4.7.
388
389 8 7 6 5 4 3 2 1
390 +-----------------------------------------------------+
391 | | IMSI IEI | octet 1
392 +-----------------------------------------------------+
393 | Length of IMSI IE contents | octet 2
394 +-----------------------------------------------------+
395 | Number digit 2 | Number digit 1 | octet 3
396 +-----------------------------------------------------+
397 | Number digit 4 | Number digit 3 | octet 4
398 +-----------------------------------------------------+
399 : : :
400 +-----------------------------------------------------+
401 | see note 1) | octet 2+(N+1)div2
402 +-----------------------------------------------------+
403
404Note 1) Either '1 1 1 1 | Number digit N' (N odd) or
405 'Number digit N | Number digit N-1' (N even),
406 where N is the number of digits.
Holger Hans Peter Freythere4485542015-04-22 22:10:44 -0400407
4084.2.10. ISDN-AddressString / MSISDN / Called Party BCD Number
409
410The MSISDN is encoded as an ISDN-AddressString in GSM 09.02 and Called Party
411BCD Number in GSM 04.08. It will be stored by the SGSN and then passed as is
412to the GGSN during the activation of the primary PDP Context.
413
414 8 7 6 5 4 3 2 1
415 +-----------------------------------------------------+
416 | | IEI | octet 1
417 +-----------------------------------------------------+
418 | Length of IE contents | octet 2
419 +-----------------------------------------------------+
420 | ext | Type of num | Numbering plan | octet 2
421 +-----------------------------------------------------+
422 | Number digit 2 | Number digit 1 | octet 3
423 +-----------------------------------------------------+
424 | Number digit 4 | Number digit 3 | octet 4
425 +-----------------------------------------------------+
426 : : :
427 +-----------------------------------------------------+
Holger Hans Peter Freyther02d8c472015-04-22 22:42:23 -0400428
429
4304.2.11 Quality of Service Subscribed Service
431
432This encodes the subscribed QoS of a subscriber. It will be used by the
433SGSN during the PDP Context activation. If the length of the QoS data
434is 3 (three) octets it is assumed that these are octets 3-5 of the TS
4353GPP TS 24.008 Quality of Service Octets. If it is more than three then
436then it is assumed that the first octet is the Allocation/Retention
437Priority and the reset are encoded as octets 3-N of 24.008.
438
439
440 8 7 6 5 4 3 2 1
441 +-----------------------------------------------------+
442 | | IEI | octet 1
443 +-----------------------------------------------------+
444 | Length of IE contents | octet 2
445 +-----------------------------------------------------+
446 : : :
447 +-----------------------------------------------------+
Holger Hans Peter Freythere54a24d2015-05-17 18:24:40 +0200448
4494.2.12. HLR Number encoded as GSM 09.02 ISDN-AddressString
450
451The HLR Number is encoded as an ISDN-AddressString in GSM 09.02. It
452will be stored by the SGSN can be used by the CDR module to keep a
453record.
454
455 8 7 6 5 4 3 2 1
456 +-----------------------------------------------------+
457 | | IEI | octet 1
458 +-----------------------------------------------------+
459 | Length of IE contents | octet 2
460 +-----------------------------------------------------+
461 | ext | Type of num | Numbering plan | octet 2
462 +-----------------------------------------------------+
463 | Number digit 2 | Number digit 1 | octet 3
464 +-----------------------------------------------------+
465 | Number digit 4 | Number digit 3 | octet 4
466 +-----------------------------------------------------+
467 : : :
468 +-----------------------------------------------------+