MSCBSC 移動通信論壇
搜索
登錄注冊
網絡優(yōu)化工程師招聘專欄 4G/LTE通信工程師最新職位列表 通信實習生/應屆生招聘職位

  • 閱讀:1959
  • 回復:0
5G(NR)無線網絡中APN及分配過程
Mr Kang
原始天尊
鎵嬫満鍙風爜宸查獙璇? style=


 發(fā)短消息    關注Ta 

C友·鐵桿勛章   公益·慈善勛章   C友·貢獻勛章   紀念勛章·七周年   財富勛章·萬元戶   專家·高級勛章   財富勛章·財運連連   財富勛章·小財主   C友·登錄達人   財富勛章·富甲一方   紀念勛章·八周年   紀念勛章·九周年   紀念勛章·十周年   紀念勛章·十二周年   C友·技術大神  
積分 104926
帖子 8552
威望 1726770 個
禮品券 11319 個
專家指數 23981
注冊 2007-3-13
專業(yè)方向 
回答問題數 0
回答被采納數 0
回答采納率 0%
 
發(fā)表于 2020-11-04 09:43:57  只看樓主 

        APN是(Access Point Name)的簡寫,也就是接入點名稱。它是終端在無線互聯(lián)網的網關(或錨定點) ,UE (移動終端)通過接入點(APN)后,才可能訪問核心網絡,進行數據服務連接。


1.APN分配


        在無線網絡中APN是根據UE的請求,由網絡為其分配。APN是UE設置(請求)和網絡配置的結合,終端和網絡都參與了APN的賦值;

        如果APN賦值不正確,終端將不能連接上網;商用電話一般都是根據SIM卡、終端和網絡匹配在終端中存儲APN。


       * 現網中個別用戶投訴不能上網大多是由于私自更改APN,而網絡不支持所致;


2.APN分配過程


        APN的分配協(xié)議和過程非常簡單,只需兩步就可完成;其分別如下:


 2.1  UE-->Network:PDN Connectivity Request(終端請求一個特定APN)

2.2  UE<--Network:Activate Default EPS Bearer Context Request(激活包括上下文的默認承載和網絡定義一個APN)


3.APN分配示例


3.1 默認APN分配


          默認APN的分配包括在RRC+NAS消息中,其過程如下:


i) RRC : RRC Connection Setup Complete + NAS : Attach Request + ESM : PDN Connectivity Request

ii) RRC : RRC Connection Reconfiguration + NAS : Attach Accept + NAS : Activate Default EPS Bearer Context Req

 

APN分配的NAS(請求)消息< PDN Connectivity Request : Default APN >


NAS EPS session management messages: PDN connectivity request (0xd0)

0011 .... = PDN type: IPv4v6 (3)

.... 0001 = Request type: initial request (1)

ESM information transfer flag

    1101 .... = Element ID: 0xd-

    .... 000. = Spare bit(s): 0x00

    .... ...1 = EIT (ESM information transfer): Security protected ESM information transfer required

Protocol Configuration Options

    Element ID: 0x27

    Length: 32

    [Link direction: MS to network (0)]

    1... .... = Extension: True

    Configuration Protocol: PPP for use with IP PDP type or IP PDN type (0)

    Protocol or Container ID: Internet Protocol Control Protocol (0x8021)

        Length: 0x10 (16)

        PPP IP Control Protocol

            Code: Configuration Request (1)

            Identifier: 0 (0x00)

            Length: 16

            Options: (12 bytes), Primary DNS Server IP Address, Secondary DNS Server IP Address

                Primary DNS Server IP Address: 0.0.0.0

                    Type: Primary DNS Server IP Address (129)

                    Length: 6

                    Primary DNS Address: 0.0.0.0 (0.0.0.0)

                Secondary DNS Server IP Address: 0.0.0.0

                    Type: Secondary DNS Server IP Address (131)

                    Length: 6

                    Secondary DNS Address: 0.0.0.0 (0.0.0.0)

    Access Point Name  // UE can specify a predefined name here.

                               // In case of default EPS bearer, it is common that the APN is not specified

    Protocol or Container ID: DNS Server IPv4 Address Request (0x000d)        Length: 0x00 (0)

    Protocol or Container ID: DNS Server IPv6 Address Request (0x0003)        Length: 0x00 (0)

    Protocol or Container ID: IP address allocation via NAS signalling (0x000a)        Length: 0x00 (0)

    Protocol or Container ID: IPv4 Link MTU Request (0x0010)        Length: 0x00 (0)


默認承載激活請求(默認APN)< Activate Default EPS Bearer Context Request : Default APN > 

NAS EPS session management messages: Activate default EPS bearer context request (0xc1)

EPS quality of service

    Length: 1

    Quality of Service Class Identifier (QCI): QCI 9 (9)

Access Point Name

    Length: 8

    APN: internet  // Network Assigns a specific APN Name

PDN address

    Length: 13

    0000 0... = Spare bit(s): 0x00

    PDN type: IPv4v6 (3)

    PDN IPv6 if id: 0000000000000001

    PDN IPv4: 192.168.137.2 (192.168.137.2)

Protocol Configuration Options

    Element ID: 0x27

    Length: 8

    [Link direction: Network to MS (1)]

    1... .... = Extension: True

    Configuration Protocol: PPP for use with IP PDP type or IP PDN type (0)

    Protocol or Container ID: Internet Protocol Control Protocol (0x8021)

        Length: 0x04 (4)

        PPP IP Control Protocol

            Code: Configuration Nak (3)

            Identifier: 0 (0x00)

            Length: 4


3.2  (網絡側)APN分配(Assignment of additional APN)----VOLTE終端在默認承載激活和APN分配后IMS APN分配 


        (網絡側)的APN分配是UE默認承載(和APN)激活之后,再由網絡側為其分配(如 IMS APN),其主要包括兩步:

         i) RRC : ulinformationTransfer + ESM : PDN Connectivity Request

         ii) RRC : RRC Connection Reconfiguration + NAS : Activate Default EPS Bearer Context Req


APN連接請求< PDN Connectivity Request : Additional APN > 

NAS EPS session management messages: PDN connectivity request (0xd0)

0011 .... = PDN type: IPv4v6 (3)

.... 0001 = Request type: initial request (1)

Access Point Name

    Element ID: 0x28

    Length: 4

    APN: ims  // Usually UE request PDN with specific APN name

Protocol Configuration Options

    Element ID: 0x27

    Length: 41

    [Link direction: MS to network (0)]

    1... .... = Extension: True

    Configuration Protocol: PPP for use with IP PDP type or IP PDN type (0)

    Protocol or Container ID: Internet Protocol Control Protocol (0x8021)

        Length: 0x10 (16)

        PPP IP Control Protocol

            Code: Configuration Request (1)

            Identifier: 0 (0x00)

            Length: 16

            Options: (12 bytes), Primary DNS Server IP Address, Secondary DNS Server IP Address

                Primary DNS Server IP Address: 0.0.0.0

                    Type: Primary DNS Server IP Address (129)

                    Length: 6

                    Primary DNS Address: 0.0.0.0 (0.0.0.0)

                Secondary DNS Server IP Address: 0.0.0.0

                    Type: Secondary DNS Server IP Address (131)

                    Length: 6

                    Secondary DNS Address: 0.0.0.0 (0.0.0.0)

    Protocol or Container ID: DNS Server IPv4 Address Request (0x000d)

        Length: 0x00 (0)

    Protocol or Container ID: DNS Server IPv6 Address Request (0x0003)

        Length: 0x00 (0)

    Protocol or Container ID: P-CSCF IPv6 Address Request (0x0001)

        Length: 0x00 (0)

    Protocol or Container ID: P-CSCF IPv4 Address Request (0x000c)

        Length: 0x00 (0)

    Protocol or Container ID: IP address allocation via NAS signalling (0x000a)

        Length: 0x00 (0)

    Protocol or Container ID: MS Support of Network Requested Bearer Control indicator (0x0005)

        Length: 0x00 (0)

    Protocol or Container ID: IPv4 Link MTU Request (0x0010)

        Length: 0x00 (0) 

 

APN的分配(默認承載激活+APN請求)< Activate Default EPS Bearer Context Req : Additional APN > 

NAS EPS session management messages: Activate default EPS bearer context request (0xc1)

 EPS quality of service

     Length: 1

     Quality of Service Class Identifier (QCI): QCI 9 (9)

 Access Point Name

     Length: 4

     APN: ims  // Network Allocate the specific APN Name. This may or may not be the same as UE requested

 PDN address

     Length: 13

     0000 0... = Spare bit(s): 0x00

     PDN type: IPv4v6 (3)

     PDN IPv6 if id: 0000000000000011

     PDN IPv4: 192.168.1.11 (192.168.1.11)

 Linked TI - Transaction identifier

     Element ID: 0x5d

     Length: 1

     0... .... = TI Flag: The message is sent from the side that originates the TI

     TI value: 0x02 (2)

 Quality Of Service - Negotiated QoS

     Element ID: 0x30

     Length: 14

     00.. .... = Spare bit(s): 0

     ..10 0... = Quality of Service Delay class: Delay class 4 (best effort) (4)

     .... .011 = Reliability class: Unacknowledged GTP/LLC, Ack RLC, Protected data (3)

     1001 .... = Peak throughput: Up to 256 000 octet/s (9)

     .... 0... = Spare bit(s): 0

     .... .010 = Precedence class: Normal priority (2)

     000. .... = Spare bit(s): 0

     ...0 1010 = Mean throughput: 100 000 octet/h (10)

     100. .... = Traffic class: Background class (4)

     ...1 0... = Delivery order: Without delivery order ('no') (2)

     .... .011 = Delivery of erroneous SDUs: Erroneous SDUs are not delivered('No') (3)

     Maximum SDU size: 1500 octets (150)

     Maximum bitrate for uplink: 64 kbps (64)

     Maximum bitrate for downlink: 384 kbps (104)

     0111 .... = Residual Bit Error Rate (BER): 1*10-5 (7)

     .... 0100 = SDU error ratio: 1*10-4 (4)

     0000 00.. = Transfer delay: Subscribed transfer delay/reserved (0)

     .... ..00 = Traffic handling priority: Subscribed traffic handling priority/Reserved (0)

     Guaranteed bitrate for uplink: 64 kbps (64)

     Guaranteed bitrate for downlink: 568 kbps (127)

     000. .... = Spare bit(s): 0

     ...0 .... = Signalling indication: Not optimised for signalling traffic

     .... 0000 = Source statistics description: unknown (0)

     Maximum bitrate for downlink (extended): Use the value indicated by the Maximum bit rate for downlink (0)

     Guaranteed bitrate for downlink (extended): Use the value indicated by the Guaranteed bit rate for downlink (0)

 LLC Service Access Point Identifier - Negotiated LLC SAPI

     Element ID: 0x32

     0000 .... = Spare bit(s): 0

     .... 0011 = LLC SAPI: SAPI 3 (3)

 Radio Priority

     1000 .... = Element ID: 0x8-

     Radio Priority (PDP or SMS): priority level 1 (highest) (1)

 Protocol Configuration Options

     Element ID: 0x27

     Length: 72

     [Link direction: Network to MS (1)]

     1... .... = Extension: True

     Configuration Protocol: PPP for use with IP PDP type or IP PDN type (0)

     Protocol or Container ID: Internet Protocol Control Protocol (0x8021)

         Length: 0x10 (16)

         PPP IP Control Protocol

             Code: Configuration Nak (3)

             Identifier: 0 (0x00)

             Length: 16

             Options: (12 bytes), Primary DNS Server IP Address, Secondary DNS Server IP Address

                 Primary DNS Server IP Address: 10.211.64.87

                     Type: Primary DNS Server IP Address (129)

                     Length: 6

                     Primary DNS Address: 10.211.64.87 (10.211.64.87)

                 Secondary DNS Server IP Address: 10.211.64.87

                     Type: Secondary DNS Server IP Address (131)

                     Length: 6

                     Secondary DNS Address: 10.211.64.87 (10.211.64.87)

     Protocol or Container ID: DNS Server IPv4 Address (0x000d)

         Length: 0x04 (4)

         IPv4: 10.211.64.87

     Protocol or Container ID: DNS Server IPv6 Address (0x0003)

         Length: 0x10 (16)

         IPv6: 2001:0:0:1::2

     Protocol or Container ID: P-CSCF IPv6 Address (0x0001)

         Length: 0x10 (16)

         IPv6: 2001:0:0:1::2

     Protocol or Container ID: P-CSCF IPv4 Address (0x000c)

         Length: 0x04 (4)

         IPv4: 192.168.1.2


4.S1接口上APN傳輸協(xié)議 


        APN是終端(UE)與核心網絡協(xié)商分配,在5G(NR)NSA網絡中相關消息通過S1鏈路(SA網絡是在NG接口中)在基站與核心網之間傳遞 ;消息內容如下:

 

4.1 初始建立NAS消息< UplinkNASTransport >

S1 Application Protocol

    S1AP-PDU: initiatingMessage (0)

        initiatingMessage

            procedureCode: id-uplinkNASTransport (13)

            criticality: ignore (1)

            value

                UplinkNASTransport

                    protocolIEs: 5 items

                        Item 0: id-MME-UE-S1AP-ID

                            ProtocolIE-Field

                                id: id-MME-UE-S1AP-ID (0)

                                criticality: reject (0)

                                value

                                    MME-UE-S1AP-ID: ....

                        Item 1: id-eNB-UE-S1AP-ID

                            ProtocolIE-Field

                                id: id-eNB-UE-S1AP-ID (8)

                                criticality: reject (0)

                                value

                                    ENB-UE-S1AP-ID: 3

                        Item 2: id-NAS-PDU

                            ProtocolIE-Field

                                id: id-NAS-PDU (26)

                                criticality: reject (0)

                                value

                                    NAS-PDU: 27a8ccdcee7e024eda2808016e05697370736e

                                    Non-Access-Stratum (NAS)PDU

                                        0010 .... = Security header type: Integrity protected and ciphered (2)

                                        .... 0111 = Protocol discriminator: EPS mobility management messages (0x07)

                                        Message authentication code: 0xa8ccdcee

                                        Sequence number: 126

                                        0000 .... = EPS bearer identity: No EPS bearer identity assigned (0)

                                        .... 0010 = Protocol discriminator: EPS session management messages (0x02)

                                        Procedure transaction identity: 78

                                        NAS EPS session management messages: ESM information response (0xda)

                                        Access Point Name

                                            Element ID: 0x28

                                            Length: 8

                                            APN: testapn

                        Item 3: id-EUTRAN-CGI

                            ProtocolIE-Field

                                id: id-EUTRAN-CGI (100)

                                criticality: ignore (1)

                                value

                                    EUTRAN-CGI

                                        ...

                        Item 4: id-TAI

                            ProtocolIE-Field

                                id: id-TAI (67)

                                criticality: ignore (1)

                                value

                                    TAI

                                        ...

4.2初始上下文建立請求<  InitialContextSetupRequest >

S1 Application Protocol

    S1AP-PDU: initiatingMessage (0)

        initiatingMessage

            procedureCode: id-InitialContextSetup (9)

            criticality: reject (0)

            value

                InitialContextSetupRequest

                    protocolIEs: 8 items

                        Item 0: id-MME-UE-S1AP-ID

                            ProtocolIE-Field

                                id: id-MME-UE-S1AP-ID (0)

                                criticality: reject (0)

                                value

                                    MME-UE-S1AP-ID: ...

                        Item 1: id-eNB-UE-S1AP-ID

                            ProtocolIE-Field

                                id: id-eNB-UE-S1AP-ID (8)

                                criticality: reject (0)

                                value

                                    ENB-UE-S1AP-ID: 3

                        Item 2: id-uEaggregateMaximumBitrate

                            ProtocolIE-Field

                                id: id-uEaggregateMaximumBitrate (66)

                                criticality: reject (0)

                                value

                                    UEAggregateMaximumBitrate

                                        uEaggregateMaximumBitRateDL: 201943030

                                        uEaggregateMaximumBitRateUL: 201943030

                        Item 3: id-E-RABToBeSetupListCtxtSUReq

                            ProtocolIE-Field

                                id: id-E-RABToBeSetupListCtxtSUReq (24)

                                criticality: reject (0)

                                value

                                    E-RABToBeSetupListCtxtSUReq: 1 item

                                        Item 0: id-E-RABToBeSetupItemCtxtSUReq

                                            ProtocolIE-SingleContainer

                                                id: id-E-RABToBeSetupItemCtxtSUReq (52)

                                                criticality: reject (0)

                                                value

                                                    E-RABToBeSetupItemCtxtSUReq

                                                        e-RAB-ID: 5

                                                        e-RABlevelQoSParameters

                                                            qCI: 9

                                                            allocationRetentionPriority

                                                                priorityLevel: Unknown (12)

                                                                pre-emptionCapability: shall-not-trigger-pre-emption (0)

                                                                pre-emptionVulnerability: pre-emptable (1)

                                                        0... .... Extension Present Bit: False

                                                        transportLayerAddress: 0a9bb99c

                                                            transportLayerAddress(IPv4): xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)

                                                        gTP-TEID: ...

                                                        nAS-PDU: ...

                                                        Non-Access-Stratum (NAS)PDU

                                                            0010 .... = Security header type:

                                                                                  Integrity protected and ciphered (2)

                                                            .... 0111 = Protocol discriminator:

                                                                                  EPS mobility management messages (0x07)

                                                            Message authentication code: 0x5e7a308b

                                                            Sequence number: 76

                                                            0000 .... = Security header type:

                                                                                  Plain NAS message, not security protected (0)

                                                            .... 0111 = Protocol discriminator:

                                                                                  EPS mobility management messages (0x07)

                                                            NAS EPS Mobility Management Message Type: Attach accept (0x42)

                                                            0000 .... = Spare half octet: 0

                                                            .... 0... = Spare bit(s): 0x00

                                                            .... .001 = Attach result: EPS only (1)

                                                            GPRS Timer - T3412 value

                                                                ...

                                                            Tracking area identity list - TAI list

                                                                ...

                                                            ESM message container

                                                                Length: 83

                                                                ESM message container contents: ...

                                                                    0101 .... = EPS bearer identity:

                                                                                        EPS bearer identity value 5 (5)

                                                                    .... 0010 = Protocol discriminator:

                                                                                        EPS session management messages (0x02)

                                                                    Procedure transaction identity: 78

                                                                    NAS EPS session management messages:

                                                                               Activate default EPS bearer context request (0xc1)

                                                                    EPS quality of service

                                                                        Length: 1

                                                                        Quality of Service Class Identifier (QCI): QCI 9 (9)

                                                                    Access Point Name

                                                                        Length: 8

                                                                        APN: testapn

                                                                    PDN address

                                                                        Length: 5

                                                                        0000 0... = Spare bit(s): 0x00

                                                                        PDN type: IPv4 (1)

                                                                        PDN IPv4: xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)

                                                                    APN aggregate maximum bit rate

                                                                        Element ID: 0x5e

                                                                        Length: 6

                                                                        APN-AMBR for downlink : 8640 kbps

                                                                        APN-AMBR for uplink : 8640 kbps

                                                                        APN-AMBR for downlink (extended) : 44 Mbps

                                                                        APN-AMBR for uplink (extended) : 44 Mbps

                                                                        APN-AMBR for downlink (extended-2) : 256 Mbps

                                                                        Total APN-AMBR for downlink : 308.640 Mbps

                                                                        APN-AMBR for uplink (extended-2) : 256 Mbps

                                                                        Total APN-AMBR for uplink : 308.640 Mbps

                                                                    Protocol Configuration Options

                                                                        ....

                                                            EPS mobile identity - GUTI

                                                                Element ID: 0x50

                                                                Length: 11

                                                                .... 0... = odd/even indic: 0

                                                                .... .110 = Type of identity: GUTI (6)

                                                                Mobile Country Code (MCC): 001

                                                                Mobile Network Code (MNC): 01

                                                                MME Group ID: 32774

                                                                MME Code: 33

                                                                M-TMSI: 0xc071bb09

                                                            EMM cause

                                                                Element ID: 0x53

                                                                Cause: CS domain not available (18)

                                                            GPRS Timer - T3402 value

                                                                ...

                                                            GPRS Timer - T3423 value

                                                                ...

                                                            PLMN List - Equivalent PLMNs - 2 PLMNs

                                                                Element ID: 0x4a

                                                                Length: 6

                                                                PLMN[1]  Mobile Country Code (MCC): 001

                                                                PLMN[2]  Mobile Country Code (MCC): 01

                                                            EPS network feature support

                                                                Element ID: 0x64

                                                                Length: 1

                                                                ....

                                                            Additional update result

                                                                1111 .... = Element ID: 0xf-

                                                                .... 00.. = Spare bit(s): 0x00

                                                                .... ..01 = AURV: CS Fallback not preferred (1)

                        Item 4: id-UESecurityCapabilities

                            ProtocolIE-Field

                                id: id-UESecurityCapabilities (107)

                                criticality: reject (0)

                                value

                                    UESecurityCapabilities

                                        ..0. .... Extension Present Bit: False

                                        encryptionAlgorithms: c000

                                        ...0 .... Extension Present Bit: False

                                        integrityProtectionAlgorithms: c000

                        Item 5: id-SecurityKey

                            ProtocolIE-Field

                                id: id-SecurityKey (73)

                                criticality: reject (0)

                                value

                                    SecurityKey: ... [bit length 256]

                        Item 6: id-HandoverRestrictionList

                            ProtocolIE-Field

                                id: id-HandoverRestrictionList (41)

                                criticality: ignore (1)

                                value

                                    HandoverRestrictionList

                                        servingPLMN: 131002

                                        Mobile Country Code (MCC): 001

                                        Mobile Network Code (MNC): 02

                                        equivalentPLMNs: 2 items

                                            Item 0

                                                PLMNidentity: 134109

                                                Mobile Country Code (MCC): 001

                                                Mobile Network Code (MNC): 02

                                            Item 1

                                                PLMNidentity: 138107

                                                Mobile Country Code (MCC): 001

                                                Mobile Network Code (MNC): 02

                        Item 7: id-SubscriberProfileIDforRFP

                            ProtocolIE-Field

                                id: id-SubscriberProfileIDforRFP (106)

                                criticality: ignore (1)

                                value

                                    SubscriberProfileIDforRFP: 1


整理:kangguoying20201104

"5G網絡共享方案介紹"已在微信公眾號"跟著老康學5G"中推出,敬請關注!

掃碼關注5G通信官方公眾號,免費領取以下5G精品資料
  • 1、回復“YD5GAI”免費領取《中國移動:5G網絡AI應用典型場景技術解決方案白皮書
  • 2、回復“5G6G”免費領取《5G_6G毫米波測試技術白皮書-2022_03-21
  • 3、回復“YD6G”免費領取《中國移動:6G至簡無線接入網白皮書
  • 4、回復“LTBPS”免費領取《《中國聯(lián)通5G終端白皮書》
  • 5、回復“ZGDX”免費領取《中國電信5G NTN技術白皮書
  • 6、回復“TXSB”免費領取《通信設備安裝工程施工工藝圖解
  • 7、回復“YDSL”免費領取《中國移動算力并網白皮書
  • 8、回復“5GX3”免費領取《 R16 23501-g60 5G的系統(tǒng)架構1
  • 對本帖內容的看法? 我要點評

     
    [充值威望,立即自動到帳] [VIP貴賓權限+威望套餐] 另有大量優(yōu)惠贈送活動,請光臨充值中心
    充值擁有大量的威望和最高的下載權限,下載站內資料無憂

    快速回復主題    
    標題
    內容
     上傳資料請點左側【添加附件】

    當前時區(qū) GMT+8, 現在時間是 2025-04-08 12:48:32
    渝ICP備11001752號  Copyright @ 2006-2016 mscbsc.com  本站統(tǒng)一服務郵箱:mscbsc@163.com

    Processed in 0.503943 second(s), 13 queries , Gzip enabled
    TOP
    清除 Cookies - 聯(lián)系我們 - 移動通信網 - 移動通信論壇 - 通信招聘網 - Archiver