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/07 ## <font color="ff0000">Introduction</font> Explains the detailed procedures in **EMM Case 1(Initial Attach with IMSI)** , focusing on the functions required in the case, ## <font color="ff0000">Initial Attach Procedure</font> ![](https://i.imgur.com/vKuFMPK.png) ### <font color="0000ff">2.1 IMSI Acquisition</font> ![](https://i.imgur.com/cuG9xHk.png) #### <font color="ff00ff">1. **Initial State after Radio Link Synchronization**</font> - UE通過PLMN選擇和小區搜索過程選擇一個eNB,並無線連接同步 - UE是EMM-deregistered ECM-idle/rrc-idle狀態 #### <font color="ff00ff">**2. ECM Connection Establishment**</font> 在NAS層上,UE發送attach request消息(包含IMSI和UE網絡能力信息)給MME的NAS層。透過在UE和MME間建 ECM (RRC+S1AP) 傳 ##### **1) RRC Connection Establishment** RRC連接建立 一旦建立完成,在控制面傳輸消息到RRC層或者上層(NAS層)時使用RRC連接 - [UE -> eNB] RRC Connection Request 當UE請求attach,detach,TAU時都是用“Mobile Originating Signaling”,它是一個值,包含在Establishment Cause域。這個消息通過SRB0,CCCH,邏輯信道由UE發送給eNB。SRB0可以被這個小區的所有UE使用。 - [UE <- eNB] RRC Connection Setup UE的上行和下行無線資源是由eNB控制的。所以當完成這一步之後,UE通過使用RRC connection setup消息分配的SRB配置信息來使用無線資源。然後UE轉到到EMM-deregistered ECM-idle RRC-connected狀態。 - [UE -> eNB] RRC Connection Setup Complete 為了有效的傳輸,當RRC Connection Setup Complete消息傳輸時,傳輸到NAS層的attach request消息也被發送到eNB(嵌入到RRC Connection Setup Complete消息的專用NAS信息域DedicatedInfoNAS)。 ##### **2) S1 Signaling Connection Establishment** 在eNB和MME之間的控制信息透過S1AP發送。S1AP使用 **eNB UE S1AP ID, MME UE S1AP ID** 標示 attach request消息在S1信令連接建立前到eNB。eNB接著分配eNB UE S1AP ID, attach request消息,嵌入到initial UE message消息的NAS-PDU域,並發給MME。 **Initial UE message消息包含:** - eNB UE S1AP ID: 在S1-MME接口上(Uplink)在eNB中標識UE - NAS-PDU:一條NAS消息(Attach Request) - TAI: 標識UE待在的TA - ECGI: 標識UE待在的小區 - RRC Establishment Cause = mo-Signaling: 標識這個信令是UE產生的 MME收到Initial UE message後,為UE分配一個MME S1AP UE ID ##### **3) ECM S1 Establishment** UE轉移到EMM-registered ECM-connected RRC-connected狀態。 ##### **4) IMSI Acquisition** MME的NAS層從UE的NAS發送的attach request消息中獲取的UE的IMSI,及網絡能力信息。然後執行*EPS AKA* ### <font color="0000ff">2.2 Authentication</font> ![](https://i.imgur.com/yBMLsDx.png) #### <font color="ff00ff">**1. Acquisition of Authentication Vectors**</font> - [MME -> HSS] Authentication Information Request `IMSI + SN` - [HSS] Generating Authentication Vectors ![](https://i.imgur.com/8eJGZdC.png) - [MME <- HSS] Delivering Authentication Vectors #### <font color="ff00ff">**2. Mutual Authentication**</font> 同前幾篇 ### <font color="0000ff">2.3 NAS Security Setup</font> ![](https://i.imgur.com/0t7UR3E.png) 1. 【MME】生成NAS安全秘鑰,接著,從$K_{ASME}$中生成NAS完整性秘鑰和NAS加密秘鑰$K_{NASint}$/$K_{NASenc}$,應用於NAS消息 2. 【UE<-MME】幫助UE生成NAS安全秘鑰 這個消息時包含NAS-MAC完整性保護的。 3. 【UE】產生NAS安全秘鑰 4. 【UE->MME】NAS安全秘鑰生成完畢 ### <font color="0000ff">2.4 Location Update</font> 一旦完成以上,MME通知HSS簽約用戶已經註冊了並駐留在它的TA,接著從HSS下載簽約用戶信息。 ![](https://i.imgur.com/hxOFMj8.png) 1. **【MME->HSS】通告UE位置** 2. **【HSS】UE位置更新** 3. **【MME<-HSS】用戶簽約信息的傳輸,包含在update location answer消息中的簽約信息**(IMSI、訂閱的 APN、訂閱的 P-GW ID、訂閱的 QoS 配置文件) 4. **【MME】存儲簽約信息** 從下載的簽約信息,MME可以檢查用戶簽約的服務,使用什麼QoS級別的資源來連接到哪個APN ### <font color="0000ff">2.5 EPS Session Establishment</font> ![](https://i.imgur.com/ybZPzp7.jpg) #### 1. **【MME】分配EPS承載ID** #### 2. **【MME】選擇PGW 這個決定是基於從HSS接收到的簽約信息(PGW ID)** 如果沒有這些信息,MME請求DNS服務器獲得APN FQDN, 並從按照PGW選擇策略返回的PGW IP地址列表中選擇一個。這時候,也需要選擇一個SGW來到達PGW。 #### 3. **【MME->SGW】請求EPS Session創建** MME發送給第二步選擇的SGW create session Request消息,包含以下參數: ![](https://i.imgur.com/XshkHmH.png) #### 4. **【SGW->PGW】請求EPS會話的創建** SGW在create session Request消息中分配S5 TEID來建立到PGW的S5 GTP。接著在create session request消息中發送這個ID和其他參數給PGW。 #### 5. **【S5 Bearer:Down Link】** 在圖7和8中,分配和發送GTP隧道TEID的實體被標記為實點,接收的一個被標記為虛點。 #### 6. **【PGW】分配用戶IP地址** 所以PGW給UE分配IP地址,讓UE可以使用IP。 #### 7. **【PGW->PCRF】通知EPS會話建立** 用戶的EPS Session,資源配置和QoS基於訂閱的服務決定。PGW通過CCR消息傳給PCRF決定,包含: ![](https://i.imgur.com/krhFvlR.png) #### 8. **【PCRF->SPR】請求接入配置** #### 9. **【PCRF<-SPR】返回接入配置** SDF Filter, QCI , ARP , APN-AMBR (UL/DL) , Charging Method , Changing Reporting Action #### 10. **【PCRF】決定策略** PCRF determines PCC policies for the EPS session #### 11. **【PGW<-PCRF】確認EPS Session建立** PCRF delivers the **PCC policies(in CCA)** determined in Step 10) to the P-GW ![](https://i.imgur.com/zKtccsq.png) #### 12. **【PGW】 Policy 實行** PCC應用到各SDF上,P-GW對應SDFs到EPS Bearer #### 13. ~ 15. **EPS session create response** PCRF可能會保存這個從HSS接收到的值或者選擇一個新的值。 #### 13. **【SGW<-PGW】EPS session response** PGW回應create session response給SGW的create session request ![](https://i.imgur.com/dmU8Qnd.png) #### 14. **【S5 Bearer:UP Link】S5承載建立** #### 15. 【MME<-SGW】EPS session create response SGW在處理完的消息上加入新分配的S1 SGW TEID,然後送到MME,作為對 3.的create session request的響應。 #### 16. **【MME】為什麼MME保留S5 PGW TEID** 當UE執行TAU或Handover,其SGW會變,所以MME通知UE新的SGW UL S5 TEID,讓SGW可以傳輸UL給PGW #### 17. **【S1 Bearer:UP Link】** 因為eNB還沒有S1 SGW TEID,所以這是還不能給SGW傳輸上行流量。 #### 18. **【MME】計算UE-AMBR** MME計算UE-AMBR值發送給eNB。MME已經接收到UE-AMBR值,包含在簽約信息中。但是MME可以調整這個值,使之不超過每一個APN的全部UE-AMBR,並分配它。 ![](https://i.imgur.com/xcs0Jxu.jpg) #### 19. **決定E-RAB和NAS信令需要的信息** MME負責E-RAB的建立,並控制eNB和SGW。MME決定E-RAB建立所需資源和NAS信令需要的信息: - 分配給UE GUTI代替IMSI - 決定和控制TAU相關的參數(TAI列表分配,tau定時器值) - 決定eNB使用的ue-ambr值 - 分配E-RAB ID #### 20. **【UE<-MME】attach accept** 包含在initial context setup request中,通過S1信令連接傳送的,然後接著通過RRC連接 #### 21. **【MME】生成K-eNB** 用於eNB和UE之間無線鏈路的安全傳輸 #### 22. **【eNB<-MME】請求E-RAB建立** 信息包含: ![](https://i.imgur.com/eN2GTK1.png) #### 23. **[S1 Bearer: UP Link]** 當eNB接收到Initial Context Setup Request請求E-RAB建立,eNB通過發送attach accept消息給UE來建立DRB。接著eNB在Initial Context Setup Response消息中包含下行S1 TEID來建立S1承載,並發送Initial Context Setup Response消息到MME來作為Initial Context Setup request消息的響應,所以MME可以轉發這個消息給SGW #### 24. ~ 27. **AS安全建立** (eNB在發送信息給UE之間需要執行AS安全建立過程) #### 24. **[eNB] 產生AS安全秘鑰** 從K-eNB中生成KRRCint/KRRCenc(RRC完整性和加密秘鑰)和KUPenc(用於用戶數據的加密) #### 25. **[UE <- eNB] 幫助UE生成AS安全秘鑰** eNB發送完整性保護的RRC消息,(包含mac-I) #### 26. **[UE] 生成AS加密秘鑰** #### 27. **[UE -> eNB] AS秘鑰生成完成** UE通過使用Security Mode complete (MAC-I)消息指示eNB AS安全秘鑰已經產生 #### 28. ~ 29. **DRB 建立** #### 28. **[UE <- eNB] 重配RRC連接** - 通過安全的RRC連接發送RRC connection reconfiguration消息給UE。RRC連接在UE發送attach request消息時建立。但現在RRC連接必須重配,因為需要根據網絡分配的資源來配置參數 - 接著從RRC connection reconfiguration中提取attach accept消息,並發送到NAS層。當UE的NAS層接收到這個消息,從這個消息中取出UE IP地址和GUTI,用於接下來的通信需要。 #### 29. **[DRB 建立: Uplink and Downlink] DRB 建立完成** #### 30. **[eNB -> S-GW] E-RAB Setup Response** 在Initial Context Setup Response消息中包含分配的ID發送給MME,作為Initial Context Setup request消息的響應,接著MME把這個消息轉發給SGW #### 31. **[eNB] Allocating a Downlink TEID for S1 Bearer** 因為SGW並不知道是否建立,現在它還不能傳輸下行數據到eNB #### 32. **[UE -> MME] 發送Attach Complete 消息** 作為對20. 的回應 #### 33. **[UE][MME] EMM State** - 現在UE及MME皆為EMM-Registered state - 如果在20)從MME接收到的是Attach Reject消息,UE必須釋放ECM/RRC連接,並且轉移到EMM-deregistered狀態。 #### 34. **[MME -> S-GW] Requesting S1 Bearer Modification** MME透過Modify Bearer Request message傳從eNB得到的downlink S1 TEID (S1 eNB TEID)給SGW #### 35. **[MME <- S-GW] Responding to S1 Bearer Modification Request** 回應Modify Bearer Request,現在SGW準備好傳送 downlink S1 traffic #### 36. **[S1 Bearer: Downlink] S1 Bearer Setup Complete** ## <font color="ff0000">EPS Entity Information: Before/After Initial Attach</font> See the EMM information stored in EPS entities before and after the **“EMM Case 1: Initial Attach by Unknown UE”** (EMM info分類如下圖) ![](https://i.imgur.com/zpgN3zr.png) ### <font color="0000ff">3.1 Before Initial Attach</font> ![](https://i.imgur.com/N8X1osY.png) - **UE ID information:** 在UE, HSS and SPR.中提供的用戶的IMSI。 - **UE Location information:** UE和網絡都沒有任何關於UE位置的信息。 - **Security Context information:** UE and HSS提供了用於用戶鑑權的LTE 主秘鑰 - **EPS Session/Bearer information:** 用戶簽約信息(Default APN, Subscribed QCI, ARP,UE-AMBR, APN-AMBR, etc.) 和用戶接入配置(Subscribed QCI, ARP, APN-AMBR, etc.)在HSS and SPR中提供。 ### <font color="0000ff">3.2 After Initial Attach</font> ![](https://i.imgur.com/a3AZz6T.png) #### <font color="ff00ff">**UE ID Information的變化**</font> - **MSI:** 在EPS承載/會話建立之後,由UE通過attach request消息傳輸的IMSI被加入到MME, SGW, P-GW and PCRF。 - **GUTI:** 在NAS消息中使用由MME分配的用來代替IMSI的GUTI加入到MME和UE. UE IP address: PGW分配的UE IP地址被加入到P-GW, PCRF, MME and UE. - **C-RNTI:** eNB分配的C-RNTI 用來空中接口物理層識別UE被加入到到eNB和UE. - **UE S1AP ID:** eNB UE S1AP ID和MME UE S1AP ID接入到eNB和MME用來S1-MME接口S1AP消息中標識用戶。 #### <font color="ff00ff">**UE Location Information的變化**</font> - **ECGI:** 用戶駐留小區信息加入到UE, eNB, MME, S-GW, P-GW and PCRF. 每次用戶移動到一個新小區,MME通知PGW,接著通知PCRF,用PCRF設定的Change Reporting Action策略通知小區。 - **TAI:** 用戶駐留的TA加入到UE, eNB, MME, S-GW, P-GW and PCRF. 每次用戶移動到一個新的TA,MME通知PGW,接著通知PCRF,用PCRF設定的Change Reporting Action策略通知TA。 - **TAI list:** UE不需要tau就可以進入的TA列表加入到MME和UE - **MME ID:** 用戶附著打MME信息加入到HSS中 #### <font color="ff00ff">**Security Context Information的改變**</font> - **NAS Security Info:** NAS安全上下文信息加入到UE和MME中 - **AS Security Info:** AS安全上下文加入到UE和eNB中 #### <font color="ff00ff">**EPS Session/Bearer Information的改變**</font> - **APN in Use:** 在EPS會話創建時加入到MME, S-GW, P-GW, PCRF and UE - **EPS Bearer ID:** 加入到MME和默認承載創建的實體,像UE, eNB, S-GW and P-GW. - **DRB ID:** 加入到UE 和eNB使之能在無線連接上通信 - **E-RAB ID:** 在E-RAB創建時加入到eNB和MME中 - **S1 TEID (UL/DL):** 在S1承載建立時加入到eNB, S-GW and MME - **S5 TEID (UL/DL):** 在S5承載建立時加入到S-GW, P-GW and MME - **QCI:** 分配用於所有類型的SDF和EPS承載,加入到UE, eNB, MME, S-GW, P-GW and PCRF. 這個值是由PCRF提供的。 - **ARP:** 分配用於所有類型的SDF和EPS承載,加入到eNB, MME, S-GW, P-GW and PCRF,但是不分配給UE(unlike QCI). 這個值是由PCRF提供的。 - **UE-AMBR (UL/DL):** 在EPS會話和承載創建時加入到MME和eNB中。是由MME計算得到的。 - **APN-AMBR (UL/DL):** 在EPS會話和承載創建時加入到MME和eNB中。這個值是由PCRF提供的。UE只有APN-AMBR(UL)。 - **TFT (UL/DL):** 在EPS承載創建時加入到PGW和UE中。PGW上下行都有這個值,但是UE只有上行有。 - **SDF Filter:** 在EPS會話創建時加入到PCRF。 - **Subscribed Profile:** 在用戶位置更新過程時在從HSS中下載簽約信息時加入到MME中

    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