Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    SSR Database Schema

    When used in conjunction with an MX Series router running the packet-triggered subscribers and policy control (PTSP) feature, the Session State Registrar (SSR) stores the IP edge attachment sessions learned from IP edge devices in the SSR centralized database. The IP edge sessions stored in the SSR database can be used by the Service Activation Engine (SAE) to map the sessions received from the MX Series router service node. An IP edge session is uniquely identified by an IP address and VPN ID. It includes subscriber identity information, which is used to locate the subscriber profile for MX Series router sessions that have the same subscriber IP address.

    The SSR uses a relational SQL design to store data. The database schema includes multiple tables for storing subscriber identity information for session and service activation requests.

    Note: If you make changes to the SSR database schema, you must restart all SRC software components.

    Subscriber Sessions Table

    The format of subscriber identity information stored for each session is managed by the subscriber sessions table, which is controlled by the cluster’s client nodes or management servers. The configuration of the subscriber sessions table is copied to all nodes in a node group, so all nodes operate with the same information. The default format of the subscriber sessions table, described in Table 1, addresses the needs of most carriers; however, you can modify certain fields to address unique needs and situations.

    Table 1: Subscriber Sessions Table Default Fields

    Field Name

    Field Type

    Default Value

    Notes

    UserIPAddress

    binary(4)

    NOT NULL

    Primary key

    This column is fixed and is only resizable.

    VpnID

    varchar(16) CHARACTER SET utf8

    NOT NULL, DEFAULT ‘’

    Primary key

    This column is fixed and is only resizable.

    UserName

    varchar(24) CHARACTER SET utf8

    DEFAULT NULL

    Indexed by default

    IMSI

    varchar(15)

    DEFAULT NULL

    For storing International Mobile Subscriber Identity (IMSI)

    CallingStationID

    varchar(24) CHARACTER SET utf8

    DEFAULT NULL

    For storing Mobile Station ISDN (MSISDN) or Calling-Station-ID

    CalledStationID

    varchar(60) CHARACTER SET utf8

    DEFAULT NULL

    For storing access point name (APN) or Called-Station-ID

    DeviceType

    varchar(16) CHARACTER SET utf8

    DEFAULT NULL

    For storing International Mobile Station Equipment Identity (IMEI)

    AccessType

    varchar(16) CHARACTER SET utf8

    DEFAULT NULL

    For storing radio access technology (RAT)

    SessionID

    varchar(92) CHARACTER SET utf8

    NOT NULL

    For storing Session ID

    This column is fixed and is only resizable.

    Session State

    tinyint unsigned

    NOT NULL DEFAULT 1

    State of the subscriber session (1 for started, 2 for stopped)

    This column is fixed and is not resizable.

    The primary keys of the subscriber sessions table are the UserIpAddress and VpnID fields. The UserIpAddress field stores the subscriber’s IP address in binary format. The default schema uses 4 bytes, which is sufficient for IPv4 addresses. You can modify the length of the UserIpAddress field to 16 bytes if you are using IPv6 addresses. The VpnID field stores the address realm where the user IP address is unique. For non-VPN sessions, the VpnID field must be set to its default value, which is an empty string.

    The subscriber sessions table is configurable with some restrictions. You can add new columns, remove existing columns, or modify the column length, type, or index. You cannot remove the UserIpAddress, VpnID, SessionID, or SessionState columns; however, you can modify the lengths of the UserIpAddress and VpnID fields.

    Attribute Associations

    SSR client components, such as the Service Activation Engine (SAE), Network Information Collector (NIC), Dynamic Service Activator (DSA), and Subscriber Information Collector (SIC), need to read information from the subscriber sessions table and write information to the subscriber sessions table. To support this, you need to specify how SSR client component-specific attributes are translated to subscriber sessions table attributes by defining the mapping between the attributes.

    This mapping provides a virtual schema composed of SAE plug-in attributes. The virtual schema is available to all SSR client components—for example, the SAE, NIC, DSA, SIC, and so on. These components use SAE plug-in attributes in the virtual schema to access the subscriber sessions table. The attribute association mapping provides the correlation between the SAE plug-in attributes and the attributes (columns) in the subscriber sessions table.

    Use the shared database cluster primary attribute-associations entity configuration statement to define the mapping.

    Following is a mapping example:

    shared database cluster primary attribute-associations {entity subscriber-sessions field vpn-id{sae-plug-in-attribute vpn-id;}}

    For multivalued dictionary-type SAE plug-in attributes, including PA_PROPERTY and PA_SUBSTITUTION, the suffix can be used to map a specific property or substitution to a field in the SSR subscriber sessions table. For example:

    shared database cluster primary attribute-associations {entity subscriber-sessions{field called-station-id{sae-plug-in-attribute property.calledStationId;}field calling-station-id{sae-plug-in-attribute property.callingStationId;}}}

    In this example, the PA_PROPERTY plug-in attribute contains two properties: calledStationId and callingStationId. The calledStationId property is mapped to the called-station-id field in the subscriber sessions table, and the callingStationId is mapped to the calling-station-id field. You can also map a multivalued SAE plug-in attribute to a field in the subscriber sessions table. Multiple values are concatenated together using a separator, and stored in the SSR field. When read from the SSR database, the multivalued attribute is restored from the field.

    Service Sessions Table

    The service sessions table stores service activation requests received through the Application Services Gateway (ASG) used by the PTSP feature of the MX Series router to create a service session in the Session State Registrar (SSR). When the ASG receives a service activation request, it queries the subscriber sessions table by using the subscriber’s VpnID and IP address, which are either received from the request directly or obtained through a network information collector (NIC) lookup if the subscriber ID in the request is not a combination of the VpnID and IP address. If the specified combination of VpnID and IP address does not exist, the ASG responds with an error message that the subscriber is unknown. Otherwise, the ASG stores the service activation request with the SessionID attribute, which is taken from the attachment session record, along with SubscriptionName, SessionName, and activation attributes from the request. The SAE is notified through the SSR event interface when the service sessions table is updated—that is, a record is created, updated, or removed. The SAE also queries the service sessions table for service activations when it starts a new PTSP session. Table 2 describes the fields and default values for the service sessions table.

    Table 2: Service Sessions Table Default Fields

    Field Name

    Field Type

    Default Value

    Notes

    SessionID

    varchar(92) CHARACTER SET utf8

    NOT NULL

    Primary key

    SubscriptionName

    varchar(31) CHARACTER SET utf8

    NOT NULL

    Primary key

    SessionName

    varchar(15) CHARACTER SET utf8

    NOT NULL, DEFAULT ‘’

    Primary key

    ActivationAttributes

    varchar(1023) CHARACTER SET utf8

    DEFAULT NULL

    Serialized activation attributes of the AttrSeq type (defined in the SAE external interface)

    The service sessions table contains a composite primary key of SessionID, SubscriptionName, and SessionName. SessionID uniquely identifies an attachment session. SubscriptionName and SessionName identify a service session for a given attachment session.

    ActivationAttributes is an attribute of the varchar type that is used to store service activation attributes that are provided to the ASG with the request. ActivationAttributes is the JavaScript Object Notation (JSON) serialized form of the AttrSeq attribute, which is a sequence of structured attributes:

    struct Attr {string name;WStringSeq values;}

    The AttrSeq attribute that is serialized with JSON should resemble [{name:”name”, values:[“val1”, …]},…].

    The service sessions table is not configurable. If you modify the lengths of the UserIPAddress and VpnID fields in the subscriber sessions table, the SRC software adjusts the lengths of these fields in the service sessions table.

    Modified: 2015-06-23