Wire Lab 讀書會
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
        • 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/07 :::info - [x] 閱讀 Netmanias-11-EMM Procedure 1. Initial Attach - Part 2 ::: ## Initial Attach Procedure ![](https://i.imgur.com/xFibelD.png) ### IMSI Acquisition 當 IMSI Acquisiton 這個步驟結束時,MME 會從 UE 端獲得 IMSI,整個流程如下: - UE 發送 Attach Request 以嘗試初始化網路接觸。 - MME 會接收到來自 UE 的 IMSI。 ![](https://i.imgur.com/fMVlzfK.png) 為了達到這個目的,上述的流程又可以被細分為兩個子步驟: 1. The UE stays in the initial state after radio link synchronization. 2. The UE establishes ECM connection for delivering an Attach Request message to the MME. 至於 ECM Connection 的建立階段也可以被進一步的分成兩個子階段: 1. RRC connection establishment 2. S1 signaling connection establishment. #### Initial State after Radio Link Synchronization 為了讓 UE 順利發送 Initial attach 到網路端,通訊的部分尤其重要。 為此,UE 透過 PLMN Selection 以及 Cell search procedure 去選擇 eNB,且做了 radio link synchronized。 此時,User可以與 eNB 做通訊 ( UE 處於 EMM-Deregistered, ECM-Idle, and RRC-Idle state 的狀態下)。 #### ECM Connection Establishment 在 NAS 層上,UE 發送了 Attach Request message 以要求 MME 完成 initial attach。 為了達到上述目的,UE 與 eNB 之間的 ECM connection, RRC connection 以及 MME 與 eNB 之間的S1 signaling connection 都是必備的。 NAS messages 會被當作 RRC messages 發送,當通過 RRC connection 時,作為 S1AP messages 通過 S1 signaling connection。 1. RRC Connection ![](https://i.imgur.com/oj2G7T4.png) 2. S1 Signaling Connection Establishment eNB 與 MME 之間的 Control messages 通過 S1-MME interface 內嵌到 S1AP messages 再被發送出去。 S1AP messages 會通過為每個用戶所建立的 S1 signaling connections 發送出去,S1 signaling connections 由 ID pair 定義。 > ID pair 被 eNB 與 MME 分配以分辨 UEs。 ### Authentication ![](https://i.imgur.com/17MqoaW.png) > 這部分之前已經提過,不補充。 ### NAS Security Setup ![](https://i.imgur.com/btyYRwA.png) ### Location Update 當 LTE Authentication 與 NAS Security Setup 完成後,MME 就取得了 Subscriber 的資訊,最後,MME 會通知 HSS 訂閱戶已經註冊到網路中且被定位於 TAs 中。 ![](https://i.imgur.com/ucgmWKy.png) ![](https://i.imgur.com/w2iXy8S.png) ### EPS Session Establishment ![](https://i.imgur.com/YHfJlLx.png) #### 1. [MME] Assigning EPS Bearer ID The MME selects a value from 5~15, and allocates it as an EPS Bearer ID (EBI) in order to establish a default EPS bearer for the newly attached user. #### 2. [MME] Selecting P-GW The MME checks the APN received from the HSS, and decides to which P-GW to connect to access the APN. This decision can be made based on the subscription information received from the HSS (specifically, P-GW ID). 如果 HSS 沒有相關訊息,MME 會去查詢 DNS server 以取得 APN 的 FQDN (像是: internet.apn.epc.mnc05.mcc450.3gppnetwork.org),以及按照 P-GW selection policies 從返回的 P-GW IP addess list 選擇一個 IP。 同時間,也會選擇要走訪哪一個 S-GW。 #### 3. [MME -> S-GW] Request for EPS Session Creation MME 與 S-GW 通過 S11 介面使用 GTP Protocol 達到 Control plane 的通訊。 MME 在上一個步驟所提到的 S-GW selection 中會發送 Create Session Request,它包含了這些參數: ![](https://i.imgur.com/Fx1uA77.png) #### 4. [S-GW -> P-GW] Request for EPS Session Creation P-GW 與 S-GW 通過 S5 介面使用 GTP Protocol 達到 User plane 與 Control plane 的通訊。 S-GW 為了收到 Creation Session Request message 分配 downlink S5 TEID (S5 S-GW TEID) 以建立 S5 GTP。 ![](https://i.imgur.com/O4SdZVV.png) #### 5. [S5 Bearer: Downlink] Once Step 4) is completed, the downlink S5 GTP-U tunnel is created, allowing the P-GW to send downlink traffic to the S-GW. #### 6. [P-GW] Allocating User IP Address The P-GW, upon receiving the Create Session Request message, realizes the user is attempting to access the network again with IMSI. So, it allocates an IP address to the UE so that the UE can use it when using APN. #### 7. [P-GW -> PCRF] Notifying of EPS Session Setup The P-GW and the PCRF communicate over Gx interface using Diameter protocol. When creating an EPS session for a user, resources allocation and QoS control for the user must be determined based on the services that the user is subscribing to. It is PCRF that is in charge of controlling policies concerning all the users who accessed to the network. So, the P-GW provides the PCRF with subscription information about the user, and obtains the PCRF’s authorization for resources allocation in accordance with the network operator’s policies. From the UE’s subscription information received from the MME, the P-GW gathers information required for the PCRF’s decision-making on the operator’s policies, and sends it to the PCRF through a CCR (CC-Request) message. An example of the message is as follows: ![](https://i.imgur.com/aIYG74q.png) #### 8. [PCRF -> SPR] Requesting Access Profiles The PCRF requests the SPR for the user’s access profile to determine PCC policies for the user. #### 9. [PCRF <- SPR] Returning Access Profiles The SPR returns an access profile for the user. The profile may include information such as SDF Filter, QCI, ARP, APN-AMBR (UL/DL), Charging Method (e.g. Offline), Changing Reporting Action (e.g. Start Reporting ECGI, TAI), etc. #### 10. [PCRF] Determining Policies The PCRF determines PCC policies for the EPS session to be established based on the user access profile. #### 11. [P-GW <- PCRF] Acknowledging EPS Session Establishment he PCRF delivers the PCC policies determined in Step 10) to the P-GW, as included in a CCA (CC-Answer) message. An example of the message is as follows: ![](https://i.imgur.com/4cKEIGo.png) #### 12. [P-GW] Policy Enforcement The P-GW applies the PCC policies received from the PCRF. As the PCC policies are applied to each SDF, the P-GW sets up mapping between SDFs and the EPS bearer, and prepares a QoS profile to be applied to the default EPS bearer. #### 13. ~ 15. EPS Session Creation Response ![](https://i.imgur.com/Er2fRgi.png) The P-GW informs the MME of the QoS information applied to the established EPS sessions and default EPS bearer, by sending it in a Create Session Response message. The PCRF may decide to keep the value the MME received from the HSS, or select a new value. #### 16. [MME] Why MME Keeps S5 P-GW TEID? Once attached to a network, if a UE performs a TAU or handover, its S-GW may be changed. For this reason, the MME informs the UE’s new S-GW of the uplink S5 TEID so that the new S-GW can deliver uplink traffic to the P-GW. #### 17. [S1 Bearer: Uplink] Create S1 TEID (UL) Completing Step 15 establishes the uplink S1 GTP-U tunnel. However, since the eNB does not have this value (S1 S-GW TEID) yet, it cannot deliver uplink traffic to the S-GW at this time. #### 18. [MME] Calculating UE-AMBR Now, the MME returns an Attach Accept message to the UE as a response to the Attach Request message, and prepares for E-RAB setup (i.e. for allocating resources to radio link and S1 bearer) by controlling the eNB. For this, the MME calculates the UE-AMBR value to send to the eNB. The MME has already received the UE-AMBR value, as included in subscription information, from the HSS. However, it can adjust the value to the extent not exceeding the total APN-AMBR of each APN, and allocates it instead. ![](https://i.imgur.com/6kE2h4e.png) #### 19. Determining Information needed for E-RAB and NAS Signaling ![](https://i.imgur.com/YeV6tJU.png) #### 20. [UE <- MME] Attach Accept The MME includes information, such as the UE IP address allocated by the P-GW, the GUTI, TAI list, EPS Bearer ID, UE-AMBR values allocated by itself, and QoS parameters received from the S-GW, in the Attach Accept message, and sends it to the UE as a response to the Attach Request message. This message is delivered as included in the **Initial Context Setup Request** message through the S1 signaling connection, and then in the **RRC Connection Reconfiguration** message through the RRC connection. #### 21. [MME] Creating $K_{eNB}$ The MME creates $K_{eNB}$, the AS security base key, from $K_{ASME}$. This is to ensure the eNB can generate AS security keys to be used for secured communication between the eNB and the UE over radio link. #### 22. [eNB <- MME] Requesting E-RAB Setup ![](https://i.imgur.com/3HsMv9Q.png) #### 23. [S1 Bearer: Uplink] Receive S1 TEID (UL) When the eNB receives the MME’s Initial Context Setup Request message that requests E-RAB setup, it sets up DRB by sending an Attach Accept message to the UE. Then, it completes S1 bearer setup by including a downlink S1 TEID in the Initial Context Setup Response message, and sending the message as a response to the Initial Context Setup Request message to the MME, so that the MME can forward it to the S-GW. #### 24. - 27. AS Security Setup ![](https://i.imgur.com/nVnXCbV.png) #### 28. - 29. DRB Establishment ![](https://i.imgur.com/m9hfUW6.png) #### 30. [eNB -> S-GW] E-RAB Setup Response The eNB allocates a downlink S1 TEID (S1 eNB TEID) for S1 bearer. Then it includes the allocated ID in an Initial Context Setup Response message, and sends it to the MME as a response to the Initial Context Setup Request message received in Step 22), so that the MME can forwards it to the S-GW. #### 31. [eNB] Allocating a Downlink TEID for S1 Bearer Once Step 29) is completed, a downlink TEID is allocated by the eNB to S1 bearer, establishing the downlink S1 GTP-U tunnel. However, since the S-GW does not know about the establishment yet, it cannot delivery downlink traffic to the eNB at this time. #### 32. [UE -> MME] Sending Attach Complete Message The UE sends an Attach Complete message to the MME, as a response to the message in Step 20). The Attach Complete message is delivered through an UL Information Transfer message over the RRC connection, and then through an Uplink NAS Transport message over the S1 signaling connection. #### 33. [UE][MME] EMM State Now the UE and the MME stay in EMM-Registered state. If an Attach Reject message is sent from the MME to the UE in Step 20), the UE must release the ECM/RRC connection and transit to EMMDeregistered state. #### 34. [MME -> S-GW] Requesting S1 Bearer Modification The MME forwards the downlink S1 TEID (S1 eNB TEID) received from the eNB to the S-GW through a Modify Bearer Request message. #### 35. [MME <- S-GW] Responding to S1 Bearer Modification Request The S-GW sends the MME a Modify Bearer Response as a response to the Modify Bearer Request message. Now, the S-GW is ready to deliver downlink S1 traffic. #### 36. [S1 Bearer: Downlink] S1 Bearer Setup Complete Step 35) completes the setup procedure for S1 bearer. With the establishment of S1 bearer, the eNB and the S-GW can exchange traffic with each other. Now, the default EPS bearer from the UE all the way to the P-GW is finally established, allowing uplink/downlink EPS bearer communication between the UE and the P-GW. ## EPS Entity Information: Before/After Initial Attach ### Before Initial Attach ![](https://i.imgur.com/DiZB4fB.png) ### After Initial Attach ![](https://i.imgur.com/vSTZikr.png) #### Changes in UE ID Information ![](https://i.imgur.com/h27B6n8.png) #### Changes in UE Location Information ![](https://i.imgur.com/Yw3xNeD.png) #### Changes in Security Context Information ![](https://i.imgur.com/Qeb6BjM.png) #### Changes in EPS Session/Bearer Information ![](https://i.imgur.com/k6RtQED.png) ![](https://i.imgur.com/hAw1UJg.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