Configuring PTSP Policy Rules (SRC CLI)

Note: For PTSP you must:

  • Set the role of the policy list to junos-ptsp
  • Set the policy list rule type to ptsp-service-rule
  • Set the policy list applicability option to both
  • Create a policer instance.

Use the following configuration statements to configure PTSP policy rules:

policies group name list name rule name {precedence precedence;accounting;application-accounting application-accounting;type [(ptsp-service-rule | ptsp-subscriber-profile | ptsp-template)];subscriber-profile subscriber-profile;}

To configure policy rules:

  1. From configuration mode, create a policy rule inside a policy list that has already been created and configured. For example, to create a policy rule called rule1 within a policy list called list1:
    user@host# edit policies group group1 list list1 rule rule1
  2. (Optional) Specify the order in which the policy manager applies the policy rule. Rules are evaluated from lowest to highest precedence value. Precedence has meaning only if two rules have different classifiers and if those classifiers overlap. If this is the case and a packet is received that satisfies both classifiers, then only the action of the rule with the lower precedence value is performed.

    For PTSP policies, enter an integer in the range 1–254.

    [edit policies group group1 list list1 rule rule1] user@host# set precedence precedence
  3. (Optional) Specify whether accounting data is collected for the actions in the policy rule.

    The value set for the a-s variable in the ptsp-service-rule policy template (__svc_rule__) on the MX Series router corresponds to the setting of the accounting and application-accounting options under the policy rule. If the accounting option is set, it corresponds to setting the a-s variable to the “rule” value, and statistics are collected on a per subscriber/per rule basis. If the accounting option is not set, you can define the value for the application-accounting option.

    If you specify that accounting data is collected, the SAE begins collecting accounting information when a service that uses the policy rule is activated. When the service is deactivated, the SAE sends the accounting records to the RADIUS accounting server or to a plug-in.

    When you specify multiple actions for accounting, the SAE adds the accounting data for individual actions together to obtain a summary accounting record for that interface direction.

    Accounting is not available for all actions.

    [edit policies group group1 list list1 rule rule1 user@host# set accounting
  4. (Optional) Specify application accounting.

    If PTSP application accounting is configured on the MX Series router, this attribute selects how application accounting is collected. Application accounting is maintained in a flat file on the router and is not collected by the SRC software. Application accounting and rule accounting are mutually exclusive.

    [edit policies group group1 list list1 rule rule1 user@host# set application-accounting application-accounting

    The value set for the a-s variable in the ptsp-service-rule policy template (__svc_rule__) on the MX Series router corresponds to the setting of the accounting and application-accounting options under the policy rule. If the accounting option is not set, you can define one of the following values for the application-accounting option:

    • “application”—Router maintains one counter per subscriber/application. This value corresponds to setting the a-s variable in the ptsp-service-rule policy template (__svc_rule__) on the MX Series router to the “app” value, and statistics are collected on a per subscriber/per application basis.
    • “group”—Router maintains one counter per subscriber/application group. This value corresponds to setting the a-s variable in the ptsp-service-rule policy template (__svc_rule__) on the MX Series router to the “group” value, and statistics are collected on a per subscriber/per application-group basis.
    • “any”—Router maintains one counter per subscriber. This value corresponds to setting the a-s variable in the ptsp-service-rule policy template (__svc_rule__) on the MX Series router to the “any” value, and statistics are collected on a per subscriber basis.
    • “nested-app”—Router maintains one counter per subscriber/per nested application. This value corresponds to setting the a-s variable in the ptsp-service-rule policy template (__svc_rule__) on the MX Series router to the “nested-app” value, and statistics are collected on a per subscriber/per nested application basis. Use the nanl variable, in the policy template for the router to specify the list of nested application names. Items in the list are separated by commas.
    • A parameter of type applicationAccounting.

    Note: The values application, group, any, and nested-app are literal strings and must be enclosed in double quotation marks (“ ”). To enter them in the SRC CLI, enclose the literal string with double quotation marks (“ ”) within single quotation marks (‘ ’). For example “nested-app” is entered as ‘“nested-app”’ in the SRC CLI. Alternatively, you can enclose them in double quotation marks within backslashes. For example, \“nested-app”\.

  5. Specify the type of policy rule.
    [edit policies group group1 list list1 rule rule1 user@host# set type type

    Where type is one of the following values:

    • ptsp-service-rule—Use the predefined policy template called __svc_rule__ on the MX Series router.
    • ptsp-subscriber-profile—Use the policy template called __opt__ on the MX Series router. The router running Junos OS allows a service chain to be configured inside service sets, which are attached to the router interfaces. To configure this feature you need to specify a subscriber profile using the subscriber-profile option. The subscriber profile indicates which services should be enabled or disabled for the matching traffic flow. All traffic flows passing through the interface receive the same service chain irrespective of the subscriber. Using this option allows you to apply differentiated services to different sets of subscribers. Subscriber profiles must be preconfigured on the router. Only one subscriber profile can be bound to a subscriber at any given time. This option does not support classifiers or accounting.
    • ptsp-template—This setting is for future use.
  6. (Optional) Specify the name of the subscriber profile to attach to the matching flow. This option is used only when the policy rule type is set to ptsp-subscriber-profile.
    [edit policies group group1 list list1 rule rule1 user@host# set subscriber-profile subscriber-profile

    Set the value to one of the following:

    • A literal specifying the name of the subscriber profile. There are no predefined values for the subscriber-profile name; you must enter the name of a subscriber-profile you previously configured on the router. The name must be enclosed in double quotation marks, and entered in the SRC CLI enclosed within single quotation marks or backslashes. For example, ‘“vod1-profile”’ or \“vod1-profile”\.
    • A parameter of type profileName.

Related Documentation