Skip to content. | Skip to navigation

Personal tools


You are here: Home / Wiki / PhantomNet / OEPC-Protected / Running the HSS as a standalone node in PhantomNet

Running the HSS as a standalone node in PhantomNet

Execute the HSS in a standalone node in PhantomNet


The default PhantomNet experiment executes the HSS functionality in the epc-enablers node along with other functions like pcrf,aaa etc. In this tutorial, we show how the custom OpenEPC configuration features of PhantomNet can be used to create an experiment where the HSS runs as an standalone node.


Step1: Modify the template ns file

We need to modify the default ns file to create an additional node for the standalone HSS and also to provide customized configuration options to setup different OpenEPC components properly. You can find an example ns file here. The key additions to the ns files are shown below.

  • Provide locations of custom scripts (customize according to where you store yours):
  •     set EPC_PRE_SCRIPT "/proj/PhantomNet/sep-hss/"
        set HSS2_PRE_SCRIPT "/proj/PhantomNet/sep-hss/" 
        set HSS2_POST_SCRIPT "/proj/PhantomNet/sep-hss/"
  • Create the EPC components with custom configurations
    •     # Create the epc-enablers node (Mandatory)
          epcnode epc "epc-enablers" {} $EPC_PRE_SCRIPT {}
          addtolan net_a $epc
          # Create the standalone hss node (Mandatory)
          epcnode hss2 "any" {} $HSS2_PRE_SCRIPT $HSS2_POST_SCRIPT
          addtolan net_a $hss2

Here the "*_PRE_*" scripts are used to install custom xml node configuartion files for the respective components. Please refer to the documentation for custom OpenEPC configuration for more details. Here is an example of the HSS2_PRE_SCRIPT used in the above example. Note that, for the standalone HSS node we provide the role "any" which ensures that PhantomNet does not create a specific role for the the node  initially. We use the "*_POST_*" script for the node to startup the HSS service in this node. Here is an example of the HSS2_POST_SCRIPT used in the above example.

  • Manually set the IP addresses for the standalone HSS node
#set IP for the standalone HSS node manually
tb-set-ip-lan $hss2 ${net-a}
tb-set-ip-lan $hss2 ${mgmt}

This addition is necessary because the standalone HSS node is not one of the predefined OpenEPC roles.  Any custom node will similarly need to have its IP addresses manually specified in the appropriate range.  Please see the OpenEPC documentation for more information about the basic network layout.

Step 2: Create custom config files

Before we can execute our ns file, we need to create the custom xml files the EPC components will be using. As mentioned before, the "PRE" scripts are responsible for installation of the custom config files for the respective components. 

  • First, we need to create a configuration file for the standalone HSS. An example configuration can be found here. It is basically the same as the default hss.xml file used in the canned version of the PhantomNet experiments with the IP addresses changed to match the standalone HSS node.
  • Second, now we need to chage the configuartion in the epc-enablers node to effectively disable the HSS service from that node.  One can use the existing hss.xml file and comment out all the HSS related functionality for this purpose. An example configuration file can be found here. Note that, a valid (non-empty) hss.xml file is still required in this step so that the default sanity checks in PhantomNet are not affected. 

Step 3: Place the scripts and the configuartion files

The custom configuartion files and the Pre- and Post-hook scripts should be placed in a location such that the PhantomNet client-side start-up tools can access them. The recommended location is somewhere under your project's NFS-shared file space, i.e.: /proj/<your_project>/somedir. The files for this example are located in the /proj/PhantomNet/sep-hss directory, but your directory path will be different.

Step 4: Execute

Now we are all set to create an experiment with the modified ns file. After the experiment is created, the standalone HSS node wil be running with the specified IP address. One can use wireshark on this node to monitor the control plane message exchanges with ths HSS and the other EPC components. All other experimental nodes can be used in the same fashion as in the default PhantomNet experiments.