Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation  Back up to About Overview 
  
[+] Expand All
[-] Collapse All

Current Sessions Table Overview

The shared memory engine of the data cluster contains the current sessions table (CST), which lists current sessions. The CST is the largest and most active element of the database. The CST contains one record, or row, for each session created or updated by any of the Steel-Belted Radius Carrier servers using the data cluster.

The types of data that a row contains are controlled by adding or deleting fields (which form columns in the CST) to the /opt/JNPRhadm/CurrentSessions.sql file. Adding a column creates a new field for each record in the table. Within the configuration file, columns are defined as belonging to specific types.

The information stored in the CST is customizable. To ensure that you can identify sessions accurately and format CoA/DM requests with the appropriate attributes for the services you are supporting in your network, we recommend that you customize the information stored in the CST for your particular network environment. For example, before you retrieve a value from the CST for use in an attribute in a CoA message, you must first map the CST field to a RADIUS attribute in the dbc_mapping.xml file. In the following example, the FunkOuterUserName field is mapped to the Original-User-Name attribute using the attribute element to enable retrieving the value in the FunkOuterUserName field as a result of a session control request. The queryAttribute child element is used for indexing the CST while querying sessions using the SessionControl.sh script or Web GUI. If you want to query sessions using the attribute, then you need to specify the attribute in the queryAttribute child element.

<attributeMapping field="FunkOuterUserName" attribute="Original-User-Name">
<queryAttribute name="Original-User-Name"/>
</attributeMapping>

When Steel-Belted Radius Carrier SSR is installed, the default CST schema contains Core, Required, and Optional System fields. By default, the System Core fields and the Sbr_UserName System Optional field are active, with other System fields commented out. When CreateDB.sh is invoked, it includes only active fields in the CST.

If you modify the file, remember:

  • All System Core fields must be active.
  • System Feature fields must be active if Steel-Belted Radius Carrier is configured to support their corresponding features. To activate an inactive System Feature field, you must uncomment the entry for the field in the CurrentSessions.sql file. (If the System Feature field required for a feature is inactive, the feature is disabled and an error message is written to the RADIUS log file.)
  • You can comment out the Sbr_UserName field if it is not required.
  • After CurrentSessions.sql is modified:
    1. The file must be distributed to all management nodes in the cluster.
    2. The current running database must be removed. As hadm, run DestroyDB.sh on one management node.
    3. The new database must be created. As hadm, run CreateDB.sh on all management nodes to rebuild the database.

Table 23 describes each section and each section’s fields:

Table 23: Default Current Sessions Table Fields

Field Type

CurrentSessions.sql Entry

System Core fields are mandatory fields that must be present in every CST.

See Table 24 for details on each field.

#=======================================================================
##########################################################################
This CST schema is customizable, but CONSULT THE DOCUMENTATION FIRST!! #
##########################################################################
CREATE TABLE Sbr_CurrentSessions
  (
    #-------------------------------------------------------------------
    SYSTEM CORE FIELDS
    #-------------------------------------------------------------------
    Sbr_UniqueSessionId     BINARY(16)
                            NOT NULL /*UNIQUE*/,  *is* "UNIQUE", but dont
declare it so (MySQL bug)
    Sbr_CreationTime        TIMESTAMP
                            NOT NULL DEFAULT 0,
Sbr_ExpirationTime      TIMESTAMP
                            NOT NULL DEFAULT 0,
    Sbr_Ipv4Address         INT UNSIGNED
                            DEFAULT NULL,
Sbr_IpPoolOrdinal       SMALLINT UNSIGNED
                            DEFAULT NULL,
    Sbr_NasName             VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
                            NOT NULL,
    Sbr_SessionState        TINYINT UNSIGNED
                            NOT NULL DEFAULT 0,
    Sbr_UserConcurrencyId   VARCHAR(84) CHARSET utf8 COLLATE utf8_general_ci
                            DEFAULT NULL,                           
    Sbr_MobileIpType        TINYINT UNSIGNED
                DEFAULT 0,
Sbr_3gpp2ReqType        INT UNSIGNED
                            DEFAULT 0,
    Sbr_WimaxClientType     TINYINT UNSIGNED
                            NOT NULL DEFAULT 0,
    Sbr_WimaxAcctFlows      VARBINARY(4095)
                            DEFAULT NULL,
   Sbr_3gpp2HomeAgentAddr   INT UNSIGNED
                            DEFAULT NULL,
#-------------------------------------------------------------------

System Feature fields are static fields that must be present if, and only if, specific Steel-Belted Radius Carrier features are enabled.

See Table 25 for details on each field.

SYSTEM FEATURE FIELDS
#-------------------------------------------------------------------
#Sbr_AcctFileCarryover   VARBINARY(1024)
                       DEFAULT NULL,
Sbr_AcctAutoStop        VARBINARY(1023)
DEFAULT NULL,
Sbr_SessionTimeout      INT UNSIGNED
DEFAULT NULL,
Sbr_ClassAttribute      VARBINARY(1024)
DEFAULT NULL,
#Sbr_UniqueSessionId_Hex CHAR(32) CHARSET ascii COLLATE ascii_general_ci
                       DEFAULT NULL,
 INDEX Sbr_UniqueSessionId_Hex_Idx USING HASH (Sbr_UniqueSessionId_Hex),
#-------------------------------------------------------------------

System Optional fields are static fields that you can use or comment out. By default, all fields are enabled.

See Table 26 for details on each field.

SYSTEM OPTIONAL FIELDS
#-------------------------------------------------------------------
Sbr_UserName            VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
Sbr_AcctSessionId       VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
Sbr_TransactionId       BINARY(12)
DEFAULT NULL,
Sbr_NasPortType         INT UNSIGNED
DEFAULT NULL,
Sbr_NasPort             INT UNSIGNED
DEFAULT NULL,
Sbr_CallingStationId    VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
Sbr_CalledStationId     VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
Sbr_MobileCorrelationId VARCHAR(32) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
#-------------------------------------------------------------------

RadAttr fields are dynamic custom fields that you can use to capture raw information in incoming or outgoing RADIUS attributes. The content of each field in the CST comes from SBR Carrier attributes.

You can modify the three template fields if you need to add custom fields.

See Table 27 for details on each field.

ADMIN RADATTR FIELDS
#-------------------------------------------------------------------
WimaxSessionId          VARBINARY(32)
DEFAULT NULL,
AcctMultiSessionId      VARCHAR(32) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
FunkOuterUserName       VARCHAR(84) CHARSET utf8 COLLATE utf8_general_ci
DEFAULT NULL,
#RadAttrField1          INT UNSIGNED
                      DEFAULT NULL,
#RadAttrField2          VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
                      DEFAULT NULL,
#RadAttrField3          VARBINARY(32)
                      DEFAULT NULL,
#-------------------------------------------------------------------

Private fields are dynamic custom fields that you can use to capture information of any kind from third-party applications. SBR Carrier does not populate private fields, so you can modify the template fields if you need to add private fields.

ADMIN PRIVATE FIELDS
#-------------------------------------------------------------------
#PrivateField1           INT UNSIGNED
                       DEFAULT NULL,
#PrivateField2           VARCHAR(24) CHARSET utf8 COLLATE utf8_general_ci
                       DEFAULT NULL,
#PrivateField3           BINARY(32)
                       DEFAULT NULL,
#-------------------------------------------------------------------

System Keys and Indexes of columns in the table list tools that are required for Session State Register admin scripts and shell functions. They may also be used by other applications making calls through the NDBAPI or SQL queries.

  • A single-column index may be used by SBR Carrier front ends, SSR itself, or the LDAP Configuration Interface.
  • A multi-column index may only be used within the Session State Register cluster or from a third party application. It may not be used by SBR Carrier front ends, SSR itself, or the LDAP Configuration Interface.

    Because of these limitations, you cannot use a multi-column index for the session lookup in a CoA/DM request (for example). However, you can add a private field, index with just that one field, and use that index in your CoA/DM query strings.

SYSTEM KEYS/INDEXES
#-------------------------------------------------------------------
PRIMARY KEY USING HASH                   (Sbr_UniqueSessionId),
INDEX Sbr_NasName_Idx         (Sbr_NasName),
INDEX Sbr_ExpirationTime_Idx  (Sbr_ExpirationTime),
INDEX AcctMultiSessionId_Idx  (AcctMultiSessionId),
INDEX Sbr_MobileCorrelationId_Idx (Sbr_MobileCorrelationId),
INDEX Sbr_AcctSessionId_Idx (Sbr_AcctSessionId),
INDEX Sbr_UserName_Idx (Sbr_UserName),
INDEX Sbr_CallingStationId_Idx (Sbr_CallingStationId),
INDEX Sbr_CalledStationId_Idx (Sbr_CalledStationId),
INDEX Sbr_Ipv4Address_Idx (Sbr_Ipv4Address),
INDEX Sbr_TransactionId_Idx (Sbr_TransactionId)
      
#-------------------------------------------------------------------

Admin keys and indexes must be present in every CST.

ADMIN KEYS/INDEXES
#-------------------------------------------------------------------
#,
 INDEX Some_Idx USING HASH (What, Ever)
)
ENGINE = ndbcluster  NOTE: CreateDB.sh fiddles with this line!
;
#=======================================================================

Modified: 2017-03-07