GPRS信令流程潘冲GPRS系统结构GfGaGaDGiGnGbGcCEGpGsSignallingandDataTransferInterfaceSignallingInterfaceMSC/VLRTEMTBSSTEPDNRUmGrAHLROtherPLMNSGSNGGSNGdSM-SCSMS-GMSCSMS-IWMSCGGSNCGFSGSNGnEIRBillingSystem传输平面GSMRFMACRLCLLCSNDCPIP/X.25ApplicationGSMRFMACRLCL1bisNetworkServiceBSSGPRelayL1bisNetworkServiceBSSGPL1L2IPL1L2IPUDP/TCPGTPIP/X.25LLCSNDCPUDP/TCPGTPRelayMSBSS/PCUSGSNGGSNUmGbGnGi信令平面BSSGPRelayGMM/SMLLCRLCMACGSMRFGMM/SMLLCBSSGPL1bisUmGbMSBSSSGSNNetworkServiceRLCMACGSMRFL1bisNetworkServiceSCCPMTP2MTP3MTP2MTP3SCCPGr/Gf/GdSGSNHLRTCAPMAPTCAPMAPL1L1SCCPMTP2MTP3MTP2MTP3SCCPGsSGSNMSC/VLRBSSAP+BSSAP+L1L1UDPL2L1IPL2L1IPUDPGnGSNGSNGTPGTPSCCPMTP2MTP3MTP2MTP3SCCPGcGGSNHLRTCAPMAPTCAPMAPL1L1GnUDPL2IPGGSNL1L2IPGSNGTPL1MTP2MTP3SCCPMAPL1MTP2MTP3SCCPHLRTCAPMAPL1GTPGcInterworkingTCAPUDPMS-SGSNSGSN-HLR/EIR/SMSSGSN-MSC/VLRGSN-GSNGPRS信道52复帧结构52TDMAFramesB0B1B2TB3B4B5IB6B7B8TB9B10B11I01234567012345670123456701234567TDMAframeRLCBlockB0-B11为RLCBlock,包括PBCCH,PCCCH(PAGCH,PPCH,andPRACH),PACCH,PDTCH,T代表PTCCH,每个52-Multifrme中有两个PTCCHFrame.I代表IdleFrame1个52-Multifrme可被看成2个26-Multiframe.分组逻辑信道GroupNameDirectionFunctionPBCCHPBCCHDLBroadcastPDTCHUL&DLDataPACCHUL&DLAssociatedcontrolPTCHPRACHULRandomaccessPPCHDLPagingPAGCHDLAccessgrantPNCHDLMulticastPCCCHGPRS移动性管理(GMM)GMM中MS的状态IDLE:用户没有附着(Attach)在GPRS网络上,MS和SGSN上下文(Context)中没有该用户的路由信息,也不会进行相关的GPRS移动性管理过程。在该状态下MS无法进行数据传输,也不能接收GPRS寻呼消息。STANDBY:用户已附着在GPRS网络上,MS和SGSN上已经建立对于该用户IMSI的移动管理上下文,MS可以接收来自网络方的GPRS寻呼消息,但不能传输数据。READY:该状态下与STANDBY状态相比,在SGSN移动管理上下文中用户的信息已定位在cell级,MS会将所选cell报告给SGSN。在该状态下,MS可以进行数据传送。GPRS移动性管理Idle/Standby/Ready状态转换PDUtransmissionSTANDBYtimerexpiryorCancelLocationGPRSAttachREADYtimerexpiryorForcetoSTANDBYSTANDBYtimerexpiryGPRSDetachGPRSAttachPDUreceptionGPRSDetachorCancelLocationMMStateModelofMSMMStateModelofSGSNIDLEREADYSTANDBYIDLEREADYSTANDBYREADYtimerexpiryorForcetoSTANDBYorAbnormalRLCconditionAttach信令流程7d.CancelLocationAck7c.CancelLocation7b.UpdateLocation7g.UpdateLocationAck7e.InsertSubscriberData7f.InsertSubscriberDataAck6d.InsertSubscriberData6c.CancelLocationAck6b.CancelLocation3.IdentityResponse2.IdentificationResponse2.IdentificationRequest1.AttachRequest5.IMEICheck3.IdentityRequest4.Authentication6a.UpdateLocation7a.LocationUpdatingRequest7h.LocationUpdatingAccept6f.UpdateLocationAck6e.InsertSubscriberDataAckMSBSSnewSGSNoldSGSNGGSNHLREIRoldMSC/VLRnewMSC/VLR9.AttachComplete8.AttachAccept10.TMSIReallocationCompleteDetach信令流程3.IMSIDetachIndication2.DeletePDPContextResponse1.DetachRequest2.DeletePDPContextRequest5.DetachAcceptMSBSSGGSNSGSNMSC/VLR4.GPRSDetachIndication2.DeletePDPContextResponse1.DetachRequest2.DeletePDPContextRequest4.DetachAcceptMSBSSGGSNSGSNMSC/VLR3.GPRSDetachIndicationHLRMSBSSGGSNSGSNMSC/VLR3.DeletePDPContextRequest1.CancelLocation4.GPRSDetachIndication2.DetachRequest6.CancelLocationAck3.DeletePDPContextResponse5.DetachRequest手机发起SGSN发起HLR发起GPRS移动性管理路由区更新(RAU)LA≥RA≥CELLRAI=MCC+MNC+LAC+RACLocationArea(LA)RoutingArea(RA)SGSNMSC/VLRGsI路由区更新信令流程MSBSSnewSGSNHLRGGSNoldSGSNMSC/VLR2.SGSNContextResponse3.SecurityFunctions1.RouteingAreaUpdateRequest2.SGSNContextRequest6.UpdatePDPContextRequest6.UpdatePDPContextResponse7.UpdateLocation10.UpdateLocationAck12.RouteingAreaUpdateAccept11.LocationUpdatingRequest11.LocationUpdatingAccept8.CancelLocation8.CancelLocationAck9.InsertSubscriberDataAck9.InsertSubscriberData13.RouteingAreaUpdateComplete5.ForwardPackets4.SGSNContextAcknowledgeGPRS会话管理分组数据协议(PDP)PDP地址PDP地址是GPRSMS在网络层的标识,由于GPRS网络可以支持的数据服务多种多样(就目前而言支持IP和X.25),那么相应的PDP地址也就可能是多种多样的,例如:-anIPversion4address;-anIPversion6address;-anX.121address.PDP上下文(PacketDataProtocolContext)每一个GPRS用户都有一个或多个PDP地址,PDP地址通过PDP上下文来描述。PDP上下文的内容APN:接入点(AccessPointName)例如:cmwap、cmnetPDPTYPE:IPorX.25PDPAddress:IPAddressorX.121AdressNSAPIQoSProfilePDP上下文状态的转换DeactivatePDPContextorMMstatechangetoIDLEActivatePDPContextINACTIVEACTIVEPDP上下文的激活GGSN4.ActivatePDPContextAccept3.CreatePDPContextResponse3.CreatePDPContextRequest1.ActivatePDPContextRequestSGSNMS2.SecurityFunctionsPDP上下文的去激活GGSN4.DeactivatePDPContextAccept3.DeletePDPContextResponse3.DeletePDPContextRequest1.DeactivatePDPContextRequestSGSNMS2.SecurityFunctionsGGSN1.DeletePDPContextRequestSGSN3.DeletePDPContextResponse2.DeactivatePDPContextAccept2.DeactivatePDPContextRequestMS手机发起GGSN发起GPRS的接入和数据传输TemporaryBlockFlow数据传输在RLC层上是通过TBF来实现的,上下行TBF是相互独立的,一个TBF可以包含很多LLC帧TBF由TFI来标识,TFI的长度为7bits,它在RLC层数据传输中相当于MS的标识,因此在一个小区中不可能有两个MS同时拥有相同的上行或下行TFI对于RLC层来说,GPRS的接入过程实际就是申请和分配TFI的过程,MS在得到TFI后,所有RLC数据块的头信息里都包含有该TFI的值,直到该TBF的结束。GPRS上行接入OnephaseMS在信道请求中会说明请求1个或多个PDCH信道,系统根据该信道请求分配相应数量的PDCH和上行TFITwophase系统根据信道请求先分配给MS保留的PDCH信道,MS用该PDCH发送PacketResourceRequest消息,该消息包含详细的资源请求信息,系统再根据这些信息通过PacketUplinkAssignment给MS指配上行TFI和要求的PDCHonephase接入MSNetworkPacketChannelRequestPacketImmediateAssignmentUplinkData(TLLI)UplinkData(TLLI)PRACHorRACHPAGCHorAGCHPDTCHPDTCHUplinkData(TLLI)PDTCHPacketUplinkAck/NackPACCHPDTCHUplinkData......twophase接入MSNetworkPacketChannelRequestPacketImmediateAssignmentPacketResourceRequestPacketResourceAssignmentPRACHorRACHPAGCHorAGCHPACCHPAC