The Diameter Scenario Pack adds support to the OpenCloud Scenario Simulator for the following Diameter protocols:

  • Base Accounting

  • CCA

  • Ro/Gy

  • Gx

  • Rf

  • Sh

  • Zh

Topics

Usage

starting and stopping the simulator

Running the Scenario Pack examples

install and run the examples included with the Scenario Pack

Documentation for the OpenCloud Scenario Simulator and other Scenario Packs, including links to changelogs and downloads, can be found on the Scenario Simulator product page

Usage

1

Add the following entries to /etc/hosts, substituting appropriate IP addresses for each simulator if they run on a remote server. In this example all simulators are running on the local host.

127.0.0.1   diameterserver diameterclient

2

To start Scenario Simulator instances without TLS:

./scenario-simulator.sh -l simulator-diameter-client.log -f diameter-examples/config/setup-client.commands
./scenario-simulator.sh -l simulator-diameter-server.log -f diameter-examples/config/setup-server.commands

3

To start Scenario Simulator instances with TLS:

./scenario-simulator.sh -l simulator-diameter-client.log -f diameter-examples/config/setup-client-tls.commands
./scenario-simulator.sh -l simulator-diameter-server.log -f diameter-examples/config/setup-server-tls.commands
Important

For simulator TLS configuration, please see the Diameter Resource Adaptors Guide.

For general TLS configuration of Java Virtual Machine, please see the Sun/Oracle JSSE Reference Guide.

Examples

The Diameter scenario pack is bundled with example configuration and scenario files.

The examples may be found in the <scenario_simulator>/diameter-examples directory.

The Basic Diameter Examples are stand-alone scenarios using the Scenario Simulator only. The Diameter Rhino examples show Diameter integrating with the Rhino TAS.

Basic Diameter Examples

1

Add the following entries to /etc/hosts, substituting appropriate IP addresses for each simulator if they run on a remote server. In this example all simulators are running on the local host.

127.0.0.1   diameterserver diameterclient

2

To start Scenario Simulator instances without TLS:

./scenario-simulator.sh -l simulator-diameter-client.log -f diameter-examples/config/setup-client.commands
./scenario-simulator.sh -l simulator-diameter-server.log -f diameter-examples/config/setup-server.commands

3

To start Scenario Simulator instances with TLS:

./scenario-simulator.sh -l simulator-diameter-client.log -f diameter-examples/config/setup-client-tls.commands
./scenario-simulator.sh -l simulator-diameter-server.log -f diameter-examples/config/setup-server-tls.commands
Important

For simulator TLS configuration, please see the Diameter RA documentation.

For general TLS configuration of Java Virtual Machine, please see the Sun/Oracle JSSE Reference Guide.

Diameter Rhino Examples

The following examples combine the Rhino Diameter RA and Scenario Simulator.

Prerequisites for all examples

For all examples, ensure you have the following applications installed:

  • ant

  • Rhino SDK 2.4

  • Diameter RA 3.0.0

  • Scenario-Simulator

For all examples, ensure the following line is in your /etc/hosts file on the local host:

127.0.0.1    diameterserver diameterclient
Examples
Example 1. Scenario-Simulator acting as diameterserver with Rhino Diameter RA acting as diameterclient

1

Install RhinoSDK and licence

2

Start RhinoSDK.

3

Undeploy any deployed Diameter RA examples

4

Install the Diameter RA cca example:

cd $RHINO_HOME/rhino-connectivity/diameter-3.0.0/examples/cca
ant deploy

5

Start scenario-simulator:

cd $SCENARIO_SIMULATOR_HOME
./scenario-simulator.sh -l diameterserver.log -f diameter-examples/rhino-integration-config/setup-server.commands -e 'load-scenario diameter-examples/rhino-integration-config/cca-rhino-as-client-init.scen'

6

Wait until the client has connected to the server --- check the Rhino log:

2016-10-19 17:02:39.861  Info    [trace.creditcontrol_0.transport.peer]   <creditcontrol-0/Worker/0> [diameterserver:OPEN]  connection ready

7

Run the Diameter session as per the Diameter CCA examples instructions, for example:

:~/testing/scenario-simulator-2.3.1.0$ telnet localhost 9999
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
init
OK: STATE_SETUP_IN_PROGRESS --> STATE_SETUP_COMPLETE

8

Check the Rhino log and scenario-simulator log to see Diameter traffic between the client and server.

Example 2. Scenario-Simulator acting as a diameterclient with Rhino Diameter RA acting as diameterserver

1

Install RhinoSDK and licence

2

Start RhinoSDK.

3

Undeploy any deployed Diameter RA examples

4

Install the Diameter RA shserver example:

cd $RHINO_HOME/rhino-connectivity/diameter-3.0.0/examples/shserver
ant deploy

5

Start scenario-simulator:

cd $SCENARIO_SIMULATOR_HOME
./scenario-simulator.sh -l diameterclient.log -f diameter-examples/rhino-integration-config/setup-client.commands -e 'load-scenario diameter-examples/rhino-integration-config/sh-udr-rhino-as-server.scen'

6

Wait until the client has connected to the server --- check the Rhino log:

2016-10-19 17:20:28.599  Info    [trace.shserver_0.transport.peer]   <shserver-0/Worker/0> [diameterclient:OPEN]  connection ready

7

Run the Diameter session from the Scenario Simulator console:

....
Processing command: load-scenario Diameter-examples/rhino-integration-config/sh-udr-rhino-as-server.scen
Playing role "client" in initiating scenario "sh-udr-rhino-as-server" with dialogs [sh]
Ready to start

Please type commands... (type "help" <ENTER> for command help)
> run-session sh-udr-rhino-as-server
Send -->  User-Data-Request to Diameterserver
Recv <--  User-Data-Answer from Diameterserver
Outcome of "sh-udr-rhino-as-server" session: Session was matched.

8

Check the Rhino log and scenario-simulator log to see Diameter traffic between the client and server.

Example 3. Scenario-Simulator acting as a diameterclient with Rhino Diameter RA acting as diameterserver, using TLS

1

Install RhinoSDK and licence

2

Start RhinoSDK.

3

Undeploy any deployed Diameter RA examples

4

Follow the Diameter documentation to install the Diameter RA shserver example with TLS.

5

Start scenario-simulator:

cd $SCENARIO_SIMULATOR_HOME
./scenario-simulator.sh -l diameterclient.log -f diameter-examples/rhino-integration-config/setup-client-tls.commands -e 'load-scenario diameter-examples/rhino-integration-config/sh-udr-rhino-as-server.scen'

6

Wait until the client has connected to the server --- check the Rhino log:

2016-10-19 17:25:12.341  Info    [trace.shserver_0.transport.peer]   <shserver-0/Worker/0> [diameterclient:OPEN]  connection ready

7

Run the Diameter session from the Scenario Simulator console:

....
Processing command: load-scenario Diameter-examples/rhino-integration-config/sh-udr-rhino-as-server.scen
Playing role "client" in initiating scenario "sh-udr-rhino-as-server" with dialogs [sh]
Ready to start

Please type commands... (type "help" <ENTER> for command help)
> run-session sh-udr-rhino-as-server
Send -->  User-Data-Request to Diameterserver
Recv <--  User-Data-Answer from Diameterserver
Outcome of "sh-udr-rhino-as-server" session: Session was matched.
Example 4. Diameter Ro scenario

1

Deploy diameter ro example (examples/ro) or start ro-simulator (simulators/ocs-simulator/ro-simulator.sh) both distributed with Diameter RA.

2

To test the ro example start simulator with server scenarios loaded:

./scenario-simulator.sh -l simulator-diameter-server.log -f diameter-examples/config/setup-ro-server.commands

3

To test the ro-simulator start simulator with client scenarios loaded:

./scenario-simulator.sh -l simulator-diameter-client.log -f diameter-examples/config/setup-ro-client.commands

Scenarios for client and server can successfully run with both endpoints simulated.

Important This scenario depends on configuration setting Simulator.ApplicationId.4=diameter-ro-v8d0 in server.properties.
Example 5. Diameter Scenarios for diameter mediation example

1

Deploy Diameter mediation example distributed with Diameter RA.

2

Start separate Scenario Simulators for each endpoint as needed for the mediation example.

./scenario-simulator.sh -l simulator-diameter-server.log -f diameter-examples/config/setup-mediation-server.commands
./scenario-simulator.sh -l simulator-diameter-client.log -f diameter-examples/config/setup-mediation-client.commands

3

Wait until all the peers are connected before running the scenarios.