4G/LTE - Network Architecture

 

 

 

HSS (Home Subscriber Server)

 

The HSS never carries a radio bearer, and it never appears in a NAS message. It still decides whether an attach succeeds. Every permanent fact about a subscriber lives there, and the MME works from a copy it was handed. This page follows what the HSS holds, how the MME asks for it, and what comes back.

 

See the description of SAE

What the HSS holds

A database is interesting for the facts nothing else holds. The HSS is the sole holder of two kinds of fact, and the two behave very differently. One kind never changes for the life of the subscription. The other changes every time the UE moves to a new MME.

The permanent half is the subscription itself. It starts with the IMSI, which names the subscriber, and it carries the long term key that authentication uses. The entitlements follow: whether the subscription is active, which access technologies it may use, and which APNs it may reach at what rate. The UE never sends any of it.

The changing half is a single fact, which is the MME currently serving this UE. 29.272 clause 5.2.1.1.1 gives Update Location that job in its opening line, to inform the HSS about the identity of the MME or SGSN currently serving the user. That one fact is what lets the network reach a subscriber again after the UE has moved.

Keeping that fact correct forces a second action. Clause 5.2.1.1.3 says the HSS shall send a Cancel Location Request to the previous MME and replace the stored MME-Identity with the received value. The registration is exclusive by construction. One MME holds the subscriber at a time, and the HSS enforces that by evicting the previous one rather than by asking it to yield.

The HSS stays in the home network. 33.401 titles clause 6.1.2 distribution of authentication data from HSS to serving network, and calls the HSS the user's home environment. A roaming UE is served by an MME in another operator's network, so every fact on this page crosses an operator boundary before anyone uses it.

  • The HSS holds what nothing else holds : the IMSI, the long term key, and the entitlements attached to them.
  • It also holds one live fact : which MME is serving this subscriber at this moment.
  • The registration is exclusive : a new Update Location makes the HSS cancel the previous MME rather than ask it.
  • It stays in the home network : when the UE roams, all of this crosses an operator boundary before it is used.

The S6a interface

The MME never reads the HSS database directly. One reference point carries everything between the two, and its command set is small enough to learn. 23.401 clause 4.2.3 defines S6a as the transfer of subscription and authentication data for authenticating and authorizing user access to the evolved system.

S6a runs Diameter. 29.272 fixes the application identifier at 16777251 and defines eight command pairs, numbered 316 to 323 without a gap. Each pair is a request and an answer sharing one code, so the eight codes cover sixteen messages. The table below gathers them.

Command pair

Abbreviation

Code

Started by

Update-Location-Request / Answer

ULR / ULA

316

MME

Cancel-Location-Request / Answer

CLR / CLA

317

HSS

Authentication-Information-Request / Answer

AIR / AIA

318

MME

Insert-Subscriber-Data-Request / Answer

IDR / IDA

319

HSS

Delete-Subscriber-Data-Request / Answer

DSR / DSA

320

HSS

Purge-UE-Request / Answer

PUR / PUA

321

MME

Reset-Request / Answer

RSR / RSA

322

HSS

Notify-Request / Answer

NOR / NOA

323

MME

Table 7.2.2/1 of 29.272 v19.5.0, with the initiating node taken from the clause 5.2 procedure descriptions

The last column splits four and four, and that split is the useful part. The MME starts Update Location, Authentication Information, Purge UE and Notify. The HSS starts Cancel Location, Insert Subscriber Data, Delete Subscriber Data and Reset. It reads as two conversations. The MME asks for what it needs in order to serve the UE, and the HSS pushes down changes the MME could not have known about.

Purge UE runs the other way, and the HSS records the result. 29.272 clause 5.2.1.3.1 has the MME use it once it has deleted the subscriber profile, for instance after days of inactivity. 23.008 then puts a UE purged in MME flag in the HSS, per IMSI record, as temporary subscriber data. The HSS therefore knows the MME no longer holds a copy.

Reset is the command worth remembering. 29.272 clause 5.2.4.1.1 has the HSS use it after a restart, to indicate to the MME and to the SGSN that a failure has occurred. An HSS that loses state cannot simply carry on, because MMEs elsewhere hold subscription copies it can no longer account for. Reset tells them to stop trusting those copies.

  • S6a is Diameter : application identifier 16777251, and nothing else runs on it.
  • Eight command pairs cover the whole interface : codes 316 to 323, with each request and answer sharing a code.
  • Four are started by each side : the MME asks for what it needs, and the HSS pushes changes down.
  • Reset exists because the MME keeps a copy : after an HSS restart the copies held elsewhere cannot be trusted.

What the HSS sends the MME

Attach is where the transfer becomes visible. The MME arrives holding nothing but an identity, and it leaves the procedure able to enforce what the UE may do. Everything in between came down S6a, and the figure below places it in the exchange.

The figure lays five messages on three lifelines: the MME, the HSS, and the MME that served this subscriber before. The two shaded bands mark the two phases. The numbering belongs to the figure, and the order follows 23.401 clause 5.3.2.1 from step 5a to step 11.

authentication location update MME HSS previous MME 1 AIR : IMSI and Visited-PLMN-Id 2 AIA : Authentication-Info with E-UTRAN-Vector 3 ULR : IMSI, and the MME identity to register 4 CLR : to the previous MME, if there was one 5 ULA : Subscription-Data for this subscriber

Figure 1. The five S6a messages an initial attach produces

  • Authentication comes first : the MME cannot trust the identity it is about to register until AIR and AIA have run.
  • Two arrows carry the whole subscription : the ULR registers the MME, and the ULA brings the profile back.
  • The Cancel Location goes to a third node : the HSS clears the previous MME before it answers, which is step 9.
  • Only the third lifeline can stay idle : a first attach has no previous MME, and that arrow simply does not happen.

23.401 step 11 says what comes back. The Subscription Data contain one or more PDN subscription contexts, and each one carries an EPS subscribed QoS profile and the subscribed APN-AMBR. 29.272 gives those contexts a name and a shape. They are APN-Configuration elements, and the tile below is the whole definition.

Following is based on 29.272 v19.5.0 (Release 19)

APN-Configuration ::= <AVP header: 1430 10415>
    { Context-Identifier }
   *2[ Served-Party-IP-Address ]
    { PDN-Type }
    { Service-Selection }
    [ EPS-Subscribed-QoS-Profile ]
    [ VPLMN-Dynamic-Address-Allowed ]
    [ MIP6-Agent-Info ]
    [ Visited-Network-Identifier ]
    [ PDN-GW-Allocation-Type ]
    [ 3GPP-Charging-Characteristics ]
    [ AMBR ]
   *[ Specific-APN-Info ]
    [ APN-OI-Replacement ]
    [ SIPTO-Permission ]
    [ LIPA-Permission ]
    [ Restoration-Priority ]
    [ SIPTO-Local-Network-Permission ]
    [ WLAN-offloadability ]
    [ Non-IP-PDN-Type-Indicator ]
    [ Non-IP-Data-Delivery-Mechanism ]
    [ SCEF-ID ]
    [ SCEF-Realm ]
    [ Preferred-Data-Mode ]
    [ PDN-Connection-Continuity ]
    [ RDS-Indicator ]
    [ Interworking-5GS-Indicator ]
    [ Ethernet-PDN-Type-Indicator ]
   *[ AVP ]

Three entries are mandatory, and they are the ones that decide the connection. Context-Identifier numbers the configuration, Service-Selection carries the APN name, and PDN-Type says whether the connection is IPv4, IPv6 or something else. The optional entries are where the policy sits. EPS-Subscribed-QoS-Profile sets the default bearer quality, and AMBR sets the rate cap that 29.272 calls the APN-AMBR.

The HSS can also change its mind later. Clause 5.2.2.1.1 gives Insert Subscriber Data as the way to push an administrative change down to an MME that is already serving the subscriber. Delete Subscriber Data removes part of the profile the same way. Both happen without the UE doing anything.

  • The MME enforces a profile it does not own : every restriction it applies arrived in one Update Location Answer.
  • The APN configuration is the useful part : the name, the PDN type, the default bearer QoS and the per APN rate cap.
  • Three entries are mandatory : Context-Identifier, PDN-Type and Service-Selection; the rest is policy.
  • A change does not wait for the UE : Insert Subscriber Data pushes it straight to the serving MME.

Authentication vectors

The long term key never leaves the home network, and it never reaches the MME. That leaves the MME unable to build a challenge of its own, so it has to ask for one. What comes back is a set of precomputed answers it can use without ever seeing the key.

The request is AIR, command code 318. 29.272 clause 5.2.3.1.1 makes three of its contents mandatory. They are the IMSI, the visited PLMN identity, and one of the two elements that says which radio technology the vectors are for. The answer carries an Authentication-Info element, and inside it one or more vectors of the shape below.

Following is based on 29.272 v19.5.0 (Release 19)

E-UTRAN-Vector ::= <AVP header: 1414 10415>
    [ Item-Number ]
    { RAND }
    { XRES }
    { AUTN }
    { KASME }
   *[ AVP ]

33.401 clause 6.1.2 gives the same four fields in words, as RAND, AUTN, XRES and KASME. The division of labour behind them matters. The AuC produces the base vector, and 29.272 clause 5.2.3.1.3 says that on receiving those vectors from the AuC, the HSS shall generate the KASME before it answers the MME.

That derivation explains why the visited PLMN identity is mandatory in the request. 33.401 makes CK, IK and the serving network identity the mandatory inputs to the key derivation function, so a vector computed for one visited network cannot be used in another. The specification states the benefit plainly. Binding the serving network identity authenticates that network implicitly, once the keys derived from KASME are used successfully.

Two smaller details are easy to miss. The UTRAN vector in the same clause carries CK and IK where the E-UTRAN one carries a single KASME, so the two are not interchangeable. And 33.401 recommends fetching one vector at a time rather than a batch, because a stored KASME already authenticates a service request without a fresh AKA run.

Resynchronisation uses the same command. The USIM rejects AUTN when the sequence number falls outside its window, and it hands back AUTS. The MME then sends a fresh AIR carrying Re-Synchronization-Info, which 29.272 clause 7.3.15 defines as the concatenation of RAND and AUTS.

  • The MME never holds the key : it holds precomputed vectors instead, and cannot make more of them.
  • Four fields make an EPS vector : RAND, XRES, AUTN and KASME.
  • The HSS derives the key, not the AuC : the AuC hands over the base vector and the HSS adds the serving network binding.
  • A vector belongs to one visited network : the serving network identity is a mandatory input to the derivation.
  • One at a time is the recommendation : 33.401 says the key hierarchy has removed the reason to fetch a batch.

Reference

[1] 23.401 : 3GPP - GPRS enhancements for E-UTRAN access, v20.0.0. Clause 4.2.3 defines the S6a reference point, and clause 5.3.2.1 gives the initial attach steps the figure above follows.

[2] 29.272 : 3GPP - MME and SGSN related interfaces based on Diameter protocol, v19.5.0. Clause 5.2 gives the eight procedures, Table 7.2.2/1 the command codes, clause 7.3.18 the E-UTRAN vector, clause 7.3.35 the APN configuration and clause 7.3.15 the resynchronisation element.

[3] 33.401 : 3GPP - SAE; Security architecture, v19.2.0. Clause 6.1.2 covers the distribution of authentication data from the HSS to the serving network, and the derivation of KASME.

[4] 23.008 : 3GPP - Organization of subscriber data, v19.0.0. The catalogue of subscriber data, including the UE purged in MME flag the HSS stores per IMSI record.