Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 1 | [[gsup]] |
| 2 | == GPRS Subscriber Update Protocol |
| 3 | |
| 4 | === General |
| 5 | |
| 6 | This chapter describes the remote protocol that is used by the SGSN to update |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 7 | and manage the local subscriber list. Functionally, it resembles the |
| 8 | interface between the SGSN on the one hand side, and HLR/AUC on the |
| 9 | other side. |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 10 | |
| 11 | For more information, see the specification of the Gr interface (3GPP TS 03.60). |
| 12 | |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 13 | Traditionally, the GSM MAP (Mobile Application Part) protocol is used |
| 14 | for this purpose, running on top of a full telecom signalling protocol |
| 15 | stck of MTP2/MTP3/SCCP/TCAP, or any of the SIGTRAN alternatvives. |
| 16 | |
| 17 | In order to avoid many of the complexities of MAP, which are difficult |
| 18 | to implement in the plain C language evnironment of the Osmocom |
| 19 | cellular network elements like the SGSN, we introduce the GSUP |
| 20 | protocol. |
| 21 | |
| 22 | The GSUP protocol and the messages are designed after the |
| 23 | corresponding MAP messages (see 3GPP TS 09.02) with the following |
| 24 | main differences: |
| 25 | |
| 26 | * The encoding uses TLV structures instead of ASN.1 BER |
| 27 | * Segmentation is not used, i.e. we rely on the fact that the |
| 28 | underlying transport protocol can transport signalling messages of |
| 29 | any size. |
| 30 | |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 31 | === Connection |
| 32 | |
| 33 | The protocol expects that a reliable, ordered, packet boundaries preserving |
| 34 | connection is used (e.g. IPA over TCP). The remote peer is either a service |
| 35 | that understands the protocol natively or a wrapper service that maps the |
| 36 | messages to/from real MAP messages that can be used to directly communicate |
| 37 | with an HLR. |
| 38 | |
| 39 | === Using IPA |
| 40 | |
| 41 | By default, the following identifiers should be used: |
| 42 | |
| 43 | * IPA Stream ID: 0xEE (OSMO) |
| 44 | * IPA OSMO protocol extension: 0x05 |
| 45 | |
| 46 | For more information about the IPA multiplex, please see the 'OsmoBTS |
Jonathan Brielmaier | 5530c91 | 2016-05-25 15:01:11 +0200 | [diff] [blame] | 47 | Abis/IP Specification'. |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 48 | |
| 49 | === Procedures |
| 50 | |
| 51 | ==== Authentication management |
| 52 | |
| 53 | The SGSN sends a SEND_AUTHENTICATION_INFO_REQ message containing the MS's IMSI |
Jonathan Brielmaier | 5530c91 | 2016-05-25 15:01:11 +0200 | [diff] [blame] | 54 | to the peer. On errors, especially if authentication info is not available for |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 55 | that IMSI, the peer returns a SEND_AUTHENTICATION_INFO_ERR message. Otherwise |
| 56 | the peer returns a SEND_AUTHENTICATION_INFO_RES message. If this message |
| 57 | contains at least one authentication tuple, the SGSN replaces all tuples that |
| 58 | are assigned to the subscriber. If the message doesn't contain any tuple the |
| 59 | SGSN may reject the Attach Request. (see 3GPP TS 09.02, 25.5.6) |
| 60 | |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 61 | .Send Authentication Info (Normal Case) |
| 62 | ["mscgen"] |
| 63 | ---- |
| 64 | msc { |
| 65 | hscale="1.5"; |
| 66 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 67 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 68 | SGSN => Peer [label="SEND AUTHENTICATION INFO REQUEST (IMSI)"]; |
| 69 | Peer => SGSN [label="SEND AUTHENTICATION INFO RESPONSE (Tuples)"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 70 | } |
| 71 | ---- |
| 72 | |
| 73 | .Send Authentication Info (Erroneous Case) |
| 74 | ["mscgen"] |
| 75 | ---- |
| 76 | msc { |
| 77 | hscale="1.5"; |
| 78 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 79 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 80 | SGSN => Peer [label="SEND AUTHENTICATION INFO REQUEST (IMSI)"]; |
| 81 | Peer => SGSN [label="SEND AUTHENTICATION INFO ERROR (Cause)"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 82 | } |
| 83 | ---- |
| 84 | |
| 85 | ==== Reporting of Authentication Failure |
| 86 | |
| 87 | Using this procedure, the SGSN reports authentication failures to the |
| 88 | HLR. |
| 89 | |
| 90 | .Authentication Failure Report (Normal Case) |
| 91 | ["mscgen"] |
| 92 | ---- |
| 93 | msc { |
| 94 | hscale="1.5"; |
| 95 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 96 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 97 | SGSN => Peer [label="AUTHENTICATION FAILURE REPORT (IMSI)"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 98 | } |
| 99 | ---- |
| 100 | |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 101 | ==== Location Updating |
| 102 | |
| 103 | The SGSN sends a UPDATE_LOCATION_REQ to the peer. If the request is denied by |
| 104 | the network, the peer returns an UPDATE_LOCATION_ERR message to the SGSN. |
| 105 | Otherwise the peer returns an UPDATE_LOCATION_RES message containing all |
| 106 | information fields that shall be inserted into the subscriber record. If |
| 107 | the 'PDP info complete' information element is set in the message, the SGSN |
| 108 | clears existing PDP information fields in the subscriber record first. |
| 109 | (see 3GPP TS 09.02, 19.1.1.8) |
| 110 | |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 111 | .Update Location (Normal Case) |
| 112 | ["mscgen"] |
| 113 | ---- |
| 114 | msc { |
| 115 | hscale="1.5"; |
| 116 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 117 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 118 | SGSN => Peer [label="UPDATE LOCATION REQUEST (IMSI)"]; |
| 119 | Peer => SGSN [label="INSERT SUBSCRIBER DATA"]; |
| 120 | SGSN => Peer [label="INSERT SUBSCRIBER DATA ACK"]; |
| 121 | Peer => SGSN [label="UPDATE LOCATTION RESULT"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 122 | } |
| 123 | ---- |
| 124 | |
| 125 | .Update Location (Error Case) |
| 126 | ["mscgen"] |
| 127 | ---- |
| 128 | msc { |
| 129 | hscale="1.5"; |
| 130 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 131 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 132 | SGSN => Peer [label="UPDATE LOCATION REQUEST (IMSI)"]; |
| 133 | Peer => SGSN [label="UPDATE LOCATTION ERROR (Cause)"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 134 | } |
| 135 | ---- |
| 136 | |
| 137 | ==== Location Cancellation |
| 138 | |
| 139 | Using the Location Cancellation procedure, the Network Peer (HLR) can |
| 140 | request the SGSN to remove a subscriber record. |
| 141 | |
| 142 | .Cancel Location (Normal Case) |
| 143 | ["mscgen"] |
| 144 | ---- |
| 145 | msc { |
| 146 | hscale="1.5"; |
| 147 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 148 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 149 | Peer => SGSN [label="CANCEL LOCATION REQUEST (IMSI)"]; |
| 150 | SGSN => Peer [label="CANCEL LOCATION RESULT"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 151 | } |
| 152 | ---- |
| 153 | |
| 154 | .Cancel Location (Error Case) |
| 155 | ["mscgen"] |
| 156 | ---- |
| 157 | msc { |
| 158 | hscale="1.5"; |
| 159 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 160 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 161 | Peer => SGSN [label="CANCEL LOCATION REQUEST (IMSI)"]; |
| 162 | SGSN => Peer [label="CANCEL LOCATION ERROR (Cause)"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 163 | } |
| 164 | ---- |
| 165 | |
| 166 | ==== Purge MS |
| 167 | |
| 168 | Using the Purge MS procedure, the SGSN can request purging of MS |
| 169 | related state from a previous SGSN during an inter-SGSN location |
| 170 | update. |
| 171 | |
| 172 | .Purge MS (Normal Case) |
| 173 | ["mscgen"] |
| 174 | ---- |
| 175 | msc { |
| 176 | hscale="1.5"; |
| 177 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 178 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 179 | SGSN => Peer [label="PURGE MS REQUEST (IMSI)"]; |
| 180 | Peer => SGSN [label="PURGE MS RESULT"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 181 | } |
| 182 | ---- |
| 183 | |
| 184 | ==== Delete Subscriber Data |
| 185 | |
| 186 | Using the Delete Subscriber Data procedure, the Peer (HLR) can remove |
| 187 | some of the subscriber data from the SGSN. This is used in case the |
| 188 | subscription details (e.g. PDP Contexts / APNs) change while the |
| 189 | subscriber is registred to that SGSN. |
| 190 | |
| 191 | .Delete Subscriber Data (Normal Case) |
| 192 | ["mscgen"] |
| 193 | ---- |
| 194 | msc { |
| 195 | hscale="1.5"; |
| 196 | SGSN [label="SGSN"], Peer [label="Network Peer (HLR)"]; |
| 197 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 198 | Peer => SGSN [label="DELETE SUBSCRIBER DATA REQUEST (IMSI)"]; |
| 199 | SGSN => Peer [label="DELETE SUBSCRIBER DATA RESULT"]; |
Harald Welte | 779ba70 | 2016-07-23 21:00:13 +0200 | [diff] [blame] | 200 | } |
| 201 | ---- |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 202 | |
| 203 | === Message Format |
| 204 | |
| 205 | ==== General |
| 206 | |
| 207 | Every message is based on the following message format |
| 208 | |
| 209 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 210 | |=== |
| 211 | |IEI|IE|Type|Presence|Format|Length |
| 212 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 213 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 214 | |=== |
| 215 | |
| 216 | If a numeric range is indicated in the 'presence' column, multiple information |
| 217 | elements with the same tag may be used in sequence. The information elements |
| 218 | shall be sent in the given order. Nevertheless after the generic part the |
| 219 | receiver shall be able to received them in any order. Unknown IE shall be |
| 220 | ignored. |
| 221 | |
| 222 | ==== Send Authentication Info Request |
| 223 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 224 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 225 | |
| 226 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 227 | |=== |
| 228 | |IEI|IE|Type|Presence|Format|Length |
| 229 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 230 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 231 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
| 232 | |26|AUTS|<<gsup-ie-auts>>|C|TLV|18 |
| 233 | |20|RAND|<<gsup-ie-rand>>|C|TLV|18 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 234 | |=== |
| 235 | |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 236 | The conditional 'AUTS' and 'RAND' IEs are both present in case the SIM |
| 237 | (via UE) requests an UMTS AKA re-synchronization procedure. Eiter |
| 238 | both optional IEs are present, or none of them. |
| 239 | |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 240 | ==== Send Authentication Info Error |
| 241 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 242 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 243 | |
| 244 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 245 | |=== |
| 246 | |IEI|IE|Type|Presence|Format|Length |
| 247 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 248 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 249 | |02|Cause|<<gsup-ie-cause>>|M|TLV|3 |
| 250 | |=== |
| 251 | |
| 252 | ==== Send Authentication Info Response |
| 253 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 254 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 255 | |
| 256 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 257 | |=== |
| 258 | |IEI|IE|Type|Presence|Format|Length |
| 259 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 260 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 261 | |03|Auth Tuple|<<gsup-ie-authtuple>>|0-5|TLV|36 |
| 262 | |=== |
| 263 | |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 264 | ==== Authentication Failure Report |
| 265 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 266 | Direction: SGSN => Network peer |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 267 | |
| 268 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 269 | |=== |
| 270 | |IEI|IE|Type|Presence|Format|Length |
| 271 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 272 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 273 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
| 274 | |=== |
| 275 | |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 276 | ==== Update Location Request |
| 277 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 278 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 279 | |
| 280 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 281 | |=== |
| 282 | |IEI|IE|Type|Presence|Format|Length |
| 283 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 284 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 285 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 286 | |=== |
| 287 | |
| 288 | ==== Update Location Error |
| 289 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 290 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 291 | |
| 292 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 293 | |=== |
| 294 | |IEI|IE|Type|Presence|Format|Length |
| 295 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 296 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 297 | |02|Cause|<<gsup-ie-cause>>|M|TLV|3 |
| 298 | |=== |
| 299 | |
| 300 | ==== Update Location Result |
| 301 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 302 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 303 | |
| 304 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 305 | |=== |
| 306 | |IEI|IE|Type|Presence|Format|Length |
| 307 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 308 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 309 | |08|MSISDN|<<gsup-ie-msisdn>>|O|TLV|0-9 |
| 310 | |09|HLR Number|<<gsup-ie-hlr>>|O|TLV|0-9 |
| 311 | |04|PDP info complete|<<gsup-ie-empty>>|O|TLV|2 |
| 312 | |05|PDP info|<<gsup-ie-pdpinfo>>|1-10|TLV| |
| 313 | |=== |
| 314 | |
| 315 | If the PDP info complete IE is present, the old PDP info list shall be cleared. |
| 316 | |
| 317 | ==== Location Cancellation Request |
| 318 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 319 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 320 | |
| 321 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 322 | |=== |
| 323 | |IEI|IE|Type|Presence|Format|Length |
| 324 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 325 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 326 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 327 | |06|Cancellation type|<<gsup-ie-canctype>>|O|TLV|3 |
| 328 | |=== |
| 329 | |
| 330 | ==== Location Cancellation Result |
| 331 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 332 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 333 | |
| 334 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 335 | |=== |
| 336 | |IEI|IE|Type|Presence|Format|Length |
| 337 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 338 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 339 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 340 | |=== |
| 341 | |
| 342 | ==== Purge MS Request |
| 343 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 344 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 345 | |
| 346 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 347 | |=== |
| 348 | |IEI|IE|Type|Presence|Format|Length |
| 349 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 350 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 351 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 352 | |09|HLR Number|<<gsup-ie-hlr>>|M|TLV|0-9 |
| 353 | |=== |
| 354 | |
| 355 | ==== Purge MS Error |
| 356 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 357 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 358 | |
| 359 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 360 | |=== |
| 361 | |IEI|IE|Type|Presence|Format|Length |
| 362 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 363 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 364 | |02|Cause|<<gsup-ie-cause>>|M|TLV|3 |
| 365 | |=== |
| 366 | |
| 367 | ==== Purge MS Result |
| 368 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 369 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 370 | |
| 371 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 372 | |=== |
| 373 | |IEI|IE|Type|Presence|Format|Length |
| 374 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 375 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 376 | |07|Freeze P-TMSI|<<gsup-ie-empty>>|M|TLV|2 |
| 377 | |=== |
| 378 | |
| 379 | ==== Insert Subscriber Data Request |
| 380 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 381 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 382 | |
| 383 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 384 | |=== |
| 385 | |IEI|IE|Type|Presence|Format|Length |
| 386 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 387 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 388 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
| 389 | |08|MSISDN|<<gsup-ie-msisdn>>|O|TLV|0-9 |
| 390 | |09|HLR Number|<<gsup-ie-hlr>>|O|TLV|0-9 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 391 | |04|PDP info complete|<<gsup-ie-empty>>|M|TLV|2 |
| 392 | |05|PDP info|<<gsup-ie-pdpinfo>>|0-10|TLV| |
| 393 | |=== |
| 394 | |
| 395 | If the PDP info complete IE is present, the old PDP info list shall be cleared. |
| 396 | |
| 397 | ==== Insert Subscriber Data Error |
| 398 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 399 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 400 | |
| 401 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 402 | |=== |
| 403 | |IEI|IE|Type|Presence|Format|Length |
| 404 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 405 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 406 | |02|Cause|<<gsup-ie-cause>>|M|TLV|3 |
| 407 | |=== |
| 408 | |
| 409 | ==== Insert Subscriber Data Result |
| 410 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 411 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 412 | |
| 413 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 414 | |=== |
| 415 | |IEI|IE|Type|Presence|Format|Length |
| 416 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 417 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 418 | |=== |
| 419 | |
| 420 | ==== Delete Subscriber Data Request |
| 421 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 422 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 423 | |
| 424 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 425 | |=== |
| 426 | |IEI|IE|Type|Presence|Format|Length |
| 427 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 428 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 429 | |28|CN Domain|<<gsup-ie-cndomain>>|O|TLV|3 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 430 | |10|PDP context id|<<gsup-ie-pdpinfo>> (no conditional IE)|0-10|TLV| |
| 431 | |=== |
| 432 | |
| 433 | ==== Delete Subscriber Data Error |
| 434 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 435 | Direction: SGSN => Network peer |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 436 | |
| 437 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 438 | |=== |
| 439 | |IEI|IE|Type|Presence|Format|Length |
| 440 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 441 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 442 | |02|Cause|<<gsup-ie-cause>>|M|TLV|3 |
| 443 | |=== |
| 444 | |
| 445 | ==== Delete Subscriber Data Result |
| 446 | |
Philipp Maier | 0f63651 | 2017-03-09 13:51:07 +0100 | [diff] [blame^] | 447 | Direction: Network peer => SGSN |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 448 | |
| 449 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 450 | |=== |
| 451 | |IEI|IE|Type|Presence|Format|Length |
| 452 | | |Message Type|<<gsup-ie-msgtype>>|M|V|1 |
| 453 | |01|IMSI|<<gsup-ie-imsi>>|M|TLV|2-10 |
| 454 | |=== |
| 455 | |
| 456 | === Information Elements |
| 457 | |
| 458 | [[gsup-ie-msgtype]] |
| 459 | ==== Message Type |
| 460 | |
| 461 | [options="header",cols="10%,90%"] |
| 462 | |=== |
| 463 | |Type|Description |
| 464 | |0x04|Update Location Request |
| 465 | |0x05|Update Location Error |
| 466 | |0x06|Update Location Result |
| 467 | |0x08|Send Auth Info Request |
| 468 | |0x09|Send Auth Info Error |
| 469 | |0x0a|Send Auth Info Result |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 470 | |0x0b|Authentication Failure Report |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 471 | |0x0c|Purge MS Request |
| 472 | |0x0d|Purge MS Error |
| 473 | |0x0e|Purge MS Result |
| 474 | |0x10|Insert Subscriber Data Request |
| 475 | |0x11|Insert Subscriber Data Error |
| 476 | |0x12|Insert Subscriber Data Result |
| 477 | |0x14|Delete Subscriber Data Request |
| 478 | |0x15|Delete Subscriber Data Error |
| 479 | |0x16|Delete Subscriber Data Result |
| 480 | |0x1c|Location Cancellation Request |
| 481 | |0x1d|Location Cancellation Error |
| 482 | |0x1e|Location Cancellation Result |
| 483 | |=== |
| 484 | |
| 485 | [[gsup-ie-ipaddr]] |
| 486 | ==== IP Address |
| 487 | |
| 488 | The value part is encoded like in the Packet data protocol address IE defined |
| 489 | in 3GPP TS 04.08, Chapter 10.5.6.4. PDP type organization must be set to |
| 490 | 'IETF allocated address'. |
| 491 | |
| 492 | [[gsup-ie-pdpinfo]] |
| 493 | ==== PDP Info |
| 494 | |
| 495 | This is a container for information elements describing a single PDP. |
| 496 | |
| 497 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 498 | |=== |
| 499 | |IEI|IE|Type|Presence|Format|Length |
| 500 | | |PDP Info IEI|<<gsup-iei>>|M|V|1 |
| 501 | | |Length of PDP Info IE||M|V|1 |
| 502 | |10|PDP Context ID|<<gsup-ie-pdpctxid>>|C|TLV|3 |
| 503 | |11|PDP Type|<<gsup-ie-pdptype>>|C|TLV|4 |
| 504 | |12|Access Point Name|3GPP TS 04.08, Ch. 10.5.6.1|C|TLV|3-102 |
| 505 | |13|Quality of Service|<<gsup-ie-qos>>|O|TLV|1-20 |
| 506 | |=== |
| 507 | |
| 508 | The conditional IE are mandantory unless mentioned otherwise. |
| 509 | |
| 510 | [[gsup-ie-pdptype]] |
| 511 | ==== PDP Type |
| 512 | |
| 513 | The PDP type value consists of 2 octets that are encoded like octet 4-5 of the |
| 514 | End User Address defined in 3GPP TS 09.60, 7.9.18. |
| 515 | |
| 516 | [packetdiag] |
| 517 | ---- |
| 518 | { |
| 519 | colwidth = 8 |
| 520 | node_height = 24 |
| 521 | |
| 522 | 0-6: PDP type IEI |
| 523 | 7: Res |
| 524 | 8-15: Length (2) |
| 525 | 16-19: Spare |
| 526 | 20-23: PDP type org |
| 527 | 24-31: PDP type number |
| 528 | } |
| 529 | ---- |
| 530 | |
| 531 | The spare bits are left undefined. While 09.60 defines them as '1 1 1 1', there |
| 532 | are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall |
| 533 | ignore these bits. |
| 534 | |
| 535 | Examples: |
| 536 | |
| 537 | * IPv4: PDP type org: 1 (IETF), PDP type number: 0x21 |
| 538 | * IPv6: PDP type org: 1 (IETF), PDP type number: 0x57 |
| 539 | |
| 540 | [[gsup-ie-pdpctxid]] |
| 541 | ==== PDP Context ID |
| 542 | |
| 543 | The PDP type context ID IE consists of a single integer byte wrapped in |
| 544 | a TLV. |
| 545 | |
| 546 | [packetdiag] |
| 547 | ---- |
| 548 | { |
| 549 | colwidth = 8 |
| 550 | node_height = 24 |
| 551 | |
| 552 | 0-6: PDP context ID IEI |
| 553 | 7: Res |
| 554 | 8-15: Length (1) |
| 555 | 16-23: PDP Context ID |
| 556 | } |
| 557 | ---- |
| 558 | |
| 559 | [[gsup-ie-authtuple]] |
| 560 | ==== Auth tuple |
| 561 | |
| 562 | This is a container for information elements describing a single authentication |
| 563 | tuple. |
| 564 | |
| 565 | [options="header",cols="5%,20%,45%,10%,10%,10%"] |
| 566 | |=== |
| 567 | |IEI|IE|Type|Presence|Format|Length |
| 568 | | |Auth Tuple IEI|<<gsup-iei>>|M|V|1 |
| 569 | | |Length of Auth Tuple IE||M|V|1 |
| 570 | |20|RAND|<<gsup-ie-rand>>|M|TLV|18 |
| 571 | |21|SRES|<<gsup-ie-sres>>|M|TLV|6 |
| 572 | |22|Kc|<<gsup-ie-kc>>|M|TLV|10 |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 573 | |23|IK|<<gsup-ie-ik>>|C|TLV|18 |
| 574 | |24|CK|<<gsup-ie-ck>>|C|TLV|18 |
| 575 | |25|AUTN|<<gsup-ie-autn>>|C|TLV|18 |
| 576 | |27|RES|<<gsup-ie-res>>|C|TLV|2-18 |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 577 | |=== |
| 578 | |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 579 | The conditional IEs 'IK', 'CK', 'AUTN' and 'RES' are onl present in |
| 580 | case the subscriber supports UMTS AKA. |
| 581 | |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 582 | [[gsup-ie-rand]] |
| 583 | ==== RAND |
| 584 | |
| 585 | The 16-byte Random Challenge of the GSM Authentication Algorithm. |
| 586 | |
| 587 | [[gsup-ie-sres]] |
| 588 | ==== SRES |
| 589 | |
| 590 | The 4-byte Authentication Result of the GSM Authentication Algorithm. |
| 591 | |
| 592 | [[gsup-ie-kc]] |
| 593 | ==== Kc |
| 594 | |
| 595 | The 8-byte Encryption Key of the GSM Authentication and Key Agreemnt |
| 596 | Algorithm. |
| 597 | |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 598 | [[gsup-ie-ik]] |
| 599 | ==== IK |
| 600 | |
| 601 | The 16-byte Integrity Protection Key generated by the UMTS |
| 602 | Authentication and Key Agreement Algorithm. |
| 603 | |
| 604 | [[gsup-ie-ck]] |
| 605 | ==== CK |
| 606 | |
| 607 | The 16-byte Ciphering Key generated by the UMTS Authentication and Key |
| 608 | Agreement Algorithm. |
| 609 | |
| 610 | [[gsup-ie-autn]] |
| 611 | ==== AUTN |
| 612 | |
| 613 | The 16-byte Authentication Nonce sent from network to USIM in the UMTS |
| 614 | Authentication and Key Agreement Algorithm. |
| 615 | |
| 616 | [[gsup-ie-auts]] |
| 617 | ==== AUTS |
| 618 | |
ikostov | c520c3b | 2017-02-03 19:04:47 +0100 | [diff] [blame] | 619 | The 14-byte Authentication Synchronization Nonce generated by the USIM |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 620 | in case the UMTS Authentication and Key Agreement Algorithm needs to |
| 621 | re-synchronize the sequence counters between AUC and USIM. |
| 622 | |
| 623 | [[gsup-ie-res]] |
| 624 | ==== RES |
| 625 | |
| 626 | The (variable length, but typically 16 byte) Authentication Result |
| 627 | generated by the USIM in the UMTS Authentication and Key Agreement |
| 628 | Algorithm. |
| 629 | |
| 630 | [[gsup-ie-cndomain]] |
| 631 | ==== CN Domain |
| 632 | |
| 633 | This single-byte information element indicates the Core Network |
| 634 | Domain, i.e. if the message is related to Circuit Switched or Packet |
| 635 | Switched services. |
| 636 | |
| 637 | For backwards compatibility reasons, if no CN Domain IE is present |
| 638 | within a request, the PS Domain is assumed. |
| 639 | |
| 640 | .CN Domain Number |
| 641 | [options="header",cols="10%,90%"] |
| 642 | |=== |
| 643 | |Type|Description |
| 644 | |0x01|PS Domain |
| 645 | |0x02|CS Domain |
| 646 | |=== |
| 647 | |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 648 | [[gsup-ie-canctype]] |
| 649 | ==== Cancellation Type |
| 650 | |
| 651 | [packetdiag] |
| 652 | ---- |
| 653 | { |
| 654 | colwidth = 8 |
| 655 | node_height = 24 |
| 656 | |
| 657 | 0-6: PDP type IEI |
| 658 | 7: Res |
| 659 | 8-15: Length (1) |
| 660 | 16-23: Canc. Type Nr. |
| 661 | } |
| 662 | ---- |
| 663 | |
| 664 | .Cancellation Type Number |
| 665 | [options="header",cols="10%,90%"] |
| 666 | |=== |
| 667 | |Number|Description |
| 668 | |0x00|Update Procedure |
| 669 | |0x01|Subscription Withdrawn |
| 670 | |=== |
| 671 | |
| 672 | [[gsup-iei]] |
| 673 | ==== IE Identifier (informational) |
| 674 | |
| 675 | These are the standard values for the IEI. See the message definitions for the |
| 676 | IEI that shall be used for the encoding. |
| 677 | |
| 678 | .GSUP IE Identifiers |
| 679 | [options="header",cols="15%,35%,50%"] |
| 680 | |=== |
| 681 | |IEI|Info Element|Type / Encoding |
| 682 | |0x01|IMSI|Mobile Identity, 3GPP TS 04.08 Ch. 10.5.1.4 |
| 683 | |0x02|Cause|<<gsup-ie-cause>> |
| 684 | |0x03|Auth Tuple|<<gsup-ie-authtuple>> |
| 685 | |0x04|PDP Info Compl|<<gsup-ie-empty>> |
| 686 | |0x05|PDP Info|<<gsup-ie-pdpinfo>> |
| 687 | |0x06|Cancel Type|<<gsup-ie-canctype>> |
| 688 | |0x07|Freeze P-TMSI|<<gsup-ie-empty>> |
| 689 | |0x08|MSISDN|ISDN-AddressString/octet, <<gsup-ie-msisdn>> |
| 690 | |0x09|HLR Number|<<gsup-ie-hlr>> |
| 691 | |0x10|PDP Context ID|<<gsup-ie-pdpctxid>> |
| 692 | |0x11|PDP Type|<<gsup-ie-pdptype>> |
| 693 | |0x12|QoS|<<gsup-ie-qos>> |
| 694 | |0x20|RAND|<<gsup-ie-rand>> |
| 695 | |0x21|SRES|<<gsup-ie-sres>> |
| 696 | |0x22|Kc|<<gsup-ie-kc>> |
Harald Welte | ed9c53d | 2016-07-23 14:58:04 +0200 | [diff] [blame] | 697 | |0x23|IK|<<gsup-ie-ik>> |
| 698 | |0x24|CK|<<gsup-ie-ck>> |
| 699 | |0x25|AUTN|<<gsup-ie-autn>> |
| 700 | |0x26|AUTS|<<gsup-ie-auts>> |
| 701 | |0x27|RES|<<gsup-ie-res>> |
| 702 | |0x28|CN Domain|<<gsup-ie-cndomain>> |
Harald Welte | 9f1331b | 2016-02-20 10:56:10 +0100 | [diff] [blame] | 703 | |=== |
| 704 | |
| 705 | [[gsup-ie-empty]] |
| 706 | ==== Empty field |
| 707 | |
| 708 | This is used for flags, if and only if this IE is present, the flag is set. |
| 709 | The semantics depend on the IEI and the context. |
| 710 | |
| 711 | [packetdiag] |
| 712 | ---- |
| 713 | { |
| 714 | colwidth = 8 |
| 715 | node_height = 24 |
| 716 | |
| 717 | 0-6: PDP type IEI |
| 718 | 7: Res |
| 719 | 8-15: Length (0) |
| 720 | } |
| 721 | ---- |
| 722 | |
| 723 | [[gsup-ie-imsi]] |
| 724 | ==== IMSI |
| 725 | |
| 726 | The IMSI is encoded like in octet 4-N of the Called Party BCD Number |
| 727 | defined in 3GPP TS 04.08, 10.5.4.7. |
| 728 | |
| 729 | [packetdiag] |
| 730 | ---- |
| 731 | { |
| 732 | colwidth = 8 |
| 733 | node_height = 24 |
| 734 | |
| 735 | 0-6: PDP type IEI |
| 736 | 7: Res |
| 737 | 8-15: Length of IE content |
| 738 | 16-19: Digit 1 |
| 739 | 20-23: Digit 2 |
| 740 | 24-27: Digit ... |
| 741 | 28-31: Digit N |
| 742 | 32-39: see Note |
| 743 | } |
| 744 | ---- |
| 745 | |
| 746 | NOTE: Either '1 1 1 1 | Number digit N' (N odd) or 'Number digit N | |
| 747 | Number digit N-1' (N even), where N is the number of digits. |
| 748 | |
| 749 | [[gsup-ie-msisdn]] |
| 750 | ==== ISDN-AddressString / MSISDN / Called Party BCD Number |
| 751 | |
| 752 | The MSISDN is encoded as an ISDN-AddressString in 3GPP TS 09.02 and Called Party |
| 753 | BCD Number in 3GPP TS 04.08. It will be stored by the SGSN and then passed as is |
| 754 | to the GGSN during the activation of the primary PDP Context. |
| 755 | |
| 756 | [packetdiag] |
| 757 | ---- |
| 758 | { |
| 759 | colwidth = 8 |
| 760 | node_height = 24 |
| 761 | |
| 762 | 0-6: PDP type IEI |
| 763 | 7: Res |
| 764 | 8-15: Length of IE content |
| 765 | 16-19: NPI |
| 766 | 20-22: TON |
| 767 | 23: ext |
| 768 | 24-27: Digit 1 |
| 769 | 28-31: Digit 2 |
| 770 | 32-35: Digit ... |
| 771 | 36-39: Digit N |
| 772 | } |
| 773 | ---- |
| 774 | |
| 775 | [[gsup-ie-qos]] |
| 776 | ==== Quality of Service Subscribed Service |
| 777 | |
| 778 | This encodes the subscribed QoS of a subscriber. It will be used by the |
| 779 | SGSN during the PDP Context activation. If the length of the QoS data |
| 780 | is 3 (three) octets it is assumed that these are octets 3-5 of the TS |
| 781 | 3GPP TS 24.008 Quality of Service Octets. If it is more than three then |
| 782 | then it is assumed that the first octet is the Allocation/Retention |
| 783 | Priority and the reset are encoded as octets 3-N of 24.008. |
| 784 | |
| 785 | [packetdiag] |
| 786 | ---- |
| 787 | { |
| 788 | colwidth = 8 |
| 789 | node_height = 24 |
| 790 | |
| 791 | 0-6: PDP type IEI |
| 792 | 7: Res |
| 793 | 8-15: Length of IE content |
| 794 | 16-23: Payload |
| 795 | } |
| 796 | ---- |
| 797 | |
| 798 | [[gsup-ie-hlr]] |
| 799 | ==== HLR Number encoded as 3GPP TS 09.02 ISDN-AddressString |
| 800 | |
| 801 | The HLR Number is encoded as an ISDN-AddressString in 3GPP TS 09.02. It |
| 802 | will be stored by the SGSN can be used by the CDR module to keep a |
| 803 | record. |
| 804 | |
| 805 | [packetdiag] |
| 806 | ---- |
| 807 | { |
| 808 | colwidth = 8 |
| 809 | node_height = 24 |
| 810 | |
| 811 | 0-6: PDP type IEI |
| 812 | 7: Res |
| 813 | 8-15: Length of IE content |
| 814 | 16-19: NPI |
| 815 | 20-22: TON |
| 816 | 23: ext |
| 817 | 24-27: Digit 1 |
| 818 | 28-31: Digit 2 |
| 819 | 32-35: Digit ... |
| 820 | 36-39: Digit N |
| 821 | } |
| 822 | ---- |
| 823 | |
| 824 | [[gsup-ie-cause]] |
| 825 | ==== Cause |
| 826 | |
| 827 | This IE shall be encoded according to the 'GMM Cause' as described in |
| 828 | Chapter 10.5.5.14 of 3GPP TS 04.08. |