Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1...

78
2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

Transcript of Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1...

Page 1: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 1

OAI workshop, Beijin, 04.25.2017

Openair LTE Core NetworkControl PlaneTraining session

Page 2: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 2

OPENAIR-CN training Plan

● Plan– Scope

– Software architecture

– Tools

– 3GPP Rel 10 implementation status

– MME internal interfaces

– What is missing

Page 3: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 3

SCOPE

Page 4: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 4

OPENAIR-CN trainingScope

● Targeted audience: Code contributors, testers, users of openair-cn.

● Objectives– Save time for willing contributors who want to understand what is in

openair-cn ● What is implemented● What is missing● Through some parts of UE attach scenario example, explain/show :

– internals– How is organized the code– How are implemented the procedures– API.

Page 5: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 5

LTE core network scopeScope : Reminder 3GPP LTE Core Network

entities

● LTE network entities involved in openair-cn :

UE

eNB MME

HSS

SGW PGW

S1-MME

S6-a

S11

S5/S8 SGI S1-U

PCRF

Gxc Gx

Implemented in openair-cn

Implemented in openairinterface5g

Not implemented

S10

SGSNS3

S4RNC

S12(optional tun)

USIM

ME

E-UtranUu

EIR

S13X2

Page 6: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 6

SOFTWAREARCHITECTURE

Page 7: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 7

LTE Software ArchitectureExternal Open Source libraries

● Asn1c (tool) ● NwGTPv2-c from Amit Chawre● FreeDiameter● OpenSSL● Liblfds (lock free containers)● Bstr● Mscgen (tool)● Complete list can be found in EPC user guide.

Page 8: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 8

LTE Software Architecture ITTI design

● ITTI means InTer Task Interface

– It is a kind of lightweight middleware providind services to the application.

● Goals and interests

– Provide services abstracted from the underlying operating system.● This will make the porting to other operating system easier.

● List of services

– Timer facilities

– Asynchronous Inter-task message facilities.

– I/O events facilities (sockets, pipes, files).

– Each protocol instance or interface adapter has been assigned its own ITTI task.

● MME and SPGW user space executables use ITTI.

● In HSS, ITTI is not used :

– Actually use threading architecture provided by Diameter library.

Page 9: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 9

LTE Software ArchitectureMME ITTI design

● In MME and SPGW

– Each protocol instance or interface adapter has been assigned its own task (InTerTask Interface).

– Each task is wake-up by events (messages, IO events, timer events).

Page 10: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 10

LTE Software ArchitectureMME ITTI design - Tasks split

Protocol layer Application layer ITTI task name

SCTP - TASK_SCTP

S1AP - TASK_S1AP

- MME_APP TASK_MME_APP

NAS - TASK_NAS_MME

UDP - TASK_UDP

GTP-C S11 (interface adapter, lib nwGTPv2c wrapped)

TASK_S11

Diameter S6a (interface adapter, lib freeDiameter wrapped)

TASK_S6A

Page 11: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 11

LTE Software ArchitectureITTI Services

● Task services– int itti_create_task(task_id_t task_id, void *(*function) (void *), void *args_p)

– void itti_wait_ready(int wait_tasks);

– void itti_mark_task_ready(task_id_t task_id);

– void itti_exit_task(void);

– void itti_terminate_tasks(task_id_t task_id);

– const char *itti_get_task_name(task_id_t task_id);

– void itti_wait_tasks_end(void);

Page 12: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 12

LTE Software ArchitectureITTI Services

● Message services– MessageDef *itti_alloc_new_message (task_id_t origin_tid, MessagesIds msg_id);

– int itti_send_broadcast_message (MessageDef *mesg_p);

– int itti_send_msg_to_task (task_id_t tid, instance_t inst, MessageDef *mesg);

– void itti_send_terminate_message (task_id_t tid);

– void itti_receive_msg (task_id_t tid, MessageDef **rx_msg);

– void itti_poll_msg(task_id_t task_id, MessageDef **rx_msg);

– const char *itti_get_message_name (MessagesIds msg_id);

Page 13: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 13

LTE Software ArchitectureITTI Services

● IO events services– void itti_subscribe_event_fd (task_id_t tid, int fd);

– void itti_unsubscribe_event_fd (task_id_t tid, int fd);

– int itti_get_events (task_id_t tid, struct epoll_event **events);

Page 14: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 14

LTE Software ArchitectureITTI Services

● Timer services– int timer_setup (uint32_t interval_sec,

uint32_t interval_us, task_id_t tid, int32_t instance, timer_type_t type, void *timer_arg, long *timer_id);

– int timer_remove (long timer_id);– int timer_init (void);

Page 15: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 15

LTE Software ArchitectureMME ITTI design

● Each ITTI task has to create a thread infinitly looping on a epoll_wait() function waiting for ITTI events.

ITTI taskLegend :

SCTP MME_APP

ITTI : InTerTask Interface(Messages, sockets, timers facilities, memory pool)

Heavy use of gcc atomic built-ins __sync_fetch_and_ xyz(...)

MME process

S1AP () NAS S6a S11 UDP

glibc Timer API epoll API Lib lfds API

()

Page 16: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 16

LTE Software ArchitectureInternals : ITTI design

● ITTI task pthread template, example TASK_UDP  int                                     nb_events = 0;  struct epoll_event                     *events = NULL;

  itti_mark_task_ready (TASK_UDP);  while (1) {    MessageDef                           *received_message_p = NULL;    itti_receive_msg (TASK_UDP, &received_message_p);    if (received_message_p != NULL) {      switch (ITTI_MSG_ID (received_message_p)) {      case UDP_INIT:           ...        break;      case TERMINATE_MESSAGE:          itti_exit_task ();        break;      default:          OAILOG_DEBUG (LOG_UDP, "Unkwnon message ID %d:%s\n",                ITTI_MSG_ID (received_message_p), ITTI_MSG_NAME (received_message_p)) ;

    on_error:      rc = itti_free (ITTI_MSG_ORIGIN_ID (received_message_p), received_message_p);    }    nb_events = itti_get_events (TASK_UDP, &events);    if ((nb_events > 0) && (events != NULL)) {      udp_server_flush_sockets (events, nb_events);    }  }

} FD events processing

} Message processing

Blocking on rx event

Page 17: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 17

LTE Software ArchitectureInternals : ITTI timers

● ITTI timer internals

ITTI

glibc Timer API

ITTI task=task_id

timer_setup(interval, task_id, type, ...)

timer_p *struct containing (task_id, timer type(one shot, period), etc)

timer_create(SIGTIMER, &timer, timer_p)timer_settime()

TIME

Time-out SIGTIMER

void timer_handle_signal(...) { m=itti_alloc_new_message (TASK_TIMER, TIMER_HAS_EXPIRED) ; itti_send_msg_to_task (task_id, instance, m) ;}

ITTI MESSAGE :TIMER_HAS_EXPIRED

Page 18: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 18

LTE Software ArchitectureInternals : ITTI File descriptor facility

● ITTI file descriptors internals (see for ex TASK_UDP)

ITTI

glibc epoll API

ITTI task=task_id

itti_subscribe_event_fd(task_id, sd)

Maintain epoll_event_t arrayitti_desc.threads[thread_id].events

epoll_ctl (itti_desc.threads[thread_id].epoll_fd, EPOLL_CTL_ADD, sd, &event(EPOLL_IN, EPOLL_ERR))

TIME

ITTI: MSG=NULL

Create socket sdTask() {//Infinite thread loop … ………...}

itti_receive_msg() itti_receive_msg_internal_event_fd() epoll_wait()

itti_get_events (task_id, &events)

epoll_event[]

Sleeping RunningRunning

Page 19: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 19

LTE Software ArchitectureITTI Message facility

● ITTI Message internals

ITTI

ITTI task=task_id1

m=itti_alloc_new_message (task_id1, MSG_X) ;

itti_send_msg_to_task (task_id2, instance, m) ;

lfds611_queue_enqueue (tasks[task_id2].message_queue, new);write (threads[task_id2].task_event_fd, &sem, sizeof (eventfd_t));

TIME

mess=m(type=MSG_X)

Create message

itti_receive_msg_internal_event_fd() epoll_wait()

ITTI task=task_id2

Task() {//Infinite thread loop… }

read (threads[task_id2].task_event_fd, &sem, sizeof(eventfd_t));lfds611_queue_dequeue (tasks[task_id2].message_queue, (void **)&mess) ;

itti_receive_msg(&mess)

Page 20: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 20

TOOLS

Page 21: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 21

Tools

● Helpers for developpers, testers– Mscgen

– Logs

– 3GPP requirements (use Logs)

– MME Scenario player

Page 22: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 22

TOOLSMSCGEN

● http://www.mcternan.me.uk/mscgen/● Mscgen is a small program that parses

Message Sequence Chart descriptions and produces PNG, SVG, EPS or server side image maps (ismaps) as the output.

● MSCs are popular in Telecoms to specify how protocols operate although MSCs need not be complicated to create or use.

Page 23: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 23

TOOLSMSCGEN

Declaration of protocol entities

Message arc

Page 24: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 24

TOOLSMSCGEN : MSC thread-safe design

Taska

TASK_SHARED_TS_LOG

Thread safe FIFO queue(liblfds)

log_message_queue

SRC/UTILS/shared_ts_log.c

MSC_LOG_TX_MESSAGE()

Taskb

OAIMSC

Pop message from queue

Write message to file/tmp/openair.msc.`nodetype_index`.log

ITTI :Timer

Pop message from queue

ITTI :Timer

...

MSC

Page 25: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 25

TOOLSMSCGEN : MSC Declaration of entities

● Declaration of node types, entities (SRC/UTILS/MSC/msc.h):

typedef enum {  MIN_MSC_ENV = 0,  MSC_E_UTRAN = MIN_MSC_ENV,  MSC_MME,  MSC_SP_GW,  MAX_MSC_ENV} msc_env_t;

typedef enum {  MIN_MSC_PROTOS = 0,  MSC_NAS_UE = MIN_MSC_PROTOS,  MSC_S1AP_ENB,  MSC_GTPU_ENB,  MSC_GTPU_SGW,  MSC_GTPC_SGW,  MSC_GTPC_MME,  MSC_S1AP_MME,  MSC_MMEAPP_MME,  MSC_NAS_MME,  MSC_NAS_EMM_MME,  MSC_NAS_ESM_MME,  MSC_S11_MME,  MSC_S6A_MME,  MSC_SGW,  MSC_HSS,  MAX_MSC_PROTOS,} msc_proto_t;

Page 26: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 26

TOOLSMSCGEN: MSC API

● MSC API– MSC_INIT(node_type, max_protocol_entities) // open msc log file, init all variables.

– MSC_START_USE() // to be called after MSC_INIT() by each producer thread (liblfds issue)

– MSC_END() // stop use mscgen logging : close msc log file

● MSC log message primitives: – MSC_LOG_RX_MESSAGE (msc_rx_entity, msc_tx_entity, binary_stream, string_format, args…)

– MSC_LOG_RX_DISCARDED_MESSAGE (msc_rx_entity, msc_tx_entity, binary_stream, string_format, args…)

– MSC_LOG_TX_MESSAGE (msc_tx_entity, msc_rx_entity, binary_stream, string_format, args…)

– MSC_LOG_TX_MESSAGE_FAILED (msc_tx_entity, msc_rx_entity, binary_stream, string_format, args…)

– MSC_LOG_EVENT (msc_entity, string_format, args…)

● MSC are activated by setting MESSAGE_CHART_GENERATOR to true in openair/BUILD/XYZ/CmakeLists.template

Page 27: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 27

TOOLSMSCGEN : « OAI MSC » output file format 1/3

● Format of MSC intermediate log fileFormat : MSC file is a text file with space separated values.

– Protocol entities declaration

– Event declaration

Item 0 1 2 3

FieldDescription

Uniq item number

Keyword'[PROTO]'

Protocol entity identifier (integer b10)

Protocol entity display name

Item 0 1 2 3 4

FieldDescription

Uniq item number

Keyword'[EVENT]'

Protocol entityIdentifier

Time String to display

Page 28: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 28

TOOLSMSCGEN : « OAI MSC » output file format 2/3

Format : MSC file is a text file with space separated values.

– Message declaration

Item 0 1 2 3 4

FieldDescription

Unig item number

Keyword'[MESSAGE]'

Protocol entity identifier 1

Message arc

Protocol entity identifier 2

Item 5 (6) 7 or (6)

FieldDescription

Length of binary stream

Binary stream if length != 0, else field not present.

String to display

Page 29: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 29

TOOLSMSCGEN : « OAI MSC » output file format 3/3

● « OAI MSC » file example :

0 [PROTO] 1 S1AP_ENB1 [PROTO] 2 GTPU_ENB2 [PROTO] 6 S1AP_MME3 [PROTO] 7 MME_APP4 [PROTO] 8 NAS_MME5 [PROTO] 9 NAS_EMM6 [PROTO] 10 NAS_ESM7 [PROTO] 12 S11_MME8 [PROTO] 13 S6A9 [PROTO] 14 SGW10 [PROTO] 15 HSS11 [EVENT] 6 0005:8966590 Event SCTP_NEW_ASSOCIATION assoc_id: 612 [MESSAGE] 6 <- 1 0 0005:8987890 S1Setup/Originating message assoc_id 6 stream 013 [MESSAGE] 6 -> 1 0 0005:8988690 S1Setup/successfulOutcome assoc_id 6

Page 30: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 30

TOOLSMSCGEN output files creation

OAI MSC file

mscgen files ~36 events/file

msc_genScript

openair-cn/SCRIPTS/msc_genTranslate MSC file content to mscgen syntax

Split mscgen content into files/pages

svg or png files

MYRESULT

...

...Command line :$ openair-cn/SCRIPTS/msc_gen --dir MYRESULT \ --type svg

/tmp

Page 31: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 31

TOOLSMSCGEN file creation

msc {width = "2048";   S1AP_ENB, GTPU_ENB, S1AP_MME, MME_APP, NAS_MME, NAS_EMM, NAS_ESM, S11_MME, S6A, SGW, HSS;  S1AP_MME note S1AP_MME [ label = "0005:8966590 Event SCTP_NEW_ASSOCIATION assoc_id: 6", textcolour="black" ] ;  S1AP_MME<=S1AP_ENB [ label = "(12|0005:8987890) S1Setup/Originating message assoc_id 6 stream 0", linecolour="black" , textcolour="black" ] ;  S1AP_MME=>S1AP_ENB [ label = "(13|0005:8988690) S1Setup/successfulOutcome assoc_id 6", linecolour="black" , textcolour="black" ] ;

0 [PROTO] 1 S1AP_ENB1 [PROTO] 2 GTPU_ENB2 [PROTO] 6 S1AP_MME...11 [EVENT] 6 0005:8966590 Event SCTP_NEW_ASSOCIATION assoc_id: 612 [MESSAGE] 6 <- 1 0 0005:8987890 S1Setup/Originating message assoc_id 6 stream 013 [MESSAGE] 6 -> 1 0 0005:8988690 S1Setup/successfulOutcome assoc_id 6

msc_gen

Page 32: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 32

TOOLSMSCGEN file creation

S1AP_ENB GTPU_ENB S1AP_MME0005:8966590 Event

SCTP_NEW_ASSOCIAT-ION assoc_id: 6

(12|0005:8987890) S1Setup/Originating message assoc_id 6 stream 0

(13|0005:8988690) S1Setup/successfulOutcome assoc_id 6

msc {width = "2048";   S1AP_ENB, GTPU_ENB, S1AP_MME, MME_APP, NAS_MME, NAS_EMM, NAS_ESM, S11_MME, S6A, SGW, HSS;  S1AP_MME note S1AP_MME [ label = "0005:8966590 Event SCTP_NEW_ASSOCIATION assoc_id: 6", textcolour="black" ] ;  S1AP_MME<=S1AP_ENB [ label = "(12|0005:8987890) S1Setup/Originating message assoc_id 6 stream 0", linecolour="black" , textcolour="black" ] ;  S1AP_MME=>S1AP_ENB [ label = "(13|0005:8988690) S1Setup/successfulOutcome assoc_id 6", linecolour="black" , textcolour="black" ] ;

mscgen called by msc_gen

Page 33: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 33

TOOLSLogging 1/2

● Same architecture as MSC– Thread safe FIFOs (possibility to bypass this, usefull if you can't see the logs that appear

between the last flush and the exception, if any !)

– 1 backgroung thread poping logs and flushing them to● STDOUT (choice CONSOLE)● File● TCP server● Syslog

– Log levels : TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT (may be too much ?).

STDOUT LOCAL FILE SYSLOGTCP STREAM

Output stream

Page 34: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 34

TOOLSLogging config section 2/2

LOGGING :{    # OUTPUT choice in { "CONSOLE", "`path to file`", "`IPv4@`:`TCP port num`"}     # `path to file` must start with '.' or '/'    # if TCP stream choice, then you can easily dump the traffic on the remote or local host: nc ­l `TCP port num` > received.txt    OUTPUT            = "CONSOLE";    # THREAD_SAFE choice in { "yes", "no" } means use of thread safe intermediate buffer then a single thread pick each message log one    # by one to flush it to the chosen output    THREAD_SAFE       = "yes";            # COLOR choice in { "yes", "no" } means use of ANSI styling codes or no    COLOR             = "yes";                                                  # Log level choice in { "EMERGENCY", "ALERT", "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG", "TRACE"}     SCTP_LOG_LEVEL    = "TRACE";    S11_LOG_LEVEL     = "TRACE";    GTPV2C_LOG_LEVEL  = "TRACE";    UDP_LOG_LEVEL     = "TRACE";    S1AP_LOG_LEVEL    = "TRACE";    NAS_LOG_LEVEL     = "TRACE";    MME_APP_LOG_LEVEL = "TRACE";    S6A_LOG_LEVEL     = "TRACE";    UTIL_LOG_LEVEL    = "TRACE";    MSC_LOG_LEVEL     = "ERROR";    ITTI_LOG_LEVEL    = "ERROR"; };

Page 35: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 35

TOOLS3GPP requirements 1/2

● Objective– Testing/debug purpose

● Leave a trace of a 3GPP specification requirement (MUST/MAY/SHOULD/ COULD) hit in the code, ease the maintenance of the code.

● Could use the trace or sequence of traces to diagnostic a successful test passed or failled.

● Higher level trace than raw logging (TRACE→EMERGENCY) that should tell how/why things (bugs/success/malfunctions) occur.

● Actually relies on logging– Macro to be activated in openair-cn/BUILD/MME/CmakeLists.template by

setting TRACE_3GPP_SPEC to true.

Page 36: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 36

TOOLS3GPP requirements 2/2

● Example : will log – Hit 3GPP TS 24_301R10_5_4_2_4__1 : AUTHENTICATION RESPONSE received, stop T3460, check RES

Extract from openair-cn/SRC/COMMON/3gpp_requirements.h# define REQUIREMENT_3GPP_SPEC(pRoTo, sTr) OAILOG_SPEC(pRoTo, sTr) // NOTIC LOG LEVEL

Extract from openair-cn/SRC/NAS/3gpp_requirements_24.301.h :#define REQUIREMENT_3GPP_24_301(rElEaSe_sEcTiOn__OaImark) REQUIREMENT_3GPP_SPEC(LOG_NAS, "Hit 3GPP TS 24_301"#rElEaSe_sEcTiOn__OaImark" : "rElEaSe_sEcTiOn__OaImark##_BRIEF"\n")

#define R10_5_4_2_4__1 "Authentication completion by the network \ Upon receipt of an AUTHENTICATION RESPONSE message, the network stops the timer T3460 and checks the \ correctness of RES (see 3GPP TS 33.401 [19])."#define R10_5_4_2_4__1_BRIEF "AUTHENTICATION RESPONSE received, stop T3460, check RES"

if (emm_ctx) { // Stop timer T3460 REQUIREMENT_3GPP_24_301(R10_5_4_2_4__1); emm_ctx->T3460.id = nas_timer_stop (emm_ctx->T3460.id);

Page 37: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 37

TOOLSMME Scenario player

● Motivation– We have to develop a scenario player for covering

all (as many as possible) test cases.● Do non regression testing.● Capture buggy/suspicious scenarios and replay them for

debbuging.

Page 38: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 38

LTE Software ArchitectureMME ITTI design

ITTI taskLegend :

SCTP MME_APP

ITTI

MME process

S1AP NAS S6a S11 UDPMME_SP

X X

MME_APP task, when MME scenario player is running, send the messages to MME_SP instead of S1AP. It acts like the S1AP do, but with predefined scenario(s).

Page 39: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 39

Test (Step 4)Step 3Step 2Step 1

TOOLSMME Scenario Player, Howto build a scenario

Capture a set of XML

dumped ITTI messages on

MME

Build a scenario

Play scenarioWithout eNB(s)

...

Build a set of XML ITTI messages

Scenario

OR

Use a set of XML ITTI

messages

...

...

Run status in /tmp/

mme_scenario_player.log

Introduce variables

in messages

Page 40: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 40

TOOLSMME Scenario player, Scenarios

● Scenarios can contains– Rx message(s) with or without timing constraints

– Tx message(s) with or without timing requirements

– Variable(s) declaration(s) ● Variable types : uint64, hex stream, ascii stream

– Test(s) of variable(s)● <jcond var_name="MME_UE_S1AP_ID" cond="ne"

value="0xFFFFFFFF" label="checked_mme_ue_s1ap_id_invalid"/>

– Labels like goto of BASIC● <label name="checked_mme_ue_s1ap_id_invalid" />

Page 41: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 41

TOOLSMME Scenario player, Scenarios

● Scenarios can contains– Labels like goto of BASIC

● <label name="checked_mme_ue_s1ap_id_invalid" />

– Special tags :● <usim lte_k="fec86ba6eb707ed08905757b1bb44b8f" sqn_ms="FF9BB4000E0C"/>● <compute_authentication_response_parameter/> < !-- Warning implicit variables

(TODO) --> ● <update_emm_security_context

seea="$ITTI_NAS_DOWNLINK_DATA_REQ.NAS.SECURITY_MODE_COMMAND.TYPE_OF_CIPHERING_ALGORITHM" seia="$ITTI_NAS_DOWNLINK_DATA_REQ.NAS.SECURITY_MODE_COMMAND.TYPE_OF_INTEGRITY_PROTECTION_ALGORITHM" ul_count="$NAS_UPLINK_SEQUENCE_NUMBER"/>

– Timing delays● <sleep seconds="10" useconds="0" />

– Scenario(s)

See example: https://gitlab.eurecom.fr/oai/openair-cn/blob/master/TEST/MME/all.xml

Page 42: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 42

TOOLSMME Scenario player, Variables

<?xml version="1.0" encoding="ISO-8859-1"?><ITTI_NAS_DOWNLINK_DATA_REQ> <ACTION>WAIT_RECEIVE</ACTION> <ITTI_SENDER_TASK>TASK_MME_APP</ITTI_SENDER_TASK> <ITTI_RECEIVER_TASK>TASK_MME_SCENARIO_PLAYER</ITTI_RECEIVER_TASK> <TIMESTAMP>ANY</TIMESTAMP> <mme_ue_s1ap_id>#ITTI_NAS_DOWNLINK_DATA_REQ.MME_UE_S1AP_ID</mme_ue_s1ap_id> <enb_ue_s1ap_id>$ENB_UE_S1AP_ID</enb_ue_s1ap_id> <plain_nas_message> <security_header_type>0x000000</security_header_type> <protocol_discriminator>EPS_MOBILITY_MANAGEMENT_MESSAGE</protocol_discriminator> <message_type>IDENTITY_REQUEST</message_type> <identity_type_2>1</identity_type_2> </plain_nas_message></ITTI_NAS_DOWNLINK_DATA_REQ>

« # » means that variable ITTI_NAS_DOWNLINK_DATA_REQ.MME_UE_S1AP_ID

will take the value received in message

« $ » means that the scenario will fail if the enb_ue_s1ap_id field is not equal to ENB_UE_S1AP_ID variable

The scenario will fail if field « identity_type_2 » is not present and if value received is not « 1 »

Page 43: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 43

TOOLSDependancies

MSCGEN

SHARED LOG (ITTI TASK)

LOG

MME SP (ITTI_TASK)

ITTI

3GPP REQ

● Interest of the figure : Show dependancy with ITTI

Page 44: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 44

3GPP Rel 10 implementation

Status

Page 45: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 45

Disgression on Release 14

● Work to be done :– Evaluate the delta with Release 10 in core network

for NB-IoT support

– Area of collaboration/contribution

Page 46: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 46

3GPP Implementation StatusS1AP Elementary Class 1 Procedures

Handover Preparation - Reset -

Handover Resource Allocation

- S1 Setup Yes

Path Switch Request Will be shortly UE Context Release Yes

HandoverCancellation

- UE Context Modification -

E-RAB Setup Yes ENB Configuration Update

-

E-RAB Modify - MME Configuration Update

-

E-RAB Release - Write-Replace Warning -

Initial Context Setup Yes Kill -

Page 47: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 47

3GPP Implementation StatusS1AP Elementary Class 2 Procedures

Handover Notification - Trace Start -

E-RAB Release Indication - Trace Failure Indication -

Paging Will be Location Reporting Control -

Initial UE Message Yes Location Reporting FailureIndication

-

Downlink NAS Transport Yes Location Report -

Uplink NAS Transport Yes Overload Start -

NAS non delivery indication Yes Overload Stop -

Error Indication - eNB Direct Information Transfer -

UE Context Release Request Yes MME Direct Information Transfer -

DownlinkS1 CDMA2000 Tunneling - out of scope eNB Configuration Transfer -

Uplink S1 CDMA2000 Tunneling - out of scope MME Configuration Transfer -

UE Capability Info Indication Yes~ Cell Traffic Trace -

eNB Status Transfer - Downlink UE Associated LPPa transport

-

MME Status Transfer - Uplink UE Associated LPPaTransport

-

Deactivate Trace - Downlink Non UE Associated LPPaTransport

-

Page 48: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 48

3GPP Implementation StatusNAS EMM Specific Procedures

Specific procedures Status

combined attach -

attach Yes

detach Yes

combined detach -

normal tracking area updating -

combined tracking area updating -

periodic tracking area updating - (Soon from from Radisys with Facebook collaboration)

Page 49: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 49

3GPP Implementation StatusNAS EMM Connection Management

Procedures

EMM connection management procedures Status

service request - Soon, from Radisys with Facebook collaboration

paging procedure - Soon, from Radisys with Facebook collaboration

transport of NAS messages (SMS) -

generic transport of NAS messages -

Page 50: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 50

3GPP Implementation StatusNAS EMM Common Procedures

Common procedures Status

GUTI reallocation -

authentication Yes

security mode control Yes

identification Yes

EMM information - Soon, from Radisys with Facebook collaboration

Page 51: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 51

3GPP Implementation StatusGTPv2 Path Management Messages

Messages Status

Echo Request/Response -

Version Not Supported Indication -

Page 52: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 52

3GPP Implementation StatusGTPv2 Tunnel Management Messages

Messages Status

Create Session Request/Response Yes S11

Create Bearer Request/Response Yes S11

Bearer Resource Command/Failure Indication -

Modify Bearer Request/Response -

Delete Session Request/Response Yes S11

Delete Bearer Request/Response -

Downlink Data Notification/Acknowledge/Failure Indication -

Delete Indirect Data Forwarding Tunnel Request/Response -

Modify Bearer Command/Failure indication -

Update Bearer Request/Response -

Delete Bearer Command/Failure indication -

Create Indirect Data Forwarding Tunnel Request/Response -

Release Access Bearers Request/Response Yes S11

Stop Paging Indication -

Modify Access Bearers Request/Response -

Req Paging

Page 53: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 53

3GPP Implementation StatusGTPv2 Mobility Management Messages

Messages Status

Forward Relocation Request/Response -

Forward Relocation Complete Notification/Acknowledge -

Context Request/Context Response -

Identification Request -

Forward Access Context Notification/acknowledge -

Detach Notification/Acknowledge -

Change Notification Request/Response -

Relocation Cancel Request/Response -

Configuration Transfer Tunnel -

RAN Information Relay -

● Many message for S10

Page 54: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 54

3GPP Implementation StatusS6a Location Management Procedures

Procedures Status

Update Location Yes

Cancel Location -

Purge UE -

Page 55: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 55

3GPP Implementation StatusS6a Subscriber Data Handling Procedures

Procedures Status

Insert Subscriber Data -

Delete Subscriber Data -

Page 56: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 56

3GPP Implementation StatusS6a Misc Procedures

Authentication Procedures Status

Authentication Information Retrieval Yes

Fault Recovery Procedures Status

Reset -

Notification Procedures Status

Notification -

Page 57: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 57

3GPP Implementation StatusS6a Misc Procedures

Authentication Procedures Status

Authentication Information Retrieval Yes

Fault Recovery Procedures Status

Reset -

Notification Procedures Status

Notification -

Page 58: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 58

MME Internal interfaces

Page 59: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 59

UE attach procedure

Page 60: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 60

UE Attach initialUEMessage

S1AP

DATA(stream_id=1, SSN=0, PPID=S1AP)

initialUEMessage(eNB-UE-S1AP-ID, TAI, EUTRAN-CGI, RRC establishment cause, GUMMEI id)

eNB MME

NASESM

Attach Request(EPS mobile identity, UE network capabilities, last visited registered TAI, DRX param, MS network capability, TMSI status,

Old GUTI type)

PDN connectivity request(PCO, ESM information transfer flag)

UE S1-MME

NASEMM

RRC RRC S1APSCTP SCTPNASEMM

NASESM

RRCConnectionSetupComplete(SRB1)

RRCConnectionRequest(UL-CCCH)

RRCConnectionSetup(DL-SCH)

Cell selectionSee 3GPP 36.304

Page 61: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 61

UE Attach – initialUEMessage - S1AP internals

● When S1AP receives a request from an unknown UE, it creates a UE entry and add it in a collection in the enb_description_t struct.

● mme_ue_s1ap_id is set to INVALID_MME_UE_S1AP_ID● sctp_stream_send is electd from range [1..NB max instreams]● s1_ue_state set to S1AP_UE_WAITING_CSR (Create Session Request)

typedef struct ue_description_s {  struct enb_description_s *enb;  ///< Which eNB this UE is attached to  enum s1_ue_state_s        s1_ue_state;      ///< S1AP UE state  enb_ue_s1ap_id_t          enb_ue_s1ap_id:24;///< Unique UE id in eNB  mme_ue_s1ap_id_t          mme_ue_s1ap_id; ///< Unique UE id in MME

  sctp_stream_id_t          sctp_stream_recv; ///< eNB ­> MME stream  sctp_stream_id_t          sctp_stream_send; ///< MME ­> eNB stream

  s11_teid_t                s11_sgw_teid;

  /* Timer for procedure outcome issued by MME that should be answered*/  long outcome_response_timer_id;} ue_description_t;

Page 62: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 62

UE Attach – initialUEMessage

MME

S1APMMEAPP NASS1AP

initialUEMessage

ITTI :MME_APP_INITIAL_UE_MESSAGE(IEs contained in initialUEMessage)

eNB

ITTI :NAS_INITIAL_UE_MESSAGE(TAI, CGI, AS CAUSE, M-TMSI, NAS MSG)

Create UE

context

Create UE

context

Page 63: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 63

UE Attach – initialUEMessageMME_APP internals

● Then the UE context is referenced by collections with different keys (mme_app_ue_context.c/mme_insert_ue_context()), because each entity in MME has its own key :

enb_ue_s1ap_id_ue_context_htbl

Key Data

enb_s1ap_id_key *ue_context_t

ue_context_t

mme_ue_s1ap_id_ue_context_htbl

Key Data

mme_ue_s1ap_id enb_s1ap_id_key

imsi_ue_context_htbl

Key Data

imsi64 mme_ue_s1ap_id

tun11_context_htbl

Key Data

mme_s11_teid mme_ue_s1ap_id

guti_ue_context_htbl

Key Data

guti mme_ue_s1ap_id

Page 64: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 64

EMMAS-SAP(SAP with lower layers)(3GPP TS 24.007, §6.6)

ITTI/SAP adapter(SRC/NAS/nas_itti_messaging.c, SRC/NAS/nas_proc.c)

UE Attach – initialUEMessage

● The reception of the message NAS_INITIAL_UE_MESSAGE triggers the message EMMAS_ESTABLISH_REQ

NAS-EMM procedures(SRC/NAS/EMM)

NAS-ESM procedures(SRC/NAS/ESM)

Network API (SRC/NAS/API/NETWORK)

encode(),decode(),encrypt(), decrypt()

EMMESM-SAP(3GPP TS 24.007, §10.5.1)

EMM Sub-layer

states

EMMREG-SAPRegistration Services

(3GPP TS 24.007, §6.6)

ESMREG-SAP(3GPP TS 24.007, §7.5.1)

ESMSub-layer states

ITTI API

EMMCN-SAP(SAP with CN entities)

EMMAS_ESTABLISH_REQ

NAS ITTI TASK (SRC/NAS/nas_mme_task.c/nas_intertask_interface(...))

common proc()

Page 65: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 65

ITTI NAS_INITIAL_UE_MESSAGE to EMM specific procedures

NAS_INITIAL_UE_MESSAGE nas_proc_establish_ind() EMMAS_ESTABLISH_REQ

ATTACH_REQUEST

DETACH_REQUEST

SERVICE_REQUEST

EXTENDED_SERVICE_REQUEST

EMM specific proceduresEMMAS SAPITTI/SAP adapterITTI MSG

nas_message_decode()SRC/NAS/API/NETWORK/nas_message.c

emm_proc_attach_request()SRC/NAS/EMM/Attach.c

emm_proc_service_reject()SRC/NAS/EMM/ServiceRequestHdl.c

SRC/NAS

EMM

MSG

SAP

.

EMM Messages serialization/deserialization

EMM Service access Point send/receive

Common and specific EMM procedures

IES Information Elements serialization / deserialization

. ITTI/SAP adapter, ITTI task

TRACKING_AREA_UPDATE_REQUEST

emm_proc_tracking_area_update_reject()emm_proc_tracking_area_update_request()SRC/NAS/EMM/TrackinAreaUpdate.c

Page 66: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 66

Few words on ITTI S6A task

● Role : ITTI to freeDiameter API adapterUse freeDiameter library, BSD 3 clauses licence (http://www.freediameter.net/hg/freeDiameter/archive/1.2.0.tar.gz)

● Implemented send/receive messages:– Authentication Information Request/Answer

– Update Location Request/Answer

● How to send a message:(ex :SRC/S6A/auth_info.c/s6a_generate_authentication_info_req(...))

– Create message: fd_msg_new(...)

– Setting Attribute-Value Pairs: fd_msg_avp_new(...), fd_msg_avp_setvalue(...), fd_msg_avp_add(...).

– Sending message : fd_msg_send(...)

Page 67: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 67

Few words on ITTI S6A task

● How to receive a message: use registered callbacks:– Register callback: fd_disp_register(…) for each message,

passing incoming messages to extensions registered callbacks. Ex: SRC/S6A/s6a_dict.c/s6a_fd_init_dict_objs(...)

– Get message: fd_msg_answ_getq(…). Ex: SRC/S6A/auth_info.c/s6a_aia_cb(...)

– Get Attribute-Value Pairs: fd_msg_search_avp(...), fd_msg_avp_hdr(...), fd_msg_browse(...)

Page 68: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 68

AUTHENTICATION MSC in core network

MME

S6AMMEAPP

NAS

HSS

ITTI :NAS_INITIAL_UE_MESSAGE(TAI, CGI, AS CAUSE, M-TMSI, NAS MSG)

ITTI :S6A_AUTH_INFO_REQ(visited PLMN, IMSI, resync=0)

S6-a

AUTHENTICATION_INFORMATION_REQUEST(visited PLMN, IMSI, resync, realm, origin/dest host)

AUTHENTICATION_INFORMATION_ANSWER(RAND, XRES, AUTN, KASME)

ITTI :S6A_AUTH_INFO_ANS(IMSI, auth_info(RAND, XRES, ...))

UE_ctxt.originating_tai=S1AP initial-UE-message.TAI

NASEMM msgEPS mobile identity

ITTI to freeDiameter adapter

Page 69: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 69

ITTI S6A_AUTH_INFO_ANS to NAS-EMM

S6A_AUTH_INFO_ANS

EMMCN_AUTHENTICATION_PARAM_RESOr EMMCN_AUTHENTICATION_PARAM_FAIL

emm_proc_authentication()SRC/NAS/EMM/Authentication.c

EMM common proceduresEMMAS SAPITTI/SAP adapterITTI MSG

_emm_cn_authentication_res()SRC/NAS/EMM/SAP/emm_cn.c- copy auth vectors in emm_data_context_t

Set common procedure success callback to emm_attach_security

nas_proc_authentication_info_answer()nas_proc_auth_param_res()

ornas_proc_auth_param_fail()

Page 70: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 70

S11 task

● Role : ITTI/GTPv2-C adapterUse nwGtpv2c library, BSD 3 clauses licence

● Out of the box architecture (see nwGtpv2c readme file)

      +­­­­­­­­­­­­­+      +­­­­­­­­­+        +­­­­­­­­­+      |  ULP ENTITY |      | TMR MGR |        | LOG MGR |      +­­­­­­+­­­­­­+      +­­­­+­­­­+        +­­­­+­­­­+              |                  |                  |      +­­­­­­+­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­+­­­­+      |                                                 |      |                 NWGTPv2 STACK                   |      |                                                 |      +­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­+                                |                         +­­­­­­+­­­­­­+                         |  UDP ENTITY |                         +­­­­­­­­­­­­­+ 

Page 71: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 71

Few words on S11 task

● Final architecture

ITTI TASK S11

NWGTPv2 STACK

S11 = ULP ENTITY

ITTI TASK UDP=UDP ENTITY

OAI LOG APITMR MGR

Page 72: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 72

Few words on S11 task

● How to send a message:(ex :SRC/S11/s11_mme_sesson_manager.c/s11_mme_create_session_request(...))

– Create message: nwGtpv2cMsgNew(...)

– Adding a already serialized IE: nwGtpv2cMsgAddIe(…)

– Otherwize write the IE de/serializer functions, ex s11_pdn_type_ie_set()/s11_pdn_type_ie_get(), etc

– Sending message : nwGtpv2cProcessUlpReq(...)

Page 73: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 73

Few words on S11 task

● How to read a received message: use msg parser API

s11_mme_handle_create_session_response(NwGtpv2cStackHandleT * stack_p, NwGtpv2cUlpApiT * pUlpApi) {...  //Create a new message parser  rc = nwGtpv2cMsgParserNew (*stack_p, NW_GTP_CREATE_SESSION_RSP, s11_ie_indication_generic, NULL, &pMsgParser); // default IE indication 

  // Cause IE  rc = nwGtpv2cMsgParserAddIe (pMsgParser, NW_GTPV2C_IE_CAUSE, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY,      s11_cause_ie_get, &resp_p→cause);  // same for all needed IEs  …  // Run the parser  rc = nwGtpv2cMsgParserRun (pMsgParser, (pUlpApi­>hMsg), &offendingIeType, &offendingIeInstance, &offendingIeLength);

  // IEs are in resp_p→cause, ...

  // Clean   rc = nwGtpv2cMsgParserDelete (*stack_p, pMsgParser);  rc = nwGtpv2cMsgDelete (*stack_p, (pUlpApi­>hMsg));

Questionable

Page 74: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 74

Few words on S11 task

● How to read a message

  // Set ULP entity  ulp.hUlp = (NwGtpv2cUlpHandleT) NULL;  ulp.ulpReqCallback = s11_mme_ulp_process_stack_req_cb;  DevAssert (NW_OK == nwGtpv2cSetUlpEntity (s11_mme_stack_handle, &ulp));

static NwRcT s11_mme_ulp_process_stack_req_cb(NwGtpv2cUlpHandleT hUlp,  NwGtpv2cUlpApiT * pUlpApi){  int                                     ret = 0;  switch (pUlpApi­>apiType) {  case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND:    OAILOG_DEBUG (LOG_S11, "Received triggered response indication\n");

    switch (pUlpApi­>apiInfo.triggeredRspIndInfo.msgType) {    case NW_GTP_CREATE_SESSION_RSP:      ret = s11_mme_handle_create_session_response (&s11_mme_stack_handle, pUlpApi);      Break;     ...

Page 75: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 75

What is missing

Page 76: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 76

Missing/ToDo

● MME – More test cases/scenarios for MME scenario player.– S1AP causes, S11 causes.

– Rework NAS ESM sublayer, report true ESM causes, most of all modification procedures.

– NAS EMM procedures : TAU, Service request, Paging.

– X2 HandOver.

● SPGW– SGW/PGW split not considered.

– Better integration of nwGTPv2-C.● Presence of IEs (Mandatory/conditional/optional)

– Simplify internal procedures in SPGW.

Page 77: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 77

Missing

● Tools– 3GPP requirements

● Spread its use ? and exploit traces to enforce testing scenarios ?

– HSS import/populate subscriber tool, instead of relying on SQL import/export.

● Organization– Scale for wider contributions

● Tools and Process (inputs from Radisys, example of Redmine, etc). ● Test tools, continuous integration testbed, set a reference testbed for control plane and

userplane.

● Documentation– Doxygen still to do.

– Example modelize with UML tool like papyrus, etc.

● NB-IoT Rel 14 compliance

Page 78: Openair LTE Core Network Control · PDF file2017/27/04 Openair-cn training - Control Plane 1 OAI workshop, Beijin, 04.25.2017 Openair LTE Core Network Control Plane Training session

2017/27/04 Openair-cn training - Control Plane 78

Thank You