CLR/CLA(Cancel-Location-Request/Answer)


Initiation of CLR from HSS.

CLR (Cancel-Location-Request) triggered by HSS in following scenarios.
1) Subscription is withdrawal for a user (IMSI).
2) To inform previous MME/SGSN about change in location.
3) To inform MME/SGSN about initial attach.



There could be 3 kinds of control nodes 
1) Stand-alone MME
2) Stand-alone SGSN
3) Combined MME/SGSN


1) Subscription is withdrawal for a user (IMSI).
Now let discuss how Subscription withdrawal take place, HSS sends CLR to MME/SGSN or on combined for a IMSI that is already provisioned at HSS and attached at-least once (ULR/ULA successfully performed). Following table shall help you to understand how HSS send CLR and how MME handles it.

 Sent To
Cancellation-type
CLR-Flag
Description
MME-1
SUBSCRIPTION_WITHDRAWAL
 Not Required

SGSN-1
SUBSCRIPTION_WITHDRAWAL
 Not Required

Combined-1
SUBSCRIPTION_WITHDRAWAL
 Not Required
Delete Both data.
CLR-Flag required only when Cancellation type is INITIAL_ATTACH on combined node.


2) To inform previous MME/SGSN about change in location.
When UE moves/changes it location then it may go from one MME area to another, HSS informs old MME about change of location by sending CLR with MME_UPDATE_PROCEDURE so that  context (MM and Bearer context) can be transferred to New MME over s10 interface. Old MME shall delete (MM and Bearer context) data. Following image clears the idea, it is immaterial that MME is of HOME or Foreign.




Similarly UE is attached to SGSN and goes to new SGSN then HSS shall inform old SGSN by sending CLR with SGSN_UPDATE_PROCEDURE so that context can be transferred to New SGSN.Old SGSN shall delete (MM and Bearer context) data.




3) To inform MME/SGSN about initial attach
In case of Initial attach previous node shall not delete the data. while previous node is combined node and CLR Flag "S6a/S6d-Indicator" is set then only MME data to be deleted. CLR with "INITIAL_ATTACH_PROCEDURE " flag shall only be trigger-red when MME sends Initial attach Indication in ULR Flag. Initial attach generally take place in Emergency situations

 Sent To
Cancellation-type
CLR-Flag
Description
MME
INITIAL_ATTACH_PROCEDURE
 Not Required

SGSN
INITIAL_ATTACH_PROCEDURE
 Not Required

Combined
INITIAL_ATTACH_PROCEDURE
S6a/S6d-Indicator
Only MME Data is deleted
CLR-Flag required only when Cancellation type is INITIAL_ATTACH on combined node.






Your Comments /Suggestions and Questions are always welcome,  shall clarify with best of knowledge. So feel free to put Questions.

31 comments:

  1. Hi,

    Anyone knows what is importance of waiting for Cancel Location Answer from Old MME before sending Update Location Answer to New MME from HSS ?

    What if HSS replies back ULA to new MME without waiting for CLA from old MME.

    ReplyDelete
    Replies
    1. Hi Bhushan

      May I know if you got an answer for this query? Any answers based on specs?

      Delete
    2. Hi Sudheer,

      I did post this query to some other forum, It is required to wait for CLA to exchange context from old MME in order to continue session from new location.

      Delete
    3. HSS should not wait for CLA to send ULA. These operations could be asynchronous. As per standard only PUR and NOR could come to HSS and HSS have procedures to handle it.

      PUR:
      If the received identity does not match the stored MME-identity and does not match the stored SGSN-identity, the HSS shall clear the PUA flags "freeze M-TMSI" and "freeze P-TMSI in the answer message.

      NOR:
      If the IMSI is known, and the source MME or SGSN originating the Notify message is not currently registered in HSS for that UE, a result code of DIAMETER_ ERROR_ UNKNOWN_SERVING_NODE shall be returned.

      Delete
    4. Hi Ajay,

      Then How it transfers context information from old to new MME if CLA response is not awaited. As per above diagram, It shows exchange of bearer context. Can you point to any specification for this clarification of not waiting for CLA?

      Delete
    5. Hi Bhushan,

      In Context information transfer, Context information is not transferred via HSS. It is directly shared by MMEs over s10 interface using Identification Request/Response, Context Request/Respose etc messages.

      Delete
    6. So, HSS need not wait for CLA to send ULA. MMEs can take care of context transfer. I saw the same behavior with HSS which i studied. Thanks for reply.

      Delete
    7. HSS never waits form CLA. It Sends CLR and immediately to old MME and send ULA to new MME. Remember this is because from HSS perspective it is priority to complete the attach transaction. Even if the Old MME looses the CLR, the attach should not wait/timeout/fail on the new MME. That's from HSS standpoint and it never cares how and when the inter-MME context is transferred over S10, it is not in its purview.

      Delete
  2. Is there open source tool to simulate S6a request/response with HSS over SCTP ?

    ReplyDelete
    Replies
    1. Hi Bhushan,

      Seagull is one of the open source tool to that is used to simulate multiple protocols including diameter.

      Thanks for your query.
      Happy to help you again.
      Team-Diameter

      Delete
    2. Thanks for the reply.

      I tried to simulate with seagull using SCTP but somehow it fails when Server sends DWR request. Connection gets broken.
      Works fine with TCP.

      Delete
  3. Hi,

    I have a question, how CLR works in case MME is connected to HSS via DRA/DEA. In one case HSS is connected to MME via DRA/DEA and when location in HSS is CANCELED by command, HSS does not send CLR message towards MME via DRA/DEA connection although MME record is correctly update in HSS when diameter signaling is established with MME via DRA/DEA.

    CLR message is sent from HSS and can be seen in HSS-MME interface when MME has direct diameter signaling with HSS (without) DRA/DEA.

    ReplyDelete
    Replies
    1. Asif, Having DRA and not has nothing to do with call flow. DRA behaves like a proxy switch passing information from one side to other. When HSS sends a CLR to a Particular MME, the destination host (for Diameter message) and CdPA (for SS7) would have the MME identity. Then if HSS is connected to DRA, it's DRA's headache to route it properly to the destination. It is similar to SS7 network where STPs route messages to the VLR. No VLR is directly connected to HLR but the CanLoc is routed through STPs.

      Delete
    2. Asif, Having DRA and not has nothing to do with call flow. DRA behaves like a proxy switch passing information from one side to other. When HSS sends a CLR to a Particular MME, the destination host (for Diameter message) and CdPA (for SS7) would have the MME identity. Then if HSS is connected to DRA, it's DRA's headache to route it properly to the destination. It is similar to SS7 network where STPs route messages to the VLR. No VLR is directly connected to HLR but the CanLoc is routed through STPs.

      Delete
  4. Hi Asif

    Thanks for your query.

    |HSS| <---> CLR <---> |DRA| <---> CLR <---> |MME|

    It is not necessary that HSS must be directly connected to MME.

    Happy to help you again.
    Team-Diameter



    ReplyDelete
  5. Hi Mates. Just a query.

    If subscriber has run out his balance, a CL type 'SW' is sent to the VLR.

    Could be the CL 'SW' sent again if subscriber retries attachment in the same network? Is the CL 'SW' sent just once?

    ReplyDelete
  6. HSS require FQDN naming while executing s6a message ????

    ReplyDelete
    Replies
    1. Elaborate your question.

      I think below details will help you to find correct answer.

      Origin-Host AVP:
      The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and it MUST be present in all Diameter messages.


      DiameterIdentity AVP Format.
      DiameterIdentity = FQDN/Realm

      Delete
  7. What I dont understand and is not even mentioned in the spec properly, why is it needed for old MME to retain the subscriber profile if the CLR contains the 'Initial Attach' bit set?

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete

  9. Please let me know at what situation/scenario/flag/configuration HSS should send CLR with cancellation type as INITIAL_ATTACH_PROCEDURE.Actually if MME changes I found HSS sending CLR with cancellation type as MME update procedure if ULR comes from different MME and old MME having the context.Whatever explained above in scenario 3 that in ULR flag MME should set intial attach indicator then only HSS will send CLR with cancellation type as INITIAL_ATTACH_PROCEDURE.But how HSS will now that MME has changed becoz in normal attach scenario also MME is including that ULR flags Initial-Attach-Indicator. Please clarify

    ReplyDelete
    Replies
    1. Hi Babu,

      -1)HSS shall set INITIAL_ATTACH_PROCEDURE when it receives indication of initial attach under ULR-Flag field in Update location.

      2)HSS save MME identity at its database for each subscriber, if received Update location is not from already save MME identity means MME is changed.

      3)If you want to know when MME shall do Update procedure and when initial attach then here are some of the scenarios of Update location.
      -- If UE (User Equipment) detects it has entered New TA (Tracking Area)

      --Periodic TA update timer is expired
      --UE Reselects E-Utran
      --Tracking Area Update initiated because of Load Balancing etc.


      Initial attach
      - Very First attach, emergency attach etc.


      Hope it suffice you.


      Delete
    2. For point 1: In our network, I only found CLR with cancellation type as 'MME update procedure' whenever MME changes. I never found CLR with cancellation type as 'Initial attach procedure'.May be scenario will be like user attached with MME and now when it goes to SGSN.It might send CLR to MME with initial attach.

      Delete
    3. Yes, you are right

      This is also one of the case where Intial attach is send when UE already attached to MME or SGSN and going for other network SGSN or MME repectively.

      For more details please refer 3gpp 23401

      Thanks.

      Delete
  10. Hi All, If the HSS send a cancel location with subscription withdrawal, and the mobile has an active bearer, (Eg: user is browsin internet), is the bearer terminated?. Thanks.

    ReplyDelete
    Replies
    1. Hi Luis,

      Bearer shall terminate if CLR is received with Subscription withdrawal.


      Happy to help you again.

      Delete
  11. Hello,
    Can you please anyone confirm this : If i will delete IMSI record ( i mean the particular IMSI) from HSS database then which Cancel type it should send : MME_UPDATE_PROCEDURE or SUBSCRIPTION_WITHDRAWAL

    Thanks

    ReplyDelete
    Replies
    1. SUBSCRIPTION_WITHDRAWAL

      Thanks.


      Delete
    2. Thank you so much Dinesh for your reply.

      Delete
  12. This comment has been removed by the author.

    ReplyDelete