blob: 7ca9094e6b84e39df876ace84668c29b479f50dc [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
242. Procedures
25
262.1. Authentication management
27
28The SGSN sends a SEND_AUTHENTICATION_INFO_REQ message containing the MS's IMSI
29to the peer. On errors, especially if authentication info is not availabe for
30that IMSI, the peer returns a SEND_AUTHENTICATION_INFO_ERR message. Otherwise
31the peer returns a SEND_AUTHENTICATION_INFO_RES message. If this message
32contains at least one authentication tuple, the SGSN replaces all tuples that
33are assigned to the subscriber. If the message doesn't contain any tuple the
34SGSN may reject the Attach Request. (see GSM 09.02, 25.5.6)
35
362.2. Location Updating
37
38The SGSN sends a UPDATE_LOCATION_REQ to the peer. If the request is denied by
39the network, the peer returns an UPDATE_LOCATION_ERR message to the SGSN.
40Otherwise the peer returns an UPDATE_LOCATION_RES message containing all
41information fields that shall be inserted into the subscriber record. If
42the 'PDP info complete' information element is set in the message, the SGSN
43clears existing PDP information fields in the subscriber record first.
44(see GSM 09.02, 19.1.1.8)
45
46[...]
47
483. Message Format
49
503.1. General
51
52Every message is based on the following message format
53
54 IEI Info Element Type Pres. Format Length
55 Message type 4.2.1 M V 1
56 01 IMSI 4.2.9 M TLV 2-10
57
58If a numeric range is indicated in the 'presence' column, multiple information
59elements with the same tag may be used in sequence. The information elements
60shall be sent in the given order. Nevertheless after the generic part the
61receiver shall be able to received them in any order. Unknown IE shall be
62ignored.
63
643.2.1. Send Authentication Info Request
65
66SGSN -> Network peer
67
68 IEI Info Element Type Pres. Format Length
69 Message type 4.2.1 M V 1
70 01 IMSI 4.2.9 M TLV 2-10
71
723.2.2. Send Authentication Info Error
73
74Network peer -> SGSN
75
76 IEI Info Element Type Pres. Format Length
77 Message type 4.2.1 M V 1
78 01 IMSI 4.2.9 M TLV 2-10
79 02 Cause GMM cause, M TLV 3
80 04.08: 10.5.5.14
81
823.2.3. Send Authentication Info Response
83
84Network peer -> SGSN
85
86 IEI Info Element Type Pres. Format Length
87 Message type 4.2.1 M V 1
88 01 IMSI 4.2.9 M TLV 2-10
89 03 Auth tuple 4.2.5 0-5 TLV 36
90
913.2.4. Update Location Request
92
93SGSN -> Network peer
94
95 IEI Info Element Type Pres. Format Length
96 Message type 4.2.1 M V 1
97 01 IMSI 4.2.9 M TLV 2-10
98
993.2.5. Update Location Error
100
101Network peer -> SGSN
102
103 IEI Info Element Type Pres. Format Length
104 Message type 4.2.1 M V 1
105 01 IMSI 4.2.9 M TLV 2-10
106 02 Cause GMM cause, M TLV 3
107 04.08: 10.5.5.14
108
1093.2.6. Update Location Result
110
111Network peer -> SGSN
112
113 IEI Info Element Type Pres. Format Length
114 Message type 4.2.1 M V 1
115 01 IMSI 4.2.9 M TLV 2-10
116 04 PDP info complete 4.2.8 O TLV 2
117 05 PDP info 4.2.3 1-10 TLV
118
119If the PDP info complete IE is present, the old PDP info list shall be cleared.
120
1213.2.7. Location Cancellation Request
122
123Network peer -> SGSN
124
125 IEI Info Element Type Pres. Format Length
126 Message type 4.2.1 M V 1
127 01 IMSI 4.2.9 M TLV 2-10
128 06 Cancellation type 4.2.6 M TLV 3
129
1303.2.8. Location Cancellation Result
131
132SGSN -> Network peer
133
134 IEI Info Element Type Pres. Format Length
135 Message type 4.2.1 M V 1
136 01 IMSI 4.2.9 M TLV 2-10
137
1383.2.9. Purge MS Request
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.10. Purge MS Error
147
148Network peer -> SGSN
149
150TODO
151
1523.2.11. Purge MS Result
153
154Network peer -> SGSN
155
156TODO
157
1583.2.12. Insert Subscriber Data Request
159
160Network peer -> SGSN
161
162 IEI Info Element Type Pres. Format Length
163 Message type 4.2.1 M V 1
164 01 IMSI 4.2.9 M TLV 2-10
165 04 PDP info complete 4.2.8 O TLV 2
166 05 PDP info 4.2.3 0-10 TLV
167
168If the PDP info complete IE is present, the old PDP info list shall be cleared.
169
1703.2.13. Insert Subscriber Data Error
171
172SGSN -> Network peer
173
174 IEI Info Element Type Pres. Format Length
175 Message type 4.2.1 M V 1
176 01 IMSI 4.2.9 M TLV 2-10
177 02 Cause GMM cause, M TLV 3
178 04.08: 10.5.5.14
179
1803.2.14. Insert Subscriber Data Result
181
182SGSN -> Network peer
183
184 IEI Info Element Type Pres. Format Length
185 Message type 4.2.1 M V 1
186 01 IMSI 4.2.9 M TLV 2-10
187
1883.2.15. Delete Subscriber Data Request
189
190Network peer -> SGSN
191
192 IEI Info Element Type Pres. Format Length
193 Message type 4.2.1 M V 1
194 01 IMSI 4.2.9 M TLV 2-10
195 10 PDP context id 4.2.3 0-10 TLV
196 (no conditional IE)
197
1983.2.16. Delete Subscriber Data Error
199
200SGSN -> Network peer
201
202 IEI Info Element Type Pres. Format Length
203 Message type 4.2.1 M V 1
204 01 IMSI 4.2.9 M TLV 2-10
205 02 Cause GMM cause, M TLV 3
206 04.08: 10.5.5.14
207
2083.2.17. Delete Subscriber Data Result
209
210Network peer -> SGSN
211
212 IEI Info Element Type Pres. Format Length
213 Message type 4.2.1 M V 1
214 01 IMSI 4.2.9 M TLV 2-10
215
2164. Information Elements
217
2184.1. General
219
220[...]
221
2224.2.1. Message Type
223
224 +---------------------------------------------------+
225 | 8 7 6 5 4 3 2 1 |
226 | |
227 | 0 0 0 0 0 1 0 0 - Update Location Request |
228 | 0 0 0 0 0 1 0 1 - Update Location Error |
229 | 0 0 0 0 0 1 1 0 - Update Location Result |
230 | |
231 | 0 0 0 0 1 0 0 0 - Send Auth Info Request |
232 | 0 0 0 0 1 0 0 1 - Send Auth Info Error |
233 | 0 0 0 0 1 0 1 0 - Send Auth Info Result |
234 | |
235 | 0 0 0 0 1 1 0 0 - Purge MS Request |
236 | 0 0 0 0 1 1 0 1 - Purge MS Error |
237 | 0 0 0 0 1 1 1 0 - Purge MS Result |
238 | |
239 | 0 0 0 1 0 0 0 0 - Insert Subscr. Data Request |
240 | 0 0 0 1 0 0 0 1 - Insert Subscr. Data Error |
241 | 0 0 0 1 0 0 1 0 - Insert Subscr. Data Result |
242 | |
243 | 0 0 0 1 0 1 0 0 - Delete Subscr. Data Request |
244 | 0 0 0 1 0 1 0 1 - Delete Subscr. Data Error |
245 | 0 0 0 1 0 1 1 0 - Delete Subscr. Data Result |
246 | |
247 | 0 0 0 1 1 1 0 0 - Location Cancellation Request |
248 | 0 0 0 1 1 1 0 1 - Location Cancellation Error |
249 | 0 0 0 1 1 1 1 0 - Location Cancellation Result |
250 | |
251 +---------------------------------------------------+
252
2534.2.2. IP Address
254
255The value part is encoded like in the Packet data protocol address IE defined
256in GSM 04.08, 10.5.6.4. PDP type organization must be set to 'IETF allocated
257address'.
258
2594.2.3. PDP Info
260
261This is a container for information elements describing a single PDP.
262
263 IEI Info Element Type Pres. Format Length
264 PDP Info IEI M V 1
265 Length of PDP Info IE length, no ext M V 1
266 10 PDP context id big endian int, 1-N C TLV 3
267 11 PDP type 4.2.4 C TLV 4
268 12 Access point name 04.08, 10.5.6.1 C TLV 3-102
269
270The conditional IE are mandantory unless mentioned otherwise.
271
2724.2.4. PDP Type
273
274The PDP type value consists of 2 octets that are encoded like octet 4-5 of the
275End User Address defined in GSM 09.60, 7.9.18.
276
277 8 7 6 5 4 3 2 1
278 +-----------------------------------------------------+
279 | | PDP type IEI | octet 1
280 +-----------------------------------------------------+
281 | Length of PDP type IE contents (2) | octet 2
282 +-----------------------------------------------------+
283 | Spare | PDP type org. | octet 3
284 +-----------------------------------------------------+
285 | PDP type number | octet 4
286 +-----------------------------------------------------+
287
288The spare bits are left undefined. While 09.60 defines them as '1 1 1 1', there
289are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall
290ignore these bits.
291
292Examples:
293
294 IPv4: PDP type org: 1 (IETF), PDP type number: 0x21
295 IPv6: PDP type org: 1 (IETF), PDP type number: 0x57
296
2974.2.5. Auth tuple
298
299This is a container for information elements describing a single authentication
300tuple.
301
302IEI Info Element Type Pres. Format Length
303 Auth. Tuple IEI M V 1
304 Length of Ath Tuple IE length, no ext M V 1
30520 RAND octet string (16) M TLV 18
30621 SRES octet string (4) M TLV 6
30722 Kc octet string (8) M TLV 10
308
3094.2.6. Cancellation Type
310
311 8 7 6 5 4 3 2 1
312 +-----------------------------------------------------+
313 | | Cancellation type IEI | octet 1
314 +-----------------------------------------------------+
315 | Length of Cancellation Type IE contents (1) | octet 2
316 +-----------------------------------------------------+
317 | Cancellation type number | octet 4
318 +-----------------------------------------------------+
319
320Where the cancellation type number is:
321
322 +---------------------------------------------------+
323 | 8 7 6 5 4 3 2 1 |
324 | |
325 | 0 0 0 0 0 0 0 0 - Update Procedure |
326 | 0 0 0 0 0 0 0 1 - Subscription Withdraw |
327 +---------------------------------------------------+
328
3294.2.7. IE Identifier (informational)
330
331These are the standard values for the IEI. See the message definitions for the
332IEI that shall be used for the encoding.
333
334 +---------------------------------------------------------+
335 | IEI Info Element Type |
336 | |
337 | 0x01 IMSI Mobile identity, 04.08: 10.5.1.4 |
338 | 0x02 Cause GMM cause, 04.08: 10.5.5.14 |
339 | 0x03 Auth tuple 4.2.5 |
340 | 0x04 PDP info compl 4.2.8 |
341 | 0x05 PDP info 4.2.3 |
342 | 0x06 Cancel type 4.2.6 |
343 | 0x10 PDP context id big endian int |
344 | 0x11 PDP type 4.2.4 |
345 | 0x12 APN 04.08, 10.5.6.1 |
346 | 0x20 RAND octet string |
347 | 0x21 SRES octet string |
348 | 0x22 Kc octet string |
349 +---------------------------------------------------------+
350
351
3524.2.8 Empty field
353
354This is used for flags, if and only if this IE is present, the flag is set.
355The semantics depend on the IEI and the context.
356
357 8 7 6 5 4 3 2 1
358 +-----------------------------------------------------+
359 | | IEI | octet 1
360 +-----------------------------------------------------+
361 | Length of IE contents (0) | octet 2
362 +-----------------------------------------------------+
363
3644.2.9. IMSI
365
366The IMSI is encoded like in octet 4-N of the Called Party BCD Number defined in GSM 04.08, 10.5.4.7.
367
368 8 7 6 5 4 3 2 1
369 +-----------------------------------------------------+
370 | | IMSI IEI | octet 1
371 +-----------------------------------------------------+
372 | Length of IMSI IE contents | octet 2
373 +-----------------------------------------------------+
374 | Number digit 2 | Number digit 1 | octet 3
375 +-----------------------------------------------------+
376 | Number digit 4 | Number digit 3 | octet 4
377 +-----------------------------------------------------+
378 : : :
379 +-----------------------------------------------------+
380 | see note 1) | octet 2+(N+1)div2
381 +-----------------------------------------------------+
382
383Note 1) Either '1 1 1 1 | Number digit N' (N odd) or
384 'Number digit N | Number digit N-1' (N even),
385 where N is the number of digits.