近期分析4G承载激活成功率时,发现有大量本地号码用CMWAP激活,却使用了外地的PGW。于是对MME如何选择PGW很关注。
我们知道,在2/3G网络下,SGSN选择GGSN是通过DNS解析来进行选择的。
翻阅23.401协议,发现以下相关内容:
5.7 Information storage5.7.1 MME
The MME maintains MM context and EPS bearer context information for UEs in the ECM-IDLE, ECM‑CONNECTED and EMM-DEREGISTERED states. Table 5.7.2-1 shows the context fields for one UE.
PDN GW Address in Use (control plane)
he IP address of the PDN GW currently used for sending control plane signalling.
5.3.3.1 Tracking Area Update procedure with Serving GW change5. If the Context Request is sent to an old MME the old MME responds with a Context Response (ME Identity (if available), MM Context, EPS Bearer Context(s), Serving GW signalling Address and TEID(s), ISR Supported, MS Info Change Reporting Action (if available), UE Core Network Capability, UE Specific DRX Parameters) message. If the Context Request is sent to an old S4 SGSN the old S4 SGSN responds with a Context Response (MM Context, EPS Bearer Context(s), Serving GW signalling Address and TEID(s), ISR Supported, MS Info Change Reporting Action (if available), UE Core Network Capability, UE Specific DRX Parameters). The MM Context contains security related information as well as other parameters (including IMSI, ME Identity (if available) and MSISDN) as described in clause 5.7.2 (Information Storage for MME). The unused Authentication Quintets in the MM Context are also maintained in the SGSN. TS 33.401 [41] gives further details on the transfer of security related information. The PDN GW Address and TEID(s) (for GTP-based S5/S8) or GRE Keys (PMIP-based S5/S8 at the PDN GW(s) for uplink traffic) and the TI(s), is part of the EPS Bearer Context. If the UE is not known in the old MME/old S4 SGSN or if the integrity check for the TAU Request message fails, the old MME/old S4 SGSN responds with an appropriate error cause. ISR Supported is indicated if the old MME/old S4 SGSN is capable to activate ISR for the UE. The MSISDN is included if the old MME/old S4 SGSN has it stored for that UE.
如上描述,在TAU过程中,old MME向new MME发送Context Response消息中携带了EPS Bearer Context(包含了PDN GW的地址),因此即使是本地用户,只要它到过外地,使用过当地的PGW,它TAU过来后,外地的old MME告诉了本地的new MME相应的PGW地址,终端在此发起承载激活时,MME不需要进行DNS解析,直接从EPS Bearer Context找到之前使用PGW地址。
而detach时(较常见的是关机),EPS Bearer Context 被删除后,用户重新附着、建立承载激活时MME才会向DNS发起APN解析。
这样就解释了为什么会有很多本地用户使用公共APN发起承载激活,本地的MME会选择外地的PGW
这是我结合现网观测到的信令和协议的个人理解,欢迎大家补充、指正
|