Section: 2.4 Structure of TMSI
Content: Since the TMSI has only local significance (i.e. within a VLR and the area controlled by a VLR, or within an SGSN and the area controlled by an SGSN, or within an MME and the area controlled by an MME), the structure and coding of it can be chosen by agreement between operator and manufacturer in order to meet local needs. The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation. In order to avoid double allocation of TMSIs after a restart of an allocating node, some part of the TMSI may be related to the time when it was allocated or contain a bit field which is changed when the allocating node has recovered from the restart. In areas where both MSC-based services and SGSN-based services are provided, some discrimination is needed between the allocation of TMSIs for MSC-based services and the allocation of TMSIs for SGSN-based services. The discrimination shall be done on the 2 most significant bits, with values 00, 01, and 10 being used by the VLR, and 11 being used by the SGSN. If intra domain connection of RAN nodes to multiple CN nodes as described in 3GPP TS 23.236[ Intra-domain connection of Radio Access Network (RAN) nodes to multiple Core Network (CN) nodes ]  [23] is applied in the MSC/VLR or SGSN, then the NRI shall be part of the TMSI. The NRI has a configurable length of 0 to 10 bits. A configurable length of 0 bits indicates that the NRI is not used and this feature is not applied in the MSC/VLR or SGSN. The NRI shall be coded in bits 23 to 14. An NRI shorter than 10 bits shall be encoded with the most significant bit of the NRI field in bit 23. The TMSI shall be allocated only in ciphered form. See also 3GPP TS 43.020[ Security related network functions ]  [7] and 3GPP TS 33.102[ 3G security; Security architecture ]  [42]. The network shall not allocate a TMSI with all 32 bits equal to 1 (this is because the TMSI must be stored in the SIM, and the SIM uses 4 octets with all bits equal to 1 to indicate that no valid TMSI is available). To allow for eventual modifications of the management of the TMSI code space management, MSs shall not check if an allocated TMSI belongs to the range allocated to the allocating node. MSs shall use an allocated TMSI according to the specifications, whatever its value.