Handover 流程
日志
- 切换
- UE从一个eNodeB的覆盖区向另一个eNodeB的覆盖区移动时, 源信号会逐渐减弱, 而目标信号逐渐增强. 当UE处于连接状态时, 当源信号弱到一定强度, 而目标信号逐渐增强到一定程度, 网络 可以在目标网络为用户预先建立承载资源. 这样, UE在源侧连接释放后, 可以很快在目标侧建立连接, 减少在目标侧申请资源等待时间. 这种目标预先准备资源的过程就是所说的切换.
- 切换是由网络侧的 eNodeB 发起的, 只有终端才知道自己当前所在位置各小区信号的好坏
- 终端测量当前小区及邻区的信号强度, 上报给eNodeB
- eNodeB根据终端上报的当前小区, 可供选择的小区的信号强度决定是否发起切换, 向那个小区切换
- eNodeB在RRC连接建立的同时下发测量控制信息(强和弱的上报门限)
X2/S1切换区别
1. 两种切换除切换控制消息路径不同外, UE切换到目标eNodeB后, 源eNodeB侧剩余未转发成功的用户数据面转发通道也不同
2. LTE网络切换过程保持PGW不变, eNodeB改变, MME和SGW可能改变
基于X2接口的切换
X2切换的条件
- eNodeB之间存在 X2接口 (eNodeB配置, 或通过MME/OMC学习)
- 切换过程 MME无需改变 (目标eNodeB和源eNodeB在一个MME下)
X2切换类型
切换前 ECM-CONNECTED状态下 用户面承载 包括:
- UE到源eNodeB的无线承载
- 源eNodeB到源SGW的S1-U承载
- 源SGW到PGW的S5/S8承载
X2-based handover without Serving GW relocation
接入网路径切换
HO Decision
(终端测量当前小区及邻区的信号强度, 上报给eNodeB, eNodeB根据信号强度决定发起切换)
- S-eNodeB->T-eNodeB(
Handover Request消息
), 信息包括:
- S-eNB创建X2转发通道的本端TEID(S-eNB->T-eNB的X2下行隧道)
- 源SGW的用户面GTP地址和TEID( T-eNB->S-SGW的S1-U上行隧道)
- T-ECGI(告诉要接入哪一个小区)
- 建立无线承载必须的信元(UE-AMBR, 安全能力, KeNB)
- T-eNB->S-eNB(
Handover Ack
)
- 创建无线承载相关ID(为创建无线承载准备)
- T-eNB创建X2转发通道的本端TEID(S-eNB->T-eNB的X2上行隧道, X2接口建立完毕)
- 源eNodeB->UE(
Handover Command
), UE执行切换
- UE通过同步, 信道建立过程接入T-eNB(创建无线承载)
- UE remove 那些没有到目标cell无线承载的EPS bearer
- 终端切换完后,
downlink data->S-eNodeB->X2->T-eNodeB
,
核心网侧路径切换
- T-eNodeB->MME(
path Switch Request
), 发起核心网侧路径切换
- list of EPS bears to switch(需要切换的承载列表)
- T-eNodeB的GTP地址和TEID
- 目标TAI信息(用于构建TAC FADN, 到DNS解析SGW列表, 根据PGW FQDN, "合一优选, 拓扑优先"选择SGW)
- ECGI(目标小区)
- CSG Membership status
- [CSG ID](如果target是CSG cell)[CSG access mode='hybird'][CSG Membership Status IE]
- MME->SGW(
Modify bearer request/Modify Access Bearers Request
)
- MME根据list of EPS bearer to be switched决定触发没有被T-eNodeB接受的承载的bearer release procedure
- 如果PDN连接的默认承载没有被接受并且有多个激活的PDN连接, 则触发MME request PDN disconnection procedure
- 为 接受的承载 传递T-eNodeB的GTP地址和TEID, 每一个默认承载被接受的PDN连接都会有一个消息(S1-U下行隧道, 至此S1-U下行通道建立完成);
- User location Information IE(if change)
- UE Time Zone IE(if change)
- Serving Network IE(if change)
- CSG Information IE(if change)
- S-GW->PGW(Modify Bearer Request)
- PGW->SGW(Modify Bearer Response)
- SGW->MME(Create Session Response)
- MME->T-eNodeB(Path Switch Request Ack)
- UE-AMBR
- verified CSG membership status
- indicate which bearers failed to be established, 释放失败的EPS bearers的核心网资源(bearer release procedure)
- 如果没有一个默认承载切换成功, 则->T-eNodeB(Path Switch Request Failure message), 并且显示的 detach UE
- T-eNodeB收到消息后删除对应的bearer上下文
- T-eNodeB通知S-eNodeB切换成功, S-eNodeB触发资源释放
- 进行位置更新(新的TAU是否在TAL中)
X2-based handover with Serving GW relocation
接入网路径切换
HO Decision
(终端测量当前小区及邻区的信号强度, 上报给eNodeB, eNodeB根据信号强度决定发起切换)
- source eNodeB->target eNodeB(
Handover Request消息
), 信息包括:
- S-eNB创建X2转发通道的本端TEID(S-eNB->T-eNB的X2下行隧道)
- 源SGW的用户面GTP地址和TEID( T-eNB->S-SGW的S1-U上行隧道, 由于SGW发生了改变, 所以此地址无用)
- ECGI(告诉要接入哪一个小区)
- 建立无线承载必须的信元(UE-AMBR, 安全能力, KeNB)
- T-eNB->S-eNB(
Handover Ack
)
- 创建无线承载相关ID(为创建无线承载准备)
- T-eNB创建X2转发通道的本端TEID(S-eNB->T-eNB的X2上行隧道, X2接口建立完毕)
- 源eNodeB->UE(
Handover Command
)
- UE通过同步, 信道建立过程接入T-eNB
- UE remove 那些没有到目标cell无线承载的EPS bearer
- 终端切换完后,
downlink data->S-eNodeB->X2->T-eNodeB
核心网侧路径切换
- (1)T-eNodeB->MME(
path Switch Request
), 发起核心网侧路径切换
- list of EPS bears to switch(需要切换的承载列表)
- T-eNodeB的S1-U的GTP地址和TEID
- 目标TAI信息(用于构建TAC FADN, 到DNS解析SGW列表, 根据PGW FQDN, "合一优选, 拓扑优先"选择SGW)
- ECGI(目标小区)
- [CSG ID](如果target是CSG cell)[CSG access mode='hybird'][CSG Membership Status IE]
- (2)MME->SGW(create session request), 传递T-eNodeB的GTP地址和TEID(S1-U下行隧道)
- MME根据list of EPS bearer to be switched决定触发没有被T-eNodeB接受的承载的bearer release procedure
- 如果PDN连接的默认承载没有被接受并且有多个激活的PDN连接, 则触发MME request PDN disconnection procedure
- 为 接受的承载 传递T-eNodeB的GTP地址和TEID, 每一个默认承载被接受的PDN连接都会有一个消息(S1-U下行隧道, 至此S1-U下行通道建立完成);
- User location Information IE(if change)
- UE Time Zone IE(if change)
- Serving Network IE(if change)
- CSG Information IE(if change)
- (3)目标S-GW->PGW(Modify Bearer Request), 目标SGW的GTP地址和TEID(下行S5接口隧道)
- (3b)PGW->目标SGW(Modify Bearer Response), PGW的GTP地址和TEID(上行S5接口隧道)
- (4)目标SGW->MME(Create Session Response), 传递SGW的GTP地址和TEID
- (5)MME->T-eNodeB(Path Switch Request Ack)
- SGW的GTP地址和TEID(S1-U上行隧道)
#
- UE-AMBR
- verified CSG membership status
- indicate which bearers failed to be established, 释放失败的EPS bearers的核心网资源(bearer release procedure)
- 如果没有一个默认承载切换成功, 则->T-eNodeB(Path Switch Request Failure message), 并且显示的 detach UE
- T-eNodeB收到消息后删除对应的bearer上下文
- (6)T-eNodeB->S-eNodeB, 删除源eNodeB资源(Release resource)
- (7)MME->S-SGW, 删除源SGW Session资源(Delete session request)
- cause
- Operation Indication, 这个flag is not set, 表示SGW不会向PGW发起delete procedure
- (8)进行位置更新(新的TAU是否在TAL中)
#
X2接口切换抓包验证
试验目的:将一个UE从基站A移动到基站B, 查看切换过程的码流
切换流程
# 本文使用aricent公司的SCTP协议, 配置两个基站和10个UE资源
sudo ./sim_enodeb -H 3.3.0.1 -r 7.7.7.7 -a 1 -i br1 -n 2 -u 5
# 命令帮助:
start <enb id 1> <enb id 2>: start enb from id1 to id2
start <enb id> : close and restart the sctp connection, send
the s1-setup to MME
start 0 1
# 命令帮助:
r U: start ALL UEs for all the registered enodeBs
r U <enb_id>: start ALL UEs within the enodeB
r U <enb id 1> <enb id 2>: start ALL UEs from enb_id1 to enb_id2
r u <enb id>: start one UE within the enodeB
r u <enb id 1> <enb id 2>: start one UE from enb_id1 to enb_id2
r u 0
- 将UE[0]从eNodeB Id 0移动到eNodeB Id 1
# 只有X2切换才会发送, PathSwitch Request, 一下命令用于X2接口切换
# p s(path switch)
p s <enb id1> <enb id2>: move one active-ue from enodeb id1 to enodeb
id2, send path switch request to mme
p r <enb id1> <rmt ip> <enb id2>: move one active-ue from enodeb id1 to REMOTE
enodeb id2, send path switch request to mme
# 移动一个UE
p s 0 1
UE从eNodeB Id 0 移动到了eNodeB Id 1
错误提示:
旧的ENB为确保清理干净,多删了一次UE, 重复删除时就会有这个提示
基于S1接口的切换
- 当X2切换不可用是执行S1切换
- MME不应该重定位除非UE离开MME POOL的服务区
- MME根据SGW FQDN判断是否重定位SGW
- S-eNodeB决定哪些EPS承载需要将下行或者上行(可选)数据从S-eNodeB转发到T-eNodeB
- 可以是eNodeB的X2接口直接转发(由S-eNodeB决定并且(indiation)->MME)
- 也可以是S-eNodeB->S/T-SGW->T-eNodeB的间接转发(S-eNodeB->(indication)->S-MME->(indiation)->T-MME)
- 如果MME从eNodeB收到一个S1接口流程拒绝, 指示一个S1 handover正在进行, 则
- 如果MME没有改变, 继续S1接口相关流程
- 如果MME改变, 终止S1接口相关流程
- (1)S-eNodeB决定发起S1-base handover
- 与T-eNodeB无X2连接
- X2切换失败
- 根据S-eNodeB学到的dynamic information决定
- (2)S-eNodeB->S-MME(HO Required, 不是Request)
- target TAI, 用于选择T-MME
- target eNodeB
- Direct Forwarding Path Availability, 直接转发(X2)是否可用
- S-eNodeB指示哪些Bearer需要进行数据转发(list of Bearers)
- 其他(CSG ID/CSG access mode/S1AP cause/Source to Target transport container)
- (3)S-MME->T-MME(Forward Relocation Request)
MME UE context
(IMSI/ME Identity/UE security context/UE network capability/AMBR/selected CN operator ID/ANN restriction/SGW address and TEID for control signalling
/EPS Bearer context
(PGW address and TEIDs/APN/SGW address and TEIDs/TI))
- source to target transparent container, RAN Cause, target enodeB identity, CSG ID, CSG membership indication,
target TAI
, MS info change reporting action, CSG infomation reporting action, UE time zone, Direct forwarding Flag(指示是否X2转发), Serving Network, local Home Network ID
- (4)T-MME->T-SGW(create session request)
- bearer contexts with PGW address and TEID(T-SGW->PGW的S5-U的上行通道)
- Serving Network/UE Time Zone
- (4a)T-SGW->T-MME(create session response)
- T-SGW addresses and TEIDs per bearer
- (5)T-MME->T-eNodeB(Handover Request)
- EPS bearers to setup(帮助T-eNodeB建立承载)/AMBR/S1 AP Cause/source to target transport container/CSG ID/CSG Membership Indication/Handover Restriction List
- 在T-eNodeB创建UE上下文(bearer information(
SGW address and TEID
/EPS Bearer QoS)/security context/Data forwarding not possible indication(指示还没有间接转发通道))T-eNodeB->T-SGW的S1-U上行通道
- UE-AMBR(if change)
- (5a)T-eNodeB->T-MME(Handover request Acknowledge)
- EPC Bearers setup list(建立了哪些承载, T-eNodeB addresses and TEIDs for downlink trffic on S1-U reference point接受下行数据/T-eNodeB addresses and TEIDs for receing forwarded data用于间接转发数据)
- EPC Bearers failed to setup list(哪些承载建立失败)
- target to souce transparent container
- (6)T-MME->T-SGW(Create Indirect Data Forwarding Tunnel Request)用于建立间接转发参数
- Target eNodeB addresses and TEIDS(for forwarding), T-SGW->T-eNodeB的forwarding单向通道
- (6a)T-SGW->T-MME(Create Indirect Data Forwarding Tunnel Response)
- T-SGW addresses and TEIDs(for forwarding)
- (7)T-MME->S-MME(Forwarding Relocation Reponse)
- cause/target to source transparent container/SGW change indication(指示SGW是否发生改变)/EPS Bearer setup list
- T-SGW addresses and TEIDs(for forwarding)
- (8)S-MME->S-SGW(Create Indirect Data Forwarding Tunnel Request)
- T-SGW addresses and TEIDs(for forwarding), S-SGW->T-SGW的forwarding单向通道
- (8a)S-SGW->S-MME(Create Indirect Data Forwarding Tunnel Response)
- S-SGW addresses and TEIDs(for forwarding)
- (9)S-MME->S-eNodeB(Handover Command)
- target to source transparent container
- Bearers subject to forwarding(S-SGW addresses and TEIDs for forwarding), S-eNodeb->S-SGW的单向forwarding通道
- bearers to release(指示哪些承载需要释放)
- (9a)S-eNodeB->UE(Handover Command)
- Targert to source transparent container
- UE删除在T-eNodeB上无相应radio bearer的EPS Bearer
- (10)S-eNodeB->T-eNodeB(eNB Status Transfer), via MME
- data forwarding
- S-eNodeB->T-eNodeB
- S-eNodeB->S-MME->T-MME->T-eNodeB
- (12)T-eNodeB->UE(Handover Confirm)
- downlink data: T-eNodeB->UE
- UPlink data: UE->T-eNodeB->T-SGW->PGW(上面已经建立)
- (13)T-eNodeB->T-MME(Handover Notify)
- TAI/ECGI/Local Home Network ID
- (14)T-MME->S-MME(Forwarding Relocation Complete Notification)
- S-MME设置一个timer, 监视UE和SGW上的资源
- S-MME删除UE不包括在step3中的EPS bearers, 就是删除不需要切换的承载
- (14b)S-MME->T-MME(Forwarding Relocation Complete Acknowledge)
- T-MME设置定时器监视indirect forwarding分配的资源
- (15)T-MME->T-SGW(Modify Bearer Request)
- eNodeB address and TEID(T-SGW->T-eNodeB的S1-U单向通道, 对应(5))
- PDN connection that need to be released
- 其他(user location information IE/CSG information IE/UE time zone IE/Serving Network IE)
- MME释放non-accepted dedicated bearers
- 如果default bearer of a PDN connection不被接受, 出发MME requested PDN disconnection
- (16)T-SGW->PGW(Modify Bearer Request)
- T-SGW addresses and TEIDs for S5-U downlink traffic(PGW->T-SGW的S5-U下行通道, 对应(4))
- Serving Network/PDN Charging Pause Support Indication
- User Location information IE/UE Time Zone IE/User CSG Information IE/Serving Network IE
- (16a)PGW->T-SGW(Modify Bearer Response)
- Charging Id, MSISDN, PDN Charging Pause Enabled Indication (if PDN GW has chosen to enable the function)
- (17)T-SGW->T-MME(Modify Bearer Response)
- Serving GW address and TEID for uplink traffic
- (18)TAU procedure
- (19a)UE Context Release Command, timer expires
- (19b)UE Context Release Complete
- (19c)Delete Session Request, timer expires
- (19d)Delete Session Response
- (20a)Delete Indirect Data Forwarding Tunnel Request
- release the temporary resources used for indirect forwarding that were allocated at step 8
- (20b)Delete Indirect Data Forwarding Tunnel Response
- (21a)Delete Indirect Data Forwarding Tunnel Request
- release temporary resources used for indirect forwarding that were allocated at step 6
- (21b)Delete Indirect Data Forwarding Tunnel Response