TMSI or Temporary Mobile Subscriber Identity
The TMSI a temporary mobile subscriber identity. There are chances that a hacker tool can intercept radio communication between a mobile device and a wired mobile core network. If all traffic is based on IMSI not on TMSI, the hacker can connect to the mobile network with the IMSI. It leads to simulating a full mobile device so that hackers can receive calls and SMS. To hide the actual identity TMSI is used. This has significance only when a mobile device is in roaming under certain areas. Roaming area change will cause to change of TMSI.
The radio interface keeps mapping to IMSI and TMSI, so that message coming from core network reaches to the correct mobile device. The communication between roaming and home network is based on om IMSI.
At a time a device may have three TMSIs, one allocated by MSC, allocated by SGSN and allocated by MME. The length is four bytes. All bits are 1, represents invalid TMSI.
MSC allocated temporary IMSI is Tmsi, SGSN allocated temporary IMSI is P-Tmsi (packet-tmsi). Allocated by MME is M-Tmsi.