HLR and VLR in GSM Explained: Roles, Location Updates, AuC and EIR

Cyber Security3 min read
HLR and VLR in the GSM network architecture
On this page

In a GSM mobile network, two databases keep track of every subscriber: the HLR (Home Location Register), which holds permanent subscriber data, and the VLR (Visitor Location Register), which holds temporary data about subscribers currently in a particular area. Together they let the network know who you are and where you are, so calls and messages can reach you.

Where they sit in the GSM architecture

PartComponentsRole
Mobile station (MS)Phone (ME) and SIMThe subscriber’s device and identity
Base station subsystem (BSS)BTS (radio), BSC (controller)Radio access
Network switching subsystem (NSS)MSC, VLR, HLR, AuC, EIRSwitching, mobility, subscriber data and security

The VLR is usually integrated with the MSC (mobile switching centre) that serves an area; the HLR is a central database of the home network.

The HLR: permanent data

DataExample
IMSIThe subscriber identity stored on the SIM
MSISDNThe phone number
Subscribed servicesVoice, SMS, data, roaming, call forwarding
Current locationAddress of the VLR/MSC currently serving the subscriber

The HLR works with the AuC (Authentication Centre), which stores each subscriber’s secret key Ki and generates authentication data.

The VLR: temporary data

DataExample
TMSITemporary identity used over the air instead of the IMSI, for privacy
Location areaWhich group of cells the phone is in
Copy of subscriber profileFetched from the HLR when the subscriber arrives
Authentication dataTriplets received via the HLR and AuC

The location update, step by step

  1. The phone enters a new location area and sends a location update request to the serving MSC/VLR.
  2. The VLR authenticates the subscriber with data from the HLR/AuC (a challenge RAND, expected response SRES and cipher key Kc).
  3. The VLR informs the HLR of the subscriber’s new location.
  4. The HLR tells the old VLR to delete the subscriber and sends the subscriber profile to the new VLR.
  5. The new VLR assigns a new TMSI.

When someone calls you, the network asks the HLR where you are, the HLR asks the current VLR for routing information, and the call is delivered to the right MSC.

EIR: the equipment register

The EIR stores lists of device identities (IMEI): allowed, monitored and blocked (for example stolen phones).

From GSM to 4G and 5G

GSM / 3G4G LTE5G
HLR + AuCHSSUDM + AUSF
VLR / MSC mobilityMMEAMF
SS7 / MAP signallingDiameterService-based interfaces (HTTP/2)

Security notes

HLR and VLR communicate over SS7 signalling, which was designed for trusted operators. Research and real incidents have shown that misuse of SS7 access can reveal subscriber location or intercept SMS, which is why operators now deploy signalling firewalls and why newer generations use better-protected protocols. For researchers, software defined radio and open-source network stacks make it possible to study these systems in lab environments.

Related guides: LTE network architecture, GPRS vs EDGE.

Frequently asked questions

What is the difference between HLR and VLR?

The HLR is the permanent home database for subscribers; the VLR is a temporary database for subscribers currently in an MSC’s area.

Where is the VLR located?

Usually integrated with the MSC that serves a geographic area.

What is stored in the HLR?

IMSI, phone number (MSISDN), subscribed services and the address of the subscriber’s current VLR.

What replaced the HLR in LTE?

The HSS (Home Subscriber Server), and in 5G the UDM.

What is a TMSI?

A temporary identity assigned by the VLR and used over the air to avoid sending the permanent IMSI.

Learn cellular networks end to end

Our Cellular Networks from GSM to 5G course explains GSM, LTE and 5G architecture, signalling and security, and our Software-Defined Radio course shows how to receive and analyse the radio side.

Written by

Taifun Mamedov

Founder and instructor at Ocsaly Academy.

Courses by Taifun Mamedov

Share this article