Wire Lab 讀書會
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 蔡瀚興-讀書會-21/08/11 ## <font color="ff0000">Introduction</font> 在使用服務后,當在ECM/RRC-connected狀態或者ECM/RRC-idle狀態下使用者可能被網路或者UE去附著。 ## <font color="ff0000">Cases of Detach</font> - If the user is properly detached, GUTI, a NAS-level user ID, and the security context that he used to access the network are kept valid in the UE and the MME - Detach can be triggered by UE or a network. Network-triggered detach is caused by either MME or HSS. (Detach 可以分為以下幾種) ### <font color="0000ff">1) Detach Case 1: UE-initiated Detach</font> - if UE is turned off - if a USIM card is removed from UE - if UE is attempting to use a non-EPS service (e.g. CS fallback, SMS, etc.) ### <font color="0000ff">2) Detach Case 2: MME-initiated Detach</font> #### **1. Explicit Detach (MME會先通知UE)** - for an operator’s O&M (Operation & Maintenance) purposes - if re-authentication fails - if it cannot provide the resources allocated to a user #### **2. Implicit Detach (MME不會先通知UE)** - if it is not able to communicate with a user ### <font color="0000ff">3) Detach Case 3: HSS-initiated Detach</font> HSS can initiate detach: - if the user profile provisioned in HSS is changed, and thus the one saved in MME also has to be changed - if an operator is trying to restrict access by an illegal UE (e.g. a stolen device) to its network ![](https://i.imgur.com/jdlM0EN.png) ## <font color="ff0000">UE-initiated Detach</font> ![](https://i.imgur.com/79dLkUH.png) ### <font color="0000ff">1. Detach Triggering by UE</font> #### **(1) [UE -> MME] Detach Request** Detach Request message的內容會根據傳遞方向有所不同,以下為UE向MME ![](https://i.imgur.com/hv0wZF0.png) #### **(2) [UE] Handling Security and Bearer Contexts** UE儲存current的NAS security context,GUTI和TA information,然後刪除EPS bearer context #### **(3) [MME] Noticing Detach Intent and Handling Security Context** 在收到Detach Request message後,MME儲存user’s current NAS security context,然後確認是哪一種Detach ### <font color="0000ff">2. EPS Session Termination</font> 一旦MME感知到UE發起的detach並存儲使用者當前NAS安全上下文,請求對已經啟動EPS會話的終止。 這個請求觸發PCEF(PGW)發起EPS終止,釋放所有分配給使用者的網路/無線資源。 #### **(1) EPS Bearer Release and PCC Rule Removal** #### **(2) S1 Signaling Connection Release** ## <font color="ff0000">MME-initiated Detach</font> 圖3顯示了MME發起的 **explicit detach** 是怎麼執行的。 ![](https://i.imgur.com/0yi2Low.png) ### <font color="0000ff">1. Detach Triggering by MME</font> If the user is in Idle state at this time, the MME performs paging to establish S1 signaling connection #### **(1) [UE <- MME] Detach Request** ![](https://i.imgur.com/vskAFjG.png) #### **(2) [MME] Handling Security Context** #### **(3) [UE] Noticing Detach Intent and Handling Security and Bearer Contexts** `在接收到MME發送的detach request后,UE獲知MME detach的意圖。 UE檢查detach的類型是否需要在detach之後重新attach。` ### <font color="0000ff">2. EPS Session Termination</font> 一旦MME存儲NAS安全上下文,MME請求PGW終止使用者的EPS會話。 #### **(1) EPS Bearer Release and PCC Rule Removal** `通過4)~13),MME請求終止使用者EPS會話,PCEF一旦接收到請求刪除PCC規則,刪除S5承載資源。 在MME發起的detach中需要重新attach時,MME可以保存當前的UE-AMBR,在下次重新attach時UE可以更快的建立EPS承載。` ##### **14) [UE -> MME] Acknowledging Detach** 一旦接收到detach request消息,在存儲NAS安全上下文和刪除EPS承載上下文之後,UE發送detach accept消息作為detach request像愛惜的回應。 :::info **Note:** 對於implicit detach的情況,1)14)16)步驟是跳過的。 ::: #### **(2) S1 Signaling Connection Release** ## <font color="ff0000">HSS-initiated Detach</font> ![](https://i.imgur.com/wVEDte2.png) ### <font color="0000ff">1. Detach Triggering by HSS</font> #### **1) [MME <- HSS] Detach Request** ![](https://i.imgur.com/z6ozjQy.png) ### <font color="0000ff">2. EPS Session Termination</font> 一旦從HSS接收到Cancel Location Request (CLR) 消息,MME釋放之前分配給UE的所有資源。 這個步驟和MME發起detach的過程是一樣的,**除了在 2)中描述的額外的步驟**。 #### 2) [MME -> HSS] Responding to Detach Request `一旦從UE接收到detach accept消息,和從SGW接收到delete session response消息,MME會發送給HSS Cancel Location Answer消息作為Cancel Location Request消息的回應。` ## <font color="ff0000">EPS Entity Information: Before/After Detach</font> ### <font color="0000ff">Before Detach</font> ![](https://i.imgur.com/ApiMOtF.png) ### <font color="0000ff">After Detach</font> - After detach, information that can be used for the user’s fast and secured attach next time is stored in UE and MME - All other contexts related to the user, such as NAS security context, GUTI and TAI information allocated by MME, etc., are deleted. ![](https://i.imgur.com/FN01EFn.png) ![](https://i.imgur.com/ZdRuC9o.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully