# Mobility management

Mobility management is one of the major functions of a GSM or a UMTS network that allows mobile phones to work. The aim of mobility management is to track where the subscribers are, allowing calls, SMS and other mobile phone services to be delivered to them.

## Location update procedure

A GSM or UMTS network, like all cellular networks, is basically a radio network of individual cells, known as base stations. Each base station covers a small geographical area which is part of a uniquely identified location area. By integrating the coverage of each of these base stations, a cellular network provides a radio coverage over a much wider area. For GSM, a base station is called a base transceiver station (BTS), and for UMTS it is called a Node B. A group of base stations is named a location area, or a routing area.
The location update procedure allows a mobile device to inform the cellular network whenever it moves from one location area to the next. Mobiles are responsible for detecting location area codes (LAC). When a mobile finds that the location area code is different from its last update, it performs another update by sending to the network, a location update request, together with its previous location, and its Temporary Mobile Subscriber Identity (TMSI).
The mobile also stores the current LAC in the SIM card, concatenating it to a list of recently used LACs. This is done to avoid unnecessary IMSI attachment procedures in case the mobile has been forced to switch off (by removing the battery, for example) without having a chance to notify the network with an IMSI detach and then switched on right after it has been turned off. Considering the fact that the mobile is still associated with the Mobile Switching Center/Visitor Location Register (MSC/VLR) of the current location area, there is no need for any kind of IMSI attachment procedures to be done.
There are several reasons why a mobile may provide updated location information to the network. Whenever a mobile is switched on or off, the network may require it to perform an IMSI attach or IMSI detach location update procedure. Also, each mobile is required to regularly report its location at a set time interval using a periodic location update procedure. Whenever a mobile moves from one location area to the next while not on a call, a random location update is required. This is also required of a stationary mobile that reselects coverage from a cell in a different location area, because of signal fade. Thus, a subscriber has reliable access to the network and may be reached with a call, while enjoying the freedom of mobility within the whole coverage area.
When a subscriber is paged in an attempt to deliver a call or SMS and the subscriber does not reply to that page then the subscriber is marked as absent in both the MSC/VLR and the Home Location Register (HLR) (Mobile not reachable flag MNRF is set). The next time the mobile performs a location update, the HLR is updated and the mobile not reachable flag is cleared.

## TMSI

The Temporary Mobile Subscriber Identity (TMSI) is the identity that is most commonly sent between the mobile and the network. Depending on the necessary precision, a TMSI may be set by a VLR, SGSN, or MME. In the least-precise case, TMSI is randomly assigned by the VLR to every mobile in the area, the moment it is switched on, in order to support identity confidentiality. The number is local to a location area, and so it has to be updated each time the mobile moves to a new geographical area.
The VLR, SGSN, and MME must be capable of correlating an allocated TMSI with the IMSI of the MS to which it is allocated. An MS may be allocated three TMSIs; one for services provided through the MSC (the TMSI), one for services provided through the SGSN (the packet-TMSI or P-TMSI), and one for the services provided the MME (the MME-TMSI or M-TMSI; a part of the GUTI).
The network can also change the TMSI of the mobile at any time. And it normally does so, in order to avoid the subscriber from being identified, and tracked by eavesdroppers on the radio interface. This makes it difficult to trace which mobile is which, except briefly, when the mobile is just switched on, or when the data in the mobile becomes invalid for one reason or another. At that point, the global "international mobile subscriber identity" (IMSI) must be sent to the network. The IMSI is sent as rarely as possible, to avoid it being identified and tracked.
A key use of the TMSI is in paging a mobile. "Paging" is the one-to-one communication between the mobile and the base station. The most important use of broadcast information is to set up channels for "paging". Every cellular system has a broadcast mechanism to distribute such information to a plurality of mobiles.
Size of TMSI is 4 octet with full hex digits but can't be all FF because the SIM uses 4 octets with all bits equal to 1 to indicate that no valid TMSI is available.

## Roaming

Roaming is one of the fundamental mobility management procedures of all cellular networks. Roaming is defined as the ability for a cellular customer to automatically make and receive voice calls, send and receive data, or access other services, including home data services, when travelling outside the geographical coverage area of the home network, by means of using a visited network. This can be done by using a communication terminal or else just by using the subscriber identity in the visited network. Roaming is technically supported by a mobility management, authentication, authorization and billing procedures.

## Types of area
### Location area

A "location area" is a set of base stations that are grouped together to optimize signaling. Typically, tens or even hundreds of base stations share a single Base Station Controller (BSC) in GSM, or a Radio Network Controller (RNC) in UMTS. The BSC / RNC is the intelligence behind the base stations; it handles allocation of radio channels, receives measurements from the mobile phones, and controls handovers between base stations.
Each location area has an assigned unique identifier, made up of numbers, called a "location area code" (LAC). The LAC is broadcast by each base station at regular intervals. Within a location area, each base station is assigned a distinct "cell identifier" (CI) number, see also Cell Global Identity.
If the location areas are large and moderately populated, there will likely be a high number of mobiles operating simultaneously, resulting in very high paging traffic. This is due to the fact that every paging request has to be broadcast to every base station in the location area. Ultimately, this wastes bandwidth and power on mobile devices by requiring them to listen for broadcast messages too often. Similarly if on the other hand, there are too many small location areas, the mobile device must contact the network very often for changes of location, which will also drain the device’s battery. Therefore, it is important to strike a balance between the size of the location area and the number of mobile device users in the location area.

### Routing area

The routing area is the packet-switched domain equivalent of the location area. A "routing area" is normally a subdivision of a "location area". Routing areas are used by mobiles which are GPRS-attached. GPRS is optimized for "bursty" data communication services, such as wireless internet/intranet, and multimedia services. It is also known as GSM-IP ("Internet Protocol") because it will connect users directly to Internet Service Providers
The bursty nature of packet traffic means that more paging messages are expected per mobile, and so it is worth knowing the location of the mobile more accurately than it would be with traditional circuit-switched traffic. A change from routing area to routing area (called a "Routing Area Update") is done in an almost identical way to a change from location area to location area. The main differences are that the "Serving GPRS Support Node" (SGSN) is the element involved.

### Tracking area

The tracking area is the LTE counterpart of the location area and routing area. A tracking area is a set of cells. Tracking areas can be grouped into lists of tracking areas (TA lists), which can be configured on the User Equipment (UE). Tracking area updates are performed periodically or when the UE moves to a tracking area that is not included in its TA list.
Operators can allocate different TA lists to different UEs. This can avoid signaling peaks in some conditions: for instance, the UEs of passengers of a train may not perform tracking area updates simultaneously.
On the network side, the involved element is the Mobility Management Entity (MME). MME configures TA lists using NAS messages like Attach Accept, TAU Accept or GUTI Reallocation Command.