行動通訊簡訊及多媒體訊息 溫志宏 博士 吳承崧 博士 蘇暉凱 博士 國立中正大學電信研究中心 Outlines 課程內容: GSM Introduction (3 hrs) GPRS Introduction (3 hrs) SMS & EMS (3 hrs) (Ref: 3GPP TS 23.040_MMS.pdf) MMS (9 hrs) (Ref: 3GPP TS 23.140_MMSFD.pdf) MMS Application (Java 2 Micro Edition) Programming (9 hrs) 實習: MMS Application (Java 2 Micro Edition) Programming (9 hrs) GPRS network Logical network elements BS S GPRS Core network Extern al packet networ ks Value added service s (WAP) GPRS network Logical network elements BTS NMS BSC Billing SGSN Center GGSN SGSN CG NMS BG CG FW LIG = Serving GPRS Support Node = Gateway GPRS Support Node = Network Management System = Border Gateway = Charging Gateway = Firewall = Lawful Interception Gateway FW GPRS Backbone GGSN BG Internet Intranet GGSN LIG GGSN DNS Router Server LAN FW InterPLMN Network Corporate Operator Services LAN SGSN & GGSN functionalities HLR BTS MSC/ VLR BSC GGSN SS7 SGSN • GTP tunneling to SGSN • Interfaces to external IP networks • Charging & statistics • NMS interfaces SGSN • Authentication • GTP tunneling to GGSN • Ciphering & compression • Mobility management • Interaction with HLR, MSC/VLR • Charging & statistics • NMS interfaces GPRS Backbone IP Network GGSN Internet FW Serving GPRS Support Node (SGSN) Functions………. • Mobility management • Authentication • Ciphering & compression • Protocol conversion • GTP tunneling to GGSN • Interaction with HLR, MSC/VLR • Charging & statistics • NMS interfaces Gateway GPRS Support Node (GGSN) Functions………. • Essentially a router • Interfaces to external IP networks • GTP tunneling to SGSN • Charging & statistics • NMS interfaces Border Gateway (BG) Functions………. • Essentially a router similar to GGSN • Provides a secure 'tunnel' for transferring data on the inter-PLMN backbone between different operators • Supports protocols like BGP-4 Domain Name Server (DNS) Functions………. • Standard IP device • Converts domain names into IP addresses • Based on a hierarchical & distributed model Firewall (FW) Functions………. • Standard IP device • Protects against unauthorized access (hackers) Charging Gateway (CG) Functions………. • Collects charging data from SGSN & GGSN • Processes the charging data & forwards it to the Billing System Lawful Interception Gateway (LIG) Functions………. • Intercepts user data, MM information, subscriber information etc. • Forwards it to Law Enforcement Agency (LEA) GPRS Interfaces MSC/ VLR HLR Signalling and data SMSGMSC EIR Signalling Gr Gs Ga SGSN BSC Gb CG Gd Gf Gc G a Gi Gn External packet network GGSN Abis Air (Um) Gn BG Gp Inter-PLMN GPRS Backbone GGSN functionalities HLR BTS MSC/ VLR BSC SS7 SGSN GPRS Core Network GGSN Internet Server Application Layer USER PAYLOAD GTP GPRS Backbone Layers 1 & 2 UDP IP L2 L1 Tunnelled payload APP TCP/UDP IP L2 GPRS tunnel L1 Transport layer Network layer Transport layer Network layer Public Data Network Layers 1 & 2 GPRS architecture key points (1) The Gateway GPRS Support Node (GGSN): – acts as the interface between the GPRS network and external networks – collects charging data and traffic statistics – can allocate IP-addresses for users – routes packets coming from external networks towards the correct SGSN and vice versa Serving GPRS Support Node (SGSN): – converts protocols used in the IP backbone to protocols used in the BSS and the MS – takes care of authentication and mobility management – routes data to the relevant GGSN when connection to an external network is required – collects charging data and traffic statistics. Mobility Management States – The tracking of the location of an MS depends on the mobility management state. GPRS has three mobility management states. • IDLE • READY • STANDBY – Each state describes a certain level of functionality & information allocated. – The change between the states happens upon activity or when a timer expires. Mobility Management States • Idle State – Subscriber is not attached to the GPRS network – No valid MM context of the subscriber e.g. MS switched off HLR IMSI 244... VLR-1 BSC IMSI LAI SGSN ? SGSN-1 RA-1 LA-1 VLR IMSI RA Cell ? ? ? Mobility Management States • Ready State – After successful GPRS Attach – Location tracked to the cell level – Activation & deactivation of PDP context possible – Sending and receiving of SMS is possible – MS can receive paging for circuit switched services (optional) – Data can not be transferred until a PDP context is activated. After the PDP context activation, the SGSN can send data to the MS without paging at any time. – Ready timer expiry moves MS to the STANDBY state Mobility Management States • Standby State – Subscriber is attached to the MM context – Location tracked at RA level – If SGSN receives a packet for the MS, it pages in the RA. A PDP context must be active. – Activation of PDP context possible. If the MS sends data, it moves to the ready state. – MS can receive paging for CS services (optional) – The MS Reachable Timer starts ticking when the MS enters the Standby state & the MS is detached (IDLE state) upon its expiry (Implicit detach). Mobility Management - GPRS Attach (1) HLR SGSN-1 2a 2b 1 BSC RA-1 LA-1 (1) MS requests GPRS attach (2a) The MS is not known in the PLMN so the SGSN requests subscriber identity (first time) (2b) The MS sends its IMSI. GPRS Attach (2) -Authentication 3b HLR 3a SGSN-1 3c 3d BSC RA-1 LA-1 (3a) SGSN requests triplets from HLR (3b) The AC generates the triplets and hands them to the SGSN (3c) The SGSN sends an Authentication Request to the MS (3d) MS sends back the Authentication Response The SGSN performs the authentication GPRS Attach (3) - IMEI check 4d EIR 4c SGSN-1 4a 4b BSC RA-1 LA-1 (4a) SGSN asks for the MS IMEI (4b) MS sends the IMEI (4c) SGSN sends a Check IMEI message to the EIR (4d) EIR replies with a Check IMEI ack that will include the list type Mobility Management - GPRS Attach (4) HLR 5d 5b 5a SGSN-1 5c 6a BSC 6b RA-1 LA-1 (5a) SGSN sends an Update location message to the HLR with the IMSI (5b) The HLR responds by giving subscriber data to the SGSN (5c) The SGSN acknowledges that it has received the subscriber data ok (5d) The HLR ends the transaction with an Update Location acknowledge (6a) The SGSN accepts the GPRS attach and sends the MS a new P-TMSI (6b) The MS acknowledges that it has received the new P-TMSI Session Management - PDP Context Activation Process of assigning an IP address for becoming a part of the IP network • One or more addresses can be assigned to an IMSI (MS). • Contains mapping and routing information for transferring PDUs between MS and GGSN. • Information includes: IP address, Access Point Name, QoS, Radio Priority, NSAPI, and LLC SAPI. • Static addresses: address allocated by operator to an MS permanently and this address is stored in the HLR. • Dynamic addresses: GGSN dynamically allocates and releases addresses as PDP contexts are activated and deactivated. PDP context activation Overview SGSN 3b GGSN 3a BSC RA-1 LA-1 4 2 1. Activate PDP context request 1 2. Auth. /IMEI check (optional) 3a. Create PDP context request 3b. Create PDP context response 4. Activate PDP context accept PDP Context Activation - 1 1. MS sends "Activate PDP Context Request" to SGSN HLR 2 BSC BTS SS7 1 APN= "Intranet.Ltd.com" – Access Point Name – PDP Type (IP) – PDP Address (empty = dynamic) – QoS & other options SGSN DNS GPRS Core Network Access Point Intranet GGSN Internet 2. SGSN checks Subscription data Access Point Name Dynamic / static IP address PDP Context Activation - 2: Finding the GGSN 3. SGSN gets the GGSN IP address from DNS APN maps to the GGSN IP address BTS BSC SGSN 3 4 GPRS Core Network 4. SGSN sends "Create PDP Context Request" to GGSN PDP Type (e.g. IP) PDP Address (if empty=> dynamic address) Access Point Name DNS QoS & other options Access Point Intranet GGSN Internet PDP Context Activation - 3 Access Point Selection BTS BSC SGSN • Access Point Name refers to the external network the subscriber wants to use – Physical/logical interface in GGSN • Access Point configuration in GGSN defines where to connect the user DNS APN= "Intranet.Ltd.com" GPRS Core Network Intranet GGSN Internet PDP Context Deactivation •The MS or the network can deactivate a PDP context. •Every address can be deactivated separately, but performing a GPRS Detach will automatically remove all the PDP contexts. SMS data transfer a) MSC address b) SGSN address 2) HLR 3a) MSC 1) SMS 3b) SGSN G-MSC SMSC 2). Send routing info. for Short Message (GMSC-HLR) Send routing info. for Short Message result (HLR-GMSC) PDP Context Activation - 4 Context Activated BTS • User authenticated OK (nontransparent case) • User dynamic IP address allocated by RADIUS server, or DHCP server, or GGSN internal pool 5. GGSN sends "Create PDP Context Response" back to SGSN BSC 6. SGSN sends "Activate PDP Context Accept" to the MS 6 SGSN GPRS Core Network • SGSN now ready to route user traffic between MS and GGSN GGSN Intranet 5 Internet GPRS Attach v/s PDP Context Activation • GPRS Attach – MOBILITY MANAGEMENT PROCEDURE – Establishes a logical link between the MS and the SGSN. – Makes the MS available for SMS over GPRS, paging via SGSN, and notification of incoming GPRS data. – Transmission of user data is not possible • PDP Context Activation – IP address is assigned to the MS. – Makes the MS known in the corresponding GGSN. – SESSION MANAGEMENT PROCEDURE Context Activation for a Roaming User (0) Visited Operator DNS .GPRS DNS SGSN BG Inter-PLMN GPRS Backbone DNS HOME BG HOME Operator GPRS GGSN Context Activation for a Roaming User (1) Visited Operator, Singapore DNS 2 3 Singapore GPRS SGSN Backbone .GPRS DNS BG Inter-PLMN GPRS Backbone 1 DNS HOME BG HOME Operator GPRS GGSN GSM OPERATOR, Finland Embassy Intranet Context Activation for a Roaming User (2) Visited Operator, Singapore DNS Singapore GPRS SGSN Backbone 5 BG DNS HOME BG HOME Operator GPRS .GPRS DNS 4 Inter-PLMN GPRS Backbone GGSN GSMOPERATOR, Finland Embassy Intranet Context Activation for a Roaming User (3) Visited Operator, Singapore DNS Singapore GPRS SGSN Backbone BG 7 6 DNS HOME .GPRS DNS BG HOME Operator GPRS Inter-PLMN GPRS Backbone GGSN GSMOPERATOR, Finland Embassy Intranet Context Activation for a Roaming User (4) Visited Operator, Singapore DNS 8 Singapore GPRS SGSN Backbone .GPRS DNS BG 9 DNS HOME BG HOME Operator GPRS Inter-PLMN GPRS Backbone GGSN GSMOPERATOR, Finland Embassy Intranet The Data Flow in a Roaming Case Visited Operator, Singapore Singapore GPRS SGSN Backbone BG Inter-PLMN Backbone BG HOME Operator GPRS GGSN GSMOPERATOR, Finland Embassy Intranet Connection options SGSN Gp Singapore GPRS Backbone BG GGSN Internet Inter-PLMN Backbone Gp Gi BG HOME Operator GPRS GGSN Gi Embassy Intranet Roaming, Dynamic IP-address from Home Network, APN Always the Same Visited Operator SGSN Visited-PLMN GPRS Backbone GGSN BG Inter-PLMN GPRS Backbone IP address changes BG HOME Operator GPRS GGSN Internet/ Intranet Access Point Roaming, Dynamic IP-address from a Visited Network Visited Operator SGSN Visited-PLMN GPRS Backbone GGSN Access Point BG Inter-PLMN GPRS Backbone x.x.x.x Internet BG HOME Operator GPRS GGSN Charging of GPRS services GTP' Charging gateway Nokia GPRS Charging Gateway: SGSN Operator IP backbone Border Gateway Inter operator IP network Billing System GTP' GGSN Internet * receives CDRs generated by SGSN and GGSN •consolidates and merges CDRs to a suitable format for BS GGSN Charging Functions CG SGSN Operator IP backbone G-CDRs GGSN Internet GGSN CDR (PDP context data) : G-CDR Start collection: - PDP context activation Stop collection: - PDP context deactivation Collected information e.g. - Traffic volumes uplink/downlink - QoS negotiated - Duration - SGSN & GGSN address - Access Point Name SGSN Charging Functions S-CDRs M-CDRs SMSCDRs CG SGSN Operator IP backbone GGSN Internet SGSN CDR (PDP context data) : S-CDR Start collection: - PDP context activation Stop collection: - PDP context deactivation Collected information e.g. - Traffic volumes uplink/downlink - QoS requested/negotiated - Duration - SGSN & GGSN address - Access Point Name Mobility Management CDR : M-CDR Start collection: - GPRS activation / Incoming SGSN RA update Stop collection: - GPRS deactivation / Outgoing SGSN RA update Collected information - Location changes CG Functionality Main tasks of CG are: • CDR collection from GSNs (CG receives the CDRs with GTP') • intermediate storage for CDRs • CDR validation • CDR consolidation • CDR formatting • adaptation to different CCB System interfaces • to reduce the CDR processing load of the CCB System GPRS Charging introduces new billing concepts GSM traffic GPRS traffic Rating based on: Dialled digits Access Point Name IP Address Allocation Usage based on: Call duration SMS transaction Data Volume Context duration SMS transaction Intermediate records: Not needed Necessary Roaming case 1 Visitor CLEARING CCB CCB CG CG SGSN HOME NETWORK SGSN Operator B IP backbone Operator A IP backbone Border Gateway GGSN APN GGSN APN Internet VISITING NETWORK Roaming case 2 Visitor CLEARING CCB SGSN HOME NETWORK CCB CG CG SGSN Operator B IP backbone Operator A IP backbone Border Gateway GGSN APN GGSN APN Internet VISITING NETWORK APN (Access Point Name) •APN=Network ID+Operator ID Example: internet201.kgt.com,tw.mnc088.mcc466.gprs •Selection Mode *SentByMS: MS-provided APN, subscription not verified. *Subscribed: MS or Network-provided APN, subscription verified. *ChosenBySGSN: Network-provided APN, subscription not verified. •The SGSN select the APN to be used to derive the GGSN address •Wild Card APN: The user can select whichever APN he wants Selection Algorithm Y MS Request ? N Y N Wild Card ? N SentByMS Subscribed Wild Card ? Y ChosenBySGSN N Single PDP in HLR? Y Subscribed PDP Context Activate Reject Wild Card APN in HLR IMSI .................... 46688xxxxxxxxxxxxx SGSN ADDRESS ............ MT-SMS VIA SGSN ......... N NETWORK ACCESS .......... BOTH PDP CONTEXT ID .......... 1 PDP TYPE ................ IPv4 PDP ADDRESS ............. VPLMN ALLOWED ........... N PRECEDENSE CLASS ........ 2 DELAY CLASS ............. 4 RELIABILITY CLASS ....... 2 PEAK THROUGHPUT CLASS ... 9 MEAN THROUGHPUT CLASS ... 31 APN ..................... * 3 PDP Context in HLR IMSI .................... 46688xxxxxxxxxxxxx SGSN ADDRESS ............ MT-SMS VIA SGSN ......... N NETWORK ACCESS .......... BOTH PDP CONTEXT ID .......... 1 PDP TYPE ................ IPv4 PDP ADDRESS ............. VPLMN ALLOWED ........... N PRECEDENSE CLASS ........ 2 DELAY CLASS ............. 4 RELIABILITY CLASS ....... 3 PEAK THROUGHPUT CLASS ... 9 MEAN THROUGHPUT CLASS ... 31 APN ..................... internet Aicent Hutchison GGSN Roaming connectivity Root DNS Vlan Gn Vlan MS IT Router BSS INTERNET BG HLR SGSN E1 Lambda ATM PVC DCN Router SS7 Gp VLAN1 BG1 . MS1 MS1 Roaming APN :x.x.x.x BG2 BSS HLR mnc088.mcc466.gprs MS1 sgsn-01 ggsn01 ggsn02 BSS sgsn ggsn03 (Gn VLAN) ggsn04 Router ggsn01 (Gn VLAN) Router MS2 ggsn02 ggsn03 sgsn-02 Dns-1 Dns-2 Router ggsn01 GRX connectivity (via internet) VPN via internet (Gn VLAN) BSS sgsn ggsn02