<<

Openair LTE Core Network User Plane

Training session

OAI workshop, BUPT Beijing, 04.27.2017

April 27, 2017 Openair-cn training - User Plane 1 OPENAIR-CN training Plan

● Plan – Scope – Progress – 3GPP bullets about tunneling – Openair-cn tunneling – SPGW software architecture – Classification of user traffic – What is missing

April 27, 2017 Openair-cn training - User Plane 2 SCOPE

April 27, 2017 Openair-cn training - User Plane 3 OPENAIR-CN training Scope

● Targeted audience: Code contributors, testers, users of openair-cn. ● Objectives – Save time for willing contributors who want to understand what is in openair-cn : ● Show differences between 3GPP spec and current implementation. ● Show some of internals, API.

April 27, 2017 Openair-cn training - User Plane 4 Progress made in User plane since 1 year

● Use of OSMOCOM libgtnl and their GTP Linux kernel module contribution in kernel > 4.7. – Removed old design relying on netfilter and GTP xtables extension.

● Implementation of a dedicated bearer allowing PCEF contribution.

April 27, 2017 Openair-cn training - User Plane 5 LTE core network scope Scope : Reminder 3GPP LTE Core Network entities

● LTE network entities :

Implemented in openair-cn HSS EIR Implemented in openairinterface5g

X2 S

6 3

- 1 UE a S Not implemented E-Utran Uu ME eNB -MME MME SGSN

USIM PCRF S

1 4 1 S c Gx Gx

SGI RNC S1-U SGW S5/ PGW (optional tun)

April 27, 2017 Openair-cn training - User Plane 6 3GPP LTE Tunneling User plane overview

● Protocol stacks overview and S1U/S5 encapsulation

IP UDP GTP L2 IP L4 Appli 20 8 8 UE eNB SGW PGW Node Appli Appli

L4 L4

IP IP

PDCP PDCP GTP GTP GTP GTP IP UDP UDP UDP UDP RLC RLC IP IP IP IP

MAC MAC L2 L2 L2 L2 L2

PHY PHY L1 L1 L1 L1 L1

LTE-Uu S1-U S5 April 27, 2017 Openair-cn training - User Plane 7 LTE Tunneling, wireshark view

IP Tunneling

UDP

GTP

IP L4 Appli April 27, 2017 Openair-cn training - User Plane 8 LTE Tunneling port numbers

● 3GPP TS 29.281 section 4.4.2.3 Encapsulated T-PDUs : – The UDP Destination Port number shall be 2152. It is the registered port number for GTP-U. – The UDP Source Port is a locally allocated port number at the sending GTP-U entity.

April 27, 2017 Openair-cn training - User Plane 9 LTE Tunneling fragmentation

● GTPv1 described in 3GPP TS 29.281 – Section 4.2.2 IP transport : Unnecessary fragmentation should be avoided when possible due to the following; ● Fragmentation is bandwidth inefficient, since the complete IP header is duplicated in each fragment. ● Fragmentation is CPU intensive since more fragments require more processing at both GTPv1-U endpoints and IP routers. It also requires additional memory at the receiver. ● If one fragment is lost, the complete packet has to be discarded. The reason is there is no selective retransmission of IP fragments provided in IPv4 or IPv6.

April 27, 2017 Openair-cn training - User Plane 10 LTE Tunneling fragmentation

● 3GPP TS 36.300 section 4.5 IP fragmentation – Fragmentation function in IP layer on S1 and X2 shall be supported. – Configuration of S1-U (X2-U) link MTU in the eNB according to the MTU of the network domain the node belongs to shall be considered as a choice at network deployment. The network may employ various methods to handle IP fragmentation, but the specific methods to use are implementation dependant.

April 27, 2017 Openair-cn training - User Plane 11 LTE core network scope Reminder : Openair LTE Network entities

● LTE entities:

Network function Implemented in openair-cn HSS Implemented in openairinterface5g

Repository [email protected]:oai/openair- MME eNB S1-C cn.git S 1 1

SGW PGW Repository [email protected]:oai/open airinterface5g.git S1-U Bearer GTP SGI encap/decap

April 27, 2017 Openair-cn training - User Plane 12 Openair : LTE Tunneling User plane overview

● Protocol stacks overview and S1U encapsulation, missing split between SGW and PGW. IP UDP GTP L2 IP L4 Appli 20 8 8 UE eNB S+PGW Node Appli Appli

L4 L4

IP IP

PDCP PDCP GTP GTP IP UDP UDP RLC RLC IP IP

MAC MAC L2 L2 L2

PHY PHY L1 L1 L1

LTE-Uu S1-U April 27, 2017 Openair-cn training - User Plane 13 Openair : GTP conformance

● Implemented : – T-PDU (source port is not random: 2152)

● Not implemented : – Path Management messages ● Echo Request/Response : Not implemented – Tunnel Management Messages ● Error Indication ● End marker

April 27, 2017 Openair-cn training - User Plane 14 LTE Tunneling fragmentation OPENAIR-CN recommendation

● Considering the comments of 3GPP about fragmentation, we encourage people to increase the MTU of S1-U interfaces by almost 36 bytes, the more, the better (We use the max allowed MTU by our hardware that is 9000).

April 27, 2017 Openair-cn training - User Plane 15 Tunneling - when

● How build a tunnel from the protocol point of view ? – FTEID have to be exchanged between peers (eNB, SGW) – When ?

April 27, 2017 Openair-cn training - User Plane 16 Interaction Control-Plane/User plane Focus on the creation of the S1-U tunnel endpoints eNB MME SPGW HSS

InitialUEMessage/AttachRequest-PDNConnectivityRequest dowlinkNASTransport/IdentityRequest uplinkNASTransport/IdentityResponse AuthenticationRequest AuthenticationAnswer dowlinkNASTransport/AuthenticationRequest uplinkNASTransport/AuthenticationResponse dowlinkNASTransport/SecurityModeCommand uplinkNASTransport/SecurityModeComplete UpdateLocationRequest UpdateLocationAnswer Crea teS ess ionR equ est Allocation of the SGW FTEID InitialContextSetupRequest/ Crea teS ess ionR esp ons e (Should create the UL tunnel) Att ac hA cc ep t-A ct iva teD ef au ltEPSBearerContextRequest Initia lCo nte xtS etup Re spo nse / Inform of the SGW FTEID uplin kN AST ran spo rt/ Creation of the eNB FTEID AttachComplete-ActivateDefaultEPSBearerContextAccept ModifyBearerRequest Creation of the bidir. tunnel Mod ifyB ear erRe spo nse Inform SGW about eNB FTEID

April 27, 2017 Openair-cn training - User Plane 17 Creation of the default S1-U tunnel endpoints (wireshark overview)

Allocation of the SGW FTEID

Inform eNB of the SGW FTEID Creation of the eNB FTEID Inform SGW about eNB FTEID

April 27, 2017 Openair-cn training - User Plane 18 Creation of the dedicated S1-U tunnel endpoints (wireshark overview)

April 27, 2017 Openair-cn training - User Plane 19 Interaction Control-Plane/User plane Focus on the creation of the dedicated S1-U tunnel endpoints

April 27, 2017 Openair-cn training - User Plane 20 Create Session Request MME->SGW

Default EBID

April 27, 2017 Openair-cn training - User Plane 21 S11 Create Session Response SGW->MME

Default EBID

S1U SGW F-TEID

April 27, 2017 Openair-cn training - User Plane 22 Initial Context Setup MME->eNB

S1U SGW F-TEID

April 27, 2017 Openair-cn training - User Plane 23 S1AP Initial Context Setup Response eNB->MME

S1U eNB F-TEID

April 27, 2017 Openair-cn training - User Plane 24 S11 Modify Bearer Request MME->SGW

Default EBID

S1U eNB F-TEID

April 27, 2017 Openair-cn training - User Plane 25 S11 Modify Bearer Response SGW->MME

April 27, 2017 Openair-cn training - User Plane 26 SOFTWARE ARCHITECTURE

April 27, 2017 Openair-cn training - User Plane 27 LTE Software Architecture SPGW ITTI design

● Each ITTI task communicates with others with ITTI messages (asynchronous) Described in previous session spgw process

S11 UDP SPGW_APP

NwGtpv2c ITTI API (Messages, sockets, Create/delete Author : timers facilities, memory pool) GTPv1 tunnels Amit Chawre

glibc Timer API epoll API Lfds API Libgtpnl Author : Pablo Neira Ayuso Legend : ITTI task

GTP Linux Kernel module (Version >=4.7) Authors: Harald Welte , Pablo Neira Ayuso , Andreas Schultz

April 27, 2017 Openair-cn training - User Plane 28 TRAFFIC CLASSIFICATION

April 27, 2017 Openair-cn training - User Plane 29 CLASSIFICATION OF USER TRAFFIC Static PCC rules

● A set of static PCC rules are PCC Rule 0 loaded on init in SPGW SDF template x (missing Gx interface). PCC Rule n SDF Filter PCC Rule n+1 ● Each rule contain one SDF SDF template x SDF Filter template. SDFSDF Filter template ● Each SDF template contains SDF Filter Bearer QOSSDF Filter 1 or more SDF filters. Qci, arp, gbr, mbr SDF Filter ● Any IP flow matching a SDF Bearer QOS Qci, arp, gbr, mbr filter will be mapped to a Bearer QOS bearer having the QOS Qci, arp, gbr, mbr defined in the PCC rule

April 27, 2017 Openair-cn training - User Plane 30 CLASSIFICATION OF USER TRAFFIC Static PCC rules

● See examples of static PCC rules (to be extended) in https://gitlab.eurecom.fr/oai/openair-cn/blob/ master/SRC/SGW/pgw_pcef_emulation.c function pgw_pcef_emulation_init()

April 27, 2017 Openair-cn training - User Plane 31 CLASSIFICATION OF USER TRAFFIC 3GPP SDF classification

April 27, 2017 Openair-cn training - User Plane 32 CLASSIFICATION OF USER TRAFFIC OPEANAIR-CN SDF Classification in SPGW

IP packet are first marked with the SDF ID For any UE

April 27, 2017 Openair-cn training - User Plane 33 3GPP service data flow mapping to EPS bearers

April 27, 2017 Openair-cn training - User Plane 34 OPENAIR-CN Service Data Flow mapping to EPS bearers

SDF ID detection from predefined static PCC rules: -A POSTROUTING -d 172.16.0.0/12 -p icmp -j MARK --set-xmark 0x20/0xffffffff -A POSTROUTING -d 172.16.0.0/12 -j MARK --set-xmark 0x1f/0xffffffff

«Default» SDF Table mangle GTP ENCAP OUTPUT OUTPUT Local process S1-U gtp0 POSTROUTING POSTROUTING SGI GTP DECAP

SDF ID to EPS Bearer ID Default EBI allocated by MME

Dynamic rule mapping a SDF ID to EPS Bearer ID : -A POSTROUTING -o gtp0 -d 172.16.0.2/32 -m mark --mark 0x1f -j MARK --set-mark 0x05/0xffffffff

April 27, 2017 Openair-cn training - User Plane 35 EPS bearer to S1-U tunnel mapping in GTP kernel module

● Added EPS bearer id to libgtpnl primitives ● Added EPS bearer id to PDP context in kernel gtp.c PDP context IPv4 address EPS Hash u32 i_tei ; = IP bearer u32 PDP o_tei context ; destination ID = u8 u32 bearer_id i_tei ; ; address skb structu32 in_addr ms_addr_ip4; PDP o_tei context ; u32 i_tei ; mark ipv4_hashfn() structu8 in_addr sgsn_addr_ip4; bearer_id ; u32 o_tei ; ipv4_ebi_hashfn() struct in_addr ms_addr_ip4; 172.16.0.2 5 structu8 in_addr sgsn_addr_ip4; bearer_id ; struct in_addr ms_addr_ip4; 172.16.0.2 6 h2 struct in_addr sgsn_addr_ip4; ... hx

April 27, 2017 Openair-cn training - User Plane 36 Enabling Paging in openair-cn

Figure from « 3GPP TS 23.401 version 10.13.0 Release 10 »

April 27, 2017 Openair-cn training - User Plane 37 Enabling Paging in openair-cn

Figure from « EMM Procedure 4. Service Request » www.netmanias.com NMC Consulting Group ([email protected])

April 27, 2017 Openair-cn training - User Plane 38 Enabling Paging in openair-cn

● A kind of Traffic Detection Function has to be implemented in the data path – could be implemented in GTP kernel module => ● Need for an interface between GTP kernel module and SPGW. – Could also be implemented out of the GTP kernel module.

● Need for GTPv2-C Downlink Data Notification, Downlink Data Notification Acknowledge messages triggered by the Traffic Detection Function.

April 27, 2017 Openair-cn training - User Plane 39 What is missing

April 27, 2017 Openair-cn training - User Plane 40 What is missing

● EPS bearer and SDF classification in uplink (enable QOS enforcement) ● QOS (Max and guaranteed bitrates) – Implementation (Qdiscs) and automate tests

● Traffic flow aggregation (missing parts in control plane) for bearer that have same QCI and same ARP.

April 27, 2017 Openair-cn training - User Plane 41 Thank you

April 27, 2017 Openair-cn training - User Plane 42 CLASSIFICATION OF SDF TRAFFIC

● Missing feature :

– Network entity Implemented in openair-cn Missing Gx HSS Implemented in openairinterface5g interface Not implemented, not interfaced

S

6

- for PCRF. a S10

eNB S1-C MME PCRF S

1 c x x 1

G G

S1-U SGW S5/S8 PGW SGI

April 27, 2017 Openair-cn training - User Plane 43 April 27, 2017 Openair-cn training - User Plane 44 3GPP TS 23.002 4.1.4.2.1.

● Serving GW ● The Serving GW is the gateway which terminates the interface towards E-UTRAN.

● For each UE associated with the EPS, at a given point of time, there is a single Serving GW. For detailed S-GW

● functions, see TS 23.401 [76] and TS 23.402 [77].

● Connectivity to a GGSN is not supported.

● The functions of the Serving GW include: ● - the local Mobility Anchor point for inter-eNodeB handover;

● - Mobility anchoring for inter-3GPP mobility;

● - ECM-IDLE mode downlink packet buffering and initiation of network triggered service request procedure;

● - Lawful Interception;

● - Packet routeing and forwarding; ● - Transport level packet marking in the uplink and the downlink;

● Accounting on user and QCI granularity for inter-operator charging; ● - A local non-3GPP anchor for the case of roaming when the non-3GPP IP accesses connected to the VPLMN;

● - Event reporting (change of RAT, etc.) to the PCRF;

● - Uplink and downlink bearer binding towards 3GPP accesses as defined in TS 23.203 [73];

● - Uplink bearer binding verification with packet dropping of "misbehaving UL traffic";

● - Mobile Access Gateway (MAG) functions if PMIP-based S5 or S8 is used; ● - Support necessary functions in order for enabling GTP/PMIP chaining functions.

April 27, 2017 Openair-cn training - User Plane 45 ● Serving Gateway

● The SGW is a data plane element whose primary function is to manage user-plane mobility and act as a demarcation point between the RAN and core networks. SGW maintains data paths between eNodeBs and the PDN Gateway (PGW). From a functional perspective, the SGW is the termination point of the packet data network interface towards E-UTRAN. When terminals move across areas served by eNodeB elements in E-UTRAN, the SGW serves as a local mobility anchor. This means that packets are routed through this point for intra E- UTRAN mobility and mobility with other 3GPP technologies, such as 2G/GSM and 3G/UMTS. Figure 3 shows the Serving Gateway.

April 27, 2017 Openair-cn training - User Plane 46 3GPP TS 23.002 4.1.4.2.2.

● PDN GW

● The PDN GW is the gateway which terminates the SGi interface towards the PDN.

● If a UE is accessing multiple PDNs, there may be more than one PDN GW for that UE, however a mix of S5/S8

● connectivity and Gn/Gp connectivity is not supported for that UE simultaneously.

● The P GW provides PDN connectivity to both GERAN/UTRAN only UEs and E UTRAN capable UEs using any of E

● UTRAN, GERAN or UTRAN. The P GW provides PDN connectivity to E UTRAN capable UEs using E UTRAN only

● over the S5/S8 interface. The P¬GW may also provide PDN connectivity to UEs using non-3GPP access networks with

● the procedures defined in TS 23.402 [77].

● For detailed PDN-GW functions, see TS 23.401 [76] and TS 23.402 [77].

● PDN GW functions include:- Per-user based packet filtering (by e.g. deep packet inspection);

● - Lawful Interception;

● - UE IP address allocation;

● - Transport level packet marking in the uplink and downlink, e.g. setting the DiffServ Code Point, based on the

● QCI of the associated EPS bearer;

● - UL and DL service level charging, gating control, rate enforcement as defined in TS 23.203 [73];

● - UL and DL rate enforcement based on APN-AMBR;

● - DL rate enforcement based on the accumulated MBRs of the aggregate of SDFs with the same GBR QCI

● (e.g. by rate policing/shaping);

● - DHCPv4 (server and client) and DHCPv6 (client and server) functions;

● Additionally the PDN GW includes the following functions for the GTP-based S5/S8/S2b:

● - UL and DL bearer binding as defined in TS 23.203 [73];

● - UL bearer binding verification;

● The PDN GW functions also includes user plane anchor for mobility between 3GPP access and non-3GPP access. It

● supports:

● - A LMA function for PMIPv6, if PMIP-based S5 or S8, or if S2a or PMIP based S2b is used;

● - A DSMIPv6 Home Agent, if S2c is used;

● - Allocation of GRE key, which is used to encapsulate uplink traffic to the PDN GW on the PMIP-based S5/S8, or

● S2a or PMIP based S2b interface;

● - A MIPV4 Home Agent, if S2a with MIPv4 FA CoA mode is used.

● - GPRS Tunnelling Protocol for the control plane and the user plane to provide PDN connectivity to UEs using

● non-3GPP accesses, if GTP based S2b is used.

April 27, 2017 Openair-cn training - User Plane 47 ● Packet Data Network Gateway

● Like the SGW, the Packet Data Network Gateway (PDN GW) is the termination point of the

● packet data interface towards the Packet Data Network(s). As an anchor point for sessions towards

● the external Packet Data Networks, the PDN GW supports:

● • Policy enforcement features (applies operator-defined rules for resource allocation and usage)

● • Packet filtering (for example, deep packet inspection for application type detection)

● • Charging support (for example, per-URL charging)

April 27, 2017 Openair-cn training - User Plane 48