If you need some example pcap traces generated by any of these tools, just send an email to fasferraz@gmail.com


Showing posts with label SGSN. Show all posts
Showing posts with label SGSN. Show all posts

12/16/13

MME/SGW/SGSN GTPv2 Emulator

This is a new application that I've done recently, that is an evolution from the GTP Emulator that was only GTPv1.

I started to implement only the interface S5/S8 to interact with the PGW, but later on I also added the MME interface S11 and SGSN interface S4 towards the SGW.

This application has the following main interface:



This tab has the SGSN Gn part like the previous GTP Emulator App, with the addition of the UpdatePDPContext message, the SGW part with four GTPcV2 messages, and the MME/SGSN part with five GTPcV2 messages, but for nine types of procedures.

The App is ready to answer to CreateBearerRequest or UpdateBearerRequest sent from the PGW/SGW, even with DedicatedBearers (and with several bearers at the same time), and generally speaking, any message originated from the PGW or SGW nodes (DataDownlinkNotification, DeleteBearerRequest).

In the second tab of this app we have the QOS part, which is the same tab of the GTP Emulator App, plus the 4G part:



In this tab I added also the PCO bytes to send in the CreatePDPContext or CreateSessionRequest, mainly due the lack of space in the main tab.

The third tab is a Log, which shows some relevant information form the messages sent and receive. Here is an example:



The fourth tab is one of the most interesting ones. Is the test tab.
This part of the application allow us to do the following things using some specific CLI that I've created:
  • Send any of the supported messages
  • Set some specific parameters like QOS, Comon Flags, RAT Type, CGI/SAI/EGCI in these messages
  • Set the IPs of the PGW or SGW for the following tests
  • Set specific parameters (like the QOS or Event-Triggers) in other two Apps that I also have (OCS and PCRF Server), using an UDP interface and protocol that I've develop specific for this feature


For example the test presented in this next image is the Creation, Update and Delete of PDP Contexts, using different QOS, and different Common Flags values, to test all the possible combinations of a scenario that I needed to test:





Without this app, some of the combinations were impractical to reproduce and some would take a big amount of time. With this app, it toked less than one minute. Just check this cap file of the test above.

For example it's so easy to start a session in 4G, do an update to 3G, then an update to 2G, then an update to 4G, and so on, setting all the parameters accordingly. Things that in real live networks, using real terminals are very hard to achieve, and take lots, and lots of time.

With this tool: just seconds!

Again, this type of tools allow us to set non standard messages just to see how the nodes react to erroneous messages.

12/6/11

GTP Emulator

Due to some requests I have received over the last weeks, I made some changes in the SGSN Emulator application, and just strip it to a simple GTP tool to create and delete PDP contexts, and adding the possibility to insert and setting in the GTP message the most used Information Elements (IE).

This tool has the following interface:



I have kept the same QOS front-end of the SGSN Emulator application, since this can be very useful to test the creation of PDP with any QOS we want:



This tool can be tested using the demo version I have made. 
This demo has some limitations (only mandatory IE, only QOS R97/98 and only one Create/Delete PDPContext a time) but it's fully functional.


6/2/11

EIR Diameter Server

This is an application that I've made in 2011. It's an EIR Diameter Server that implements the EPC/LTE s13 interface towards an SGSN/MME.

It complies with 3GPP 29.272 "Evolved Packet System (EPS); Mobility Management Entity (MME) and Serving GPRS Support Node (SGSN) related interfaces based on Diameter protocol", and basically it answers to the ME-Identity-Check-Request with the IMEI Equipment-Status:

->WhiteListed
->GreyListed
->BlackListed




With this application it's possible to define a list of white, grey and black IMEIs (or initial digits of IMEI), in order to test completely the s13 interface.

The Logging option displays the result sent in the last twenty ME-Identity-Check-Answer messages.

This application was done easily in two days, since it uses the Diameter framework already developed for the OCS and PCRF Diameter Server Applications.

I've tested it, with a real MME recently. It works as expected!

The 3GPP-ME-Indentity-Check-Request:


The 3GPP-ME-Identity-Check-Answer:

5/4/11

SGSN Emulator

This is an application that I’ve made in 2010. This application is an emulation of the Gn interface of a SGSN (according to 3GPP 29.060).
It implements GTPv1, mainly the control part GTP-C. In terms of user plane, it accepts GTP-U in the downlink direction, and also implements the echo response mechanism in order to preserve the GTP tunnels.


This app can be used to test every GTP parameter in a CreatePDPContextRequest. I’ve made only options for dynamically setting the QOS Profile, Rat Type and Selection Mode parameters, but other information elements can be easily added (or removed). This way you can test the behaviour of the GGSN in the presence or absence of specific information elements (mandatory or optional), or the presence of specific parameter values in order to reproduce whatever scenarios an operator may want (example: Roaming, interworking between different vendors, reproducing failure scenarios, etc…)


With this application it’s possible to create and delete PDPs dynamically.

It’s possible to define:
  • the rate at which the PDPs are created and deleted (the rates can be different);
  • the APNs that are sent in the CreatePDPContextRequest;
  • the total number of PDPs to create per APN;
  • the duration of each PDP per APN;
  • the GGSN IP address for each APN;
  • the IMSI Range to be used;
  • the GTP-C and GTP-U address of the SGSN;
  • the daily working interval, and weekdays to start the creation and deletion of the PDPs

During running time it’s possible to check how many PDPs are currently active per APN, and access individual PDP Context information like the ChargingID, or the  EndUserAddress for each IMSI/MSISDN/NSAPI.

The application also provides statistical information in real-time and also cumulative counters for GTP messages and causes received in responses:




The main goal of this application it’s to test the GGSN behaviour under harsh conditions, since we can set a very high creation and deletion signalling rates. 

We can also test other signalling components if they are involved in the activation or deactivation of a specific APN/PDP without having to actually be generating real traffic from the network:

- Gx interface (i.e. PCRF)
- Radius
- Gy interface (i.e. OCS)
- Ga interface (i.e. generation/closure of CDRs for offline billing)

I have made a simpler tool that has some of these functionalities. 
Please check it GTP Emulator.