Implementation of The Diameter-Based CX Interface in The IP Multimedia Subsystem

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Implementation of the Diameter-based Cx Interface

in the IP Multimedia Subsystem


1
Siniša Tomac, 1Marko Sikirica, 2Lea Skorin-Kapov, 1Maja Matijašević
1
University of Zagreb, FER, Unska 3, HR-10000 Zagreb, Croatia
2
Ericsson Nikola Tesla, R&D Center, Krapinska 45, HR-10000 Zagreb, Croatia
Tel. +385 1 612-9757, Fax +385 1 612-9832
E-mail: {sinisa.tomac|marko.sikirica|maja.matijasevic}@fer.hr, lea.skorin-kapov@ericsson.com

The Diameter protocol was initially developed by the Internet II. ROLE OF DIAMETER IN IMS
Engineering Task Force (IETF) as an Authentication, The IMS is based on a horizontally layered architecture,
Authorization, and Accounting (AAA) framework intended
consisting of three layers, namely, Service Layer, Control
for applications such as remote network access and IP
Layer, and Connectivity Layer. Service Layer comprises
mobility. Diameter was further embraced by the Third
application and content servers to execute value-added
Generation Partnership Project (3GPP) as the key protocol
for AAA and mobility management in 3G networks. The
services for the user. Control layer comprises network
paper discusses the use of Diameter in the scope of the IP control servers for managing call or session set-up,
Multimedia Subsystem (IMS) as specified by 3GPP, with modification and release. The most important of these is
special emphasis on its use on the Cx interface between the the Call Session Control Function (CSCF). Connectivity
Call Session Control Function (CSCF) and the Home Layer comprises routers and switches, for both the
Subscriber Server (HSS). The goal of this work was to backbone and the access network.
implement basic Diameter functionality corresponding to the
Cx interface. The paper compares a number of open source A. IMS functions
implementations of the Diameter Base Protocol, and provides
the rationale for choosing the Open Diameter solution for
A somewhat simplified IMS architecture is shown in
implementation purposes. Experiences regarding installation,
Figure 1. As mentioned earlier, one of the key functions in
configuration and implementation of basic authorization
functionality using Open Diameter are discussed. The
the control layer is the CSCF. In this paper, we focus on
resulting implementation is verified in a laboratory testbed. the interface between the Home Subscriber Server (HSS)
and the CSCF. The HSS serves as the main data storage
for user related information, such as IMS user profiles
I. INTRODUCTION (including location), security and registration information,
access parameters, and application server profiles.
Evolution of the 3rd generation network architecture is
driven, among other factors, by the requirement to provide
a rather fast, flexible and cost-efficient way of introducing AS AS
new services for operators, as well as third-party service
and content providers. The IP Multimedia Subsystem Service Layer
(IMS), as specified by the 3rd Generation Partnership
project (3GPP), represents the key element for supporting Control Layer
ubiquitous service access to multimedia Internet services,
with adequate support for Quality of Service as well as MRF
advanced, service-differentiated charging [1]. Initially
specified by 3GPP/3GPP2, the IMS standards are now HSS CSCF
being adopted by other standards bodies including
ETSI/TISPAN. For the purposes of Authentication, SG/MGCF
Authorization, and Accounting (AAA) and mobility
management in 3G networks, 3GPP has adopted the
Diameter protocol [2], developed by the Internet
Connectivity MGW
Engineering Task Force (IETF). This paper discusses the
Layer
use of Diameter within the scope of the IMS.
IP/MPLS
The paper is organized as follows. Section II briefly
describes IMS, its functions and interfaces, and the role of PSTN/PLMN
the Diameter protocol as applied to the Cx interface.
Section III provides an overview of publicly available
Figure 1. The IMS architecture
open source implementations of the Diameter protocol,
while Section IV describes the selected implementation,
Open Diameter, in more detail. Section V describes our The CSCF may serve three different purposes, as the
implementation of basic Diameter functionality Proxy CSCF (P-CSCF), the Interrogating CSCF (I-CSCF),
corresponding to the Cx interface, as an extension to the and the Serving CSCF (S-CSCF).
existing Open Diameter implementation. Section VI The P-CSCF is a Session Initiation Protocol (SIP) proxy
concludes the paper. that acts as the first contact point between the IMS
terminal and the IMS network. It is assigned to an IMS
terminal during IMS registration. The I-CSCF is also a SIP
proxy, usually located in the home network, at the edge of Registration-Termination-Request (RTR) command,
the administrative domain. Main functions of the I-CSCF stating the reason for de-registration. The RTR command
are to contact HSS in order to obtain the name of the is acknowledged by a Registration-Termination-Answer
S-CSCF that is serving the user, and to assign the S-CSCF (RTA) command. If an I-CSCF receives any SIP method
to the user based on received information received from other than REGISTER, a procedure for finding S-CSCF
the HSS. uses the Location-Info-Request (LIR) command
The S-CSCF is the central node of the signaling plane, containing public user identity and routing information.
the “brain” of the IMS. The S-CSCF is located in the home The HSS responds to LIR with Location-Info-Answer
network and it uses the Diameter-based Cx and Dx (LIA) command, containing the name of the S-CSCF.
interfaces (reference points) towards the HSS to download
and upload the user profiles. User-data handling procedures. During the registration
process, user and service-related data are downloaded from
B. The Cx reference point the HSS to the S-CSCF via the Cx reference point by using
SAR and SAA commands. It is possible, however, for this
data to be changed later, during the time while the S-CSCF
As per IMS technical specifications [3][4], the Cx
is still serving the user. To update the data in the S-CSCF,
reference point is located between the S-CSCF/I-CSCF
the HSS sends a Push-Profile-Request (PPR) command
and the HSS, as shown in Figure 2. The Subscription
with private user identity, routing information, and user
Location Function (SLF) is required in a network in which
data. The response to the PPR command is
there is more than one HSS; it provides the mapping
Push-Profile-Answer (PPA) command.
between a particular user address and its corresponding
HSS. As already noted, the protocol used at the Cx
reference point is Diameter. (The unmarked interface Authentication procedures. In the IMS, authentication
between the S-CSCF/I-CSCF and the SLF is Dx, which relies on a pre-configured shared secret and a sequence
also uses Diameter.) number stored within the IP Multimedia Services Identity
Module (ISIM) in the User Equipment (UE) as well as in
the HSS in the network. To authenticate the user, the
Cx S-CSCF sends a Multimedia-Auth-Request (MAR)
S-CSCF HSS
command to the HSS. MAR contains the private and the
Cx public user identities, S-CSCF name, routing information,
number of authentication items, and authentication data.
The HSS responds to the MAR command with the
Multimedia-Auth-Answer (MAA).
I-CSCF SLF
C. Diameter Protocol

Figure 2. The Cx interface Diameter is an authentication, authorization and


accounting (AAA) protocol developed by the Internet
Procedures in the Cx reference point may be grouped Engineering Task Force (IETF). It is based on an earlier
into three areas: IETF’s AAA protocol called RADIUS (Remote
Authentication Dial-In User Service), widely used for
1. Location management procedures
dial-up PPP (Point-to-Point Protocol) and terminal server
2. User-data handling procedures access. Extending the functionality of RADIUS, Diameter
3. Authentication procedures is designed to provide AAA services for a range of access
Each group of procedures is briefly described next. technologies, including wireless and Mobile IP. The
Diameter specifications consist of the Diameter Base
Location management procedures. In location Protocol [2], Transport Profile, and applications such as
management procedures, the User-Authorization-Request Mobile IPv4, network access server, credit-control, and
(UAR) command is sent to the HSS whenever the I-CSCF Extensible Authentication Protocol (EAP).
receives a SIP REGISTER request from the P-CSCF. The The Diameter Base protocol is utilized for negotiating
UAR command contains private and public user identity, capabilities, delivering Diameter data units, handling
visited network identifier, routing information, and type of errors, and providing for extensibility. On the other hand,
authorization. In response to the UAR command, the HSS the Diameter application defines application-specific
responds with the User-Authorization-Answer (UAA) functions and data units. Diameter is an application layer
command. The UAA command contains the name of the protocol. Transport protocols to carry Diameter messages
S-CSCF assigned to the user. After authorization, the include Transmission Control Protocol (TCP) and Stream
I-CSCF finds an S-CSCF that will serve the user, and it Control Transmission Protocol (SCTP). For securing the
forwards the SIP REGISTER request to the S-CSCF. Once
connection, Internet Protocol Security (IPSec) and
the S-CSCF receives the SIP REGISTER request, it uses
the Server-Assignment-Request (SAR) command to Transport Layer Security (TLS) are applied.
communicate with the HSS, and it informs the HSS which Diameter is a peer-to-peer protocol, meaning that any
S-CSCF will be serving the user. The HSS responds with Diameter node may initiate a request. The three types of
the Server-Assignment-Answer (SAA) command, which nodes are clients, servers, and agents. Clients are generally
contains the user profile and charging information. Later, edge devices of a network which perform access control. A
when the HSS wants to initiate de-registration it uses the Diameter agent provides relay, proxy, redirect, and
translation services, while Diameter server handles the
AAA requests for a particular domain, or realm. Message We now briefly describe each implementation and note
routing is based on the network access identifier of a the features based on which we selected Open Diameter as
particular user. a basis for our experimental implementation of Cx
As to data structure, in each Diameter node there is a interface functionality.
peer table, which contains a list of known peers and their
corresponding properties. Each peer table entry is A. Diameter Server Client
associated with an identity and can be either statically or
dynamically assigned. It includes a relative priority setting, Diameter Server Client (DISC) is an open source AAA
which specifies the role of the peer as primary, secondary, Diameter implementation, developed by the DISC project,
or alternative. The status of the peer relates to a specific (http://developer.berlios.de/projects/disc/). It can be
configuration of the finite state machine of the peer configured to act as either a Diameter Server or a Diameter
connection, called the Diameter Peer State Machine. As a Client. On the project’s Web page, the authors state that
part of message-routing process, Diameter realm-routing DISC enables what they call “a plug-in model” for new
table references the Diameter peer entries. All realm-based applications, meaning that third parties can link their
routing lookups are performed against a realm-routing plug-in with the server or the client code and thus provide
table. The realm-routing table lists the supported realms, various services. DISC is written in programming
with each route entry containing certain routing language C and it has been designed for Linux/FreeBSD
information. Each route entry is either statically or platform. Since we needed a platform-independent
dynamically discovered. Dynamic entries are associated solution, DISC was not applicable for our purposes.
with an expiry time and also route entry is associated with Should an attempt to port DISC onto other platforms, such
an application identifier, which enables route entries to as MS Windows, be made, it would require significant
have a different destination depending on the Diameter changes in the transport part of DISC.
application. In a Diameter peer table the destination of a
route entry corresponds to one or more peer entries. B. Open Diameter
A Diameter message consists of a Diameter header,
followed by a certain number of Diameter attribute-value Open Diameter (OD) is an open source implementation
pairs (AVPs). The Diameter header is composed of fields of Diameter Base Protocol developed by the Sourceforge
denoting Command Flags, Command Code, and community (http://sourceforge.net/projects/diameter). It is
Application ID. The Command Code denotes the written in C++, and it is platform independent. Supported
command associated with the message, while the platforms include Linux, FreeBSD, and MS Windows
Application ID identifies the application to which the 2000/XP. OD supports both Internet protocols IPv4 and
message is applicable. AVPs define the method of IPv6.
encapsulating information relevant to the Diameter Open Diameter has all Diameter Base Protocol functions
message. implemented and the source code is available under GNU
General Public License (GPL). Some documentation is
III. DIAMETER PROTOCOL IMPLEMENTATIONS also available. Functionality of the Diameter protocol is
provided to other applications through dynamic-link
Table I lists four publicly available, open source library files (*.dll files on MS Windows platform).
implementations of the Diameter Base protocol which we
reviewed and considered for possible implementation. C. WIRE Diameter

TABLE I. Diameter Base Protocol implementations The WIRE Diameter is an open source implementation
of the Diameter Base Protocol and Diameter EAP
Open Diameter Application, developed by the Wireless Internet Research
WIRE
Name DISC Charging & Engineering (WIRE) Laboratory at the NTHU Taiwan
Diameter Diameter SDK (http://wire.cs.nthu.edu.tw/WIREDiameter). The software
Programmin is in part based on OD, but the source code has been
C C++ C++ Java modified (support for two functions of Diameter Base
g language
only
Protocol is missing) and it is differently organized.
partially The WIRE Diameter provides various authentication
Source code yes yes yes schemes, including EAP-MD5, EAP-TLS, EAP-TTLS,
(client yes,
availability (GPL) (GPL) (GPL) and PEAP. WIRE Diameter is written in C++, and it is
emulator
no) platform independent. Supported platforms include Linux,
Platform FreeBSD, and various versions of MS Windows.
Linux/ Cross- Cross-
Platform Independen
FreeBSD Platform Platform D. Diameter Charging SDK
t
yes; partial
Diameter vendor- The Diameter Charging Software Development Kit
(8 out of
Base Protocol yes; full yes; full specific (SDK) is developed by Ericsson, and it intended to support
10
support extensions client applications. It is written in Java, and it is platform
functions)
independent. The software is made available through the
Ericsson Web site at RFC 3588 [2]. Session classes handle message
http://www.ericsson.com/mobilityworld/sub/open/technolo transmission, message processing, and event handling.
gies/charging_solutions/tools/diameter_charging_sdk. It Applications can implement their own AAA functionality
includes the Diameter Charging API, Diameter Charging by using the appropriate session classes. Figure 3, taken
Emulator (which emulates the charging server), Diameter from OD documentation and somewhat simplified, shows
Charging Client, and documentation. Due to its intended the architecture of the OD framework.
use for client applications, only the Diameter Charging In general, session classes may be either client classes or
Client source code is available, and the rest is provided in server classes, providing AAA capabilities for clients and
form of Java class files. The package uses a vendor- servers, respectively. Classes may also be further divided
specific Service Charging Application Protocol (SCAP), into authentication/authorization classes and accounting
which is based on Diameter Base Protocol. classes.
The Diameter Charging API isolates the core protocol The main difference between client and server classes is
implementation and allows the application to use the in the way they are instantiated. For application classes
Diameter interface with operations that are relevant to the based on client sessions, it is the responsibility of the AAA
application. The Diameter Charging Client is a reference client application to create and manage the instances of
application that uses the Diameter Charging API. It is used these sessions. For application classes based on server
for setting up connections to Diameter server. By using the sessions, the library is responsible in creating and deleting
client, it is possible to insert data, send requests to and instances of these classes. Server classes are deleted by
receive responses from the (emulated) charging server. using an internal garbage collector, once a server session
has completed its execution as defined by its state
Having considered the implementations listed above, we machine. To facilitate the instantiation of application
decided to base our implementation on OD, because it was derived server session classes, the library provides a server
an open source solution, fairly well documented, and it session factory that an application may instantiate and
was under active development and discussion by the register.
community. OD is now described in more detail. Once properly registered, these session factories will
create AAA session objects every time a new authorization
IV. OPEN DIAMETER and/or accounting request arrive. The only criterion for
This section describes the software architecture of OD. this action is whether the local AAA application supports
Parts of this text have been taken verbatim from OD the application ID advertised in the initial request message.
documentation. It should be noted that both client and server session
The Open Diameter API is a session based API, in which classes only provide Diameter session management.
each type of Diameter session is being represented by a Diameter peer connectivity management is provided within
C++ class. Each session class is derived from a specific another class called the application class.
AAA state machine framework as defined in Section 8 of

Figure 3. Open Diameter software architecture


This class manages configuration loading, peer client and the server classes provided by OD by adding the
connectivity, and AAA message routing. Client session Cx interface specific Diameter messages – UAR, MAR,
class binds to this application class via its constructor. and SAR – and building the client and server applications
Server classes are bounded to an application class via the to use the functionality of those classes.
server session factory class which is registered in the The client and the server code have rather similar
application class. By binding to the application class, structures, up to the point of Diameter session
session classes are able to send and receive messages from management. The example code included in the OD
the routing platform provided by the application class. distribution provided sample Diameter communication
between the client and the server and we needed to
V. IMPLEMENTATION & RESULTS implement the UAR, MAR, and SAR commands, which,
according to the Cx specification, are sent from the client
A. Setting up the Open Diameter (CSCF) towards the server (HSS).
The OD distribution contains both the server and the
The OD Base packages are available as either “plain client classes to enable a Cx node to operate in a
source” files, or as source files organized into Microsoft peer-to-peer network. In our application, we implemented
Visual Studio solution (provided by Toshiba research). We the functionality of the Cx interface as if the CSCF acted
used the latter. To compile and use OD libraries support of as a client and the HSS acted as a server. (This could have
following API-s and applications is required: also been implemented the other way round to have both
client/server, i.e. peer functionality on each side.) Figure 4
1.) Perl (Active Perl 5.8.7 Build 813) shows the exchange of messages in our implementation. It
may be noted that each message transmission method (i.e.
The Perl language is utilized by some installation scripts. TxUAR) on the client side has its corresponding
The version we used is available from: counterpart on the receiving, server side (i.e. RxUAR).
http://www.activestate.com/ActivePerl. The notation used here is Tx for transmission, and Rx for
receiving. Messages are distinguished by their message
2.) Xerces C++ XML Parser code, embedded in the message header. The client
(xerces-c_2_6_0-windows_nt-msvc_60) composes a message with the specific code, and sends it to
the server, which then recognizes the message code and
Xerces is a shared library for parsing, generating, initiates the appropriate receiving method.
manipulating, and validating XML documents. The
version we used is available from:
http://xml.apache.org/xerces c/index.html.

3.) OpenSSL library (openssl-0.9.8.tar.gz)

OpenSSL is an open source toolkit implementing the


Secure Sockets Layer (SSL v2/v3) and TLS v1 protocols,
as well as a full-strength general purpose cryptography
library. It is available from http://www.openssl.org.

4.) ACE library (ACE-5.4)

ACE library is an open-source, object-oriented toolkit


written in C++ that implements core concurrency and
networking patterns for communication software,
including event demultiplexing and event handler
dispatching, signal handling, service initialization,
interprocess communication, shared memory management,
message routing, dynamic (re)configuration of distributed
services, concurrent execution and synchronization. It is Figure 4. Exchange of Cx specific Diameter messages
available from:
http://www.cs.wustl.edu/%7Eschmidt/ACE.html. Each message type carries some specific information,
being coded as AVPs. Thus, it was necessary to implement
B. Our implementation the method for composing and resolving the message for
all types of messages. This included definition of message
The OD distribution contains several client/server parts, initialization of message fields, and finally,
examples, which we used to examine Diameter construction of message body.
mechanisms. As a starting point in our development we Finally, we also extended the OD dictionary (XML file),
used the example presenting an authorization application. which is used by the parser part of OD for message
In terms of specifications, we followed the specifications identification and validation, with Cx related message type
of the Diameter protocol [2][5] and Cx interface [3][4] specifications.
provided by 3GPP. Our work included modifying the
The exchange of messages between the client and the client applications. Once both applications were properly
server goes as follows. The client issues a request, and started, we commenced the message exchange between
then waits. The server, having received the request, parses them. Messages captured confirmed the correct operation
the message, processes the request and parameters, and, on both the client and the server side, but with one notable
invokes the corresponding response message method, exception in OD part of the code. Namely, there was no
which returns the information required back to the client. notification of session termination on the server side,
Having completed this task, the method returns a status which could pose a threat to normal operation in real
code, which may be used to determine the success of environment. The OD documentation states that all server
actions performed and to set the application into the side sessions are being properly terminated by the garbage
adequate state. collector. Should this implementation be used as a basis
for further development, a notification of that event should
C. Testing be added.

We first tested the initial OD implementation and its VI. CONCLUSION


conformance to the Diameter specification, followed by
testing of our extended implementation. Since a more With the emergence of new wireless access technologies
recent release of OD became available in the course of our and new applications envisioned in new generation
work, our final implementation was based on OD version networks, the need for AAA becomes more pressing. The
1.0.7-g, which was significantly improved compared to the AAA solution adopted by the 3GPP and 3GPP2 for use in
previous one. the IMS is based on the Diameter protocol. In this paper,
we have studied the Diameter protocol and its application
Cx in the IMS Cx interface. We reviewed four open-source
CSCF HSS implementations of the Diameter protocol, and we used
Open Diameter as a basis for implementing the AAA
functionality that IMS needs, more specifically, the
selected Cx interface functions UAR, MAR, and SAR. The
TCP/IP
conformance of the implementation to the specification
Ethernet
was verified by testing in a laboratory setup. Our further
PC1 PC2 work includes implementation of the remaining Diameter
Figure 5. Laboratory setup messages for the Cx interface.

The laboratory setup (Figure 5) consisted of two low-end REFERENCES


PC-compatible computers, PC1 and PC2, attached to the
local TCP/IP network via Ethernet interface. The PC1 [1] G. Camarillo, M. A. García-Martín, The 3G IP Multimedia
served as the CSCF node (running the Diameter client Subsystem: Merging the Internet and the Cellular Worlds,
application), and PC2 served as the HSS node (running the John Wiley and Sons, Ltd., England, UK, 2004.
Diameter server application). We also needed to configure [2] P. Calhoun, J. Loughney, E. Guttman, G. Zorn, J. Arkko,
the applications by editing the XML configuration files Diameter Base Protocol, IETF RFC 3588, September
which contain network, routing, identity, and some 2003.
additional configuration data. [3] –, IP Multimedia (IM) Subsystem Cx and Dx interfaces;
We used Ethereal (www.ethereal.com, version 0.10.12) Signaling flows and message contents, The 3rd Generation
network protocol analyzer to capture the Diameter Partnership Project; Technical Specification Group Core
messages exchanged between the client and server Network and Terminals; TS 29.228, 2005.
applications. Ethereal was installed on the both the client [4] –, Cx and Dx interfaces based on the Diameter protocol;
and the server. It may be noted that the version 0.10.12 of Protocol details, The 3rd Generation Partnership Project;
Ethereal worked well, while many problems were
Technical Specification Group Core Network and
encountered in the previous version of the package,
Terminals; TS 29.229, 2005.
regarding proper recognition and dissection of Diameter
[5] J. Loughney, Diameter Command Codes for Third
protocol messages.
Generation Partnership Project (3GPP) Release 5, IETF
The purpose of the test was to establish the client and the
RFC 3589, September 2003.
server behavior, and study the content of messages
exchanged. We activated the packet capturing procedure
within Ethereal and then initialized the server and the

You might also like