blob: 656447188f6fae0b540889a79f605c40e2e264a3 [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
122 04 PDP info complete 4.2.8 O TLV 2
123 05 PDP info 4.2.3 1-10 TLV
124
125If the PDP info complete IE is present, the old PDP info list shall be cleared.
126
1273.2.7. Location Cancellation Request
128
129Network peer -> SGSN
130
131 IEI Info Element Type Pres. Format Length
132 Message type 4.2.1 M V 1
133 01 IMSI 4.2.9 M TLV 2-10
134 06 Cancellation type 4.2.6 M TLV 3
135
1363.2.8. Location Cancellation Result
137
138SGSN -> Network peer
139
140 IEI Info Element Type Pres. Format Length
141 Message type 4.2.1 M V 1
142 01 IMSI 4.2.9 M TLV 2-10
143
1443.2.9. Purge MS Request
145
146SGSN -> Network peer
147
148 IEI Info Element Type Pres. Format Length
149 Message type 4.2.1 M V 1
150 01 IMSI 4.2.9 M TLV 2-10
151
1523.2.10. Purge MS Error
153
154Network peer -> SGSN
155
156TODO
157
1583.2.11. Purge MS Result
159
160Network peer -> SGSN
161
162TODO
163
1643.2.12. Insert Subscriber Data Request
165
166Network peer -> SGSN
167
168 IEI Info Element Type Pres. Format Length
169 Message type 4.2.1 M V 1
170 01 IMSI 4.2.9 M TLV 2-10
171 04 PDP info complete 4.2.8 O TLV 2
172 05 PDP info 4.2.3 0-10 TLV
173
174If the PDP info complete IE is present, the old PDP info list shall be cleared.
175
1763.2.13. Insert Subscriber Data Error
177
178SGSN -> Network peer
179
180 IEI Info Element Type Pres. Format Length
181 Message type 4.2.1 M V 1
182 01 IMSI 4.2.9 M TLV 2-10
183 02 Cause GMM cause, M TLV 3
184 04.08: 10.5.5.14
185
1863.2.14. Insert Subscriber Data Result
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
1943.2.15. Delete Subscriber Data Request
195
196Network peer -> SGSN
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 10 PDP context id 4.2.3 0-10 TLV
202 (no conditional IE)
203
2043.2.16. Delete Subscriber Data Error
205
206SGSN -> Network peer
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 02 Cause GMM cause, M TLV 3
212 04.08: 10.5.5.14
213
2143.2.17. Delete Subscriber Data Result
215
216Network peer -> SGSN
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
2224. Information Elements
223
2244.1. General
225
226[...]
227
2284.2.1. Message Type
229
230 +---------------------------------------------------+
231 | 8 7 6 5 4 3 2 1 |
232 | |
233 | 0 0 0 0 0 1 0 0 - Update Location Request |
234 | 0 0 0 0 0 1 0 1 - Update Location Error |
235 | 0 0 0 0 0 1 1 0 - Update Location Result |
236 | |
237 | 0 0 0 0 1 0 0 0 - Send Auth Info Request |
238 | 0 0 0 0 1 0 0 1 - Send Auth Info Error |
239 | 0 0 0 0 1 0 1 0 - Send Auth Info Result |
240 | |
241 | 0 0 0 0 1 1 0 0 - Purge MS Request |
242 | 0 0 0 0 1 1 0 1 - Purge MS Error |
243 | 0 0 0 0 1 1 1 0 - Purge MS Result |
244 | |
245 | 0 0 0 1 0 0 0 0 - Insert Subscr. Data Request |
246 | 0 0 0 1 0 0 0 1 - Insert Subscr. Data Error |
247 | 0 0 0 1 0 0 1 0 - Insert Subscr. Data Result |
248 | |
249 | 0 0 0 1 0 1 0 0 - Delete Subscr. Data Request |
250 | 0 0 0 1 0 1 0 1 - Delete Subscr. Data Error |
251 | 0 0 0 1 0 1 1 0 - Delete Subscr. Data Result |
252 | |
253 | 0 0 0 1 1 1 0 0 - Location Cancellation Request |
254 | 0 0 0 1 1 1 0 1 - Location Cancellation Error |
255 | 0 0 0 1 1 1 1 0 - Location Cancellation Result |
256 | |
257 +---------------------------------------------------+
258
2594.2.2. IP Address
260
261The value part is encoded like in the Packet data protocol address IE defined
262in GSM 04.08, 10.5.6.4. PDP type organization must be set to 'IETF allocated
263address'.
264
2654.2.3. PDP Info
266
267This is a container for information elements describing a single PDP.
268
269 IEI Info Element Type Pres. Format Length
270 PDP Info IEI M V 1
271 Length of PDP Info IE length, no ext M V 1
272 10 PDP context id big endian int, 1-N C TLV 3
273 11 PDP type 4.2.4 C TLV 4
274 12 Access point name 04.08, 10.5.6.1 C TLV 3-102
275
276The conditional IE are mandantory unless mentioned otherwise.
277
2784.2.4. PDP Type
279
280The PDP type value consists of 2 octets that are encoded like octet 4-5 of the
281End User Address defined in GSM 09.60, 7.9.18.
282
283 8 7 6 5 4 3 2 1
284 +-----------------------------------------------------+
285 | | PDP type IEI | octet 1
286 +-----------------------------------------------------+
287 | Length of PDP type IE contents (2) | octet 2
288 +-----------------------------------------------------+
289 | Spare | PDP type org. | octet 3
290 +-----------------------------------------------------+
291 | PDP type number | octet 4
292 +-----------------------------------------------------+
293
294The spare bits are left undefined. While 09.60 defines them as '1 1 1 1', there
295are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall
296ignore these bits.
297
298Examples:
299
300 IPv4: PDP type org: 1 (IETF), PDP type number: 0x21
301 IPv6: PDP type org: 1 (IETF), PDP type number: 0x57
302
3034.2.5. Auth tuple
304
305This is a container for information elements describing a single authentication
306tuple.
307
308IEI Info Element Type Pres. Format Length
309 Auth. Tuple IEI M V 1
310 Length of Ath Tuple IE length, no ext M V 1
31120 RAND octet string (16) M TLV 18
31221 SRES octet string (4) M TLV 6
31322 Kc octet string (8) M TLV 10
314
3154.2.6. Cancellation Type
316
317 8 7 6 5 4 3 2 1
318 +-----------------------------------------------------+
319 | | Cancellation type IEI | octet 1
320 +-----------------------------------------------------+
321 | Length of Cancellation Type IE contents (1) | octet 2
322 +-----------------------------------------------------+
323 | Cancellation type number | octet 4
324 +-----------------------------------------------------+
325
326Where the cancellation type number is:
327
328 +---------------------------------------------------+
329 | 8 7 6 5 4 3 2 1 |
330 | |
331 | 0 0 0 0 0 0 0 0 - Update Procedure |
332 | 0 0 0 0 0 0 0 1 - Subscription Withdraw |
333 +---------------------------------------------------+
334
3354.2.7. IE Identifier (informational)
336
337These are the standard values for the IEI. See the message definitions for the
338IEI that shall be used for the encoding.
339
340 +---------------------------------------------------------+
341 | IEI Info Element Type |
342 | |
343 | 0x01 IMSI Mobile identity, 04.08: 10.5.1.4 |
344 | 0x02 Cause GMM cause, 04.08: 10.5.5.14 |
345 | 0x03 Auth tuple 4.2.5 |
346 | 0x04 PDP info compl 4.2.8 |
347 | 0x05 PDP info 4.2.3 |
348 | 0x06 Cancel type 4.2.6 |
349 | 0x10 PDP context id big endian int |
350 | 0x11 PDP type 4.2.4 |
351 | 0x12 APN 04.08, 10.5.6.1 |
352 | 0x20 RAND octet string |
353 | 0x21 SRES octet string |
354 | 0x22 Kc octet string |
355 +---------------------------------------------------------+
356
357
3584.2.8 Empty field
359
360This is used for flags, if and only if this IE is present, the flag is set.
361The semantics depend on the IEI and the context.
362
363 8 7 6 5 4 3 2 1
364 +-----------------------------------------------------+
365 | | IEI | octet 1
366 +-----------------------------------------------------+
367 | Length of IE contents (0) | octet 2
368 +-----------------------------------------------------+
369
3704.2.9. IMSI
371
372The IMSI is encoded like in octet 4-N of the Called Party BCD Number defined in GSM 04.08, 10.5.4.7.
373
374 8 7 6 5 4 3 2 1
375 +-----------------------------------------------------+
376 | | IMSI IEI | octet 1
377 +-----------------------------------------------------+
378 | Length of IMSI IE contents | octet 2
379 +-----------------------------------------------------+
380 | Number digit 2 | Number digit 1 | octet 3
381 +-----------------------------------------------------+
382 | Number digit 4 | Number digit 3 | octet 4
383 +-----------------------------------------------------+
384 : : :
385 +-----------------------------------------------------+
386 | see note 1) | octet 2+(N+1)div2
387 +-----------------------------------------------------+
388
389Note 1) Either '1 1 1 1 | Number digit N' (N odd) or
390 'Number digit N | Number digit N-1' (N even),
391 where N is the number of digits.