Product Documentation

Invoking or Removing a Policy Label or Virtual Server Policy Bank

Aug 31, 2016
Unlike a policy, which can only be bound once, you can use a policy label or a virtual server’s policy bank any number of times by invoking it. Invocation can be performed from two places:
  • From the binding for a named policy in a policy bank.
  • From the binding for a NOPOLICY “dummy” entry in a policy bank.
Typically, the policy label must be of the same type as the policy from which it is invoked. For example, you would invoke a responder policy label from a responder policy.
Note: When binding or unbinding a global NOPOLICY entry in a policy bank at the command line, you specify a priority to distinguish one NOPOLICY entry from another.

To invoke a rewrite or integrated caching policy label by using the command line interface

At the command prompt, type the one of the following commands to invoke a rewrite or integrated caching policy label and verify the configuration:
  • bind cache global <policy> -priority <positive_integer> [-gotoPriorityExpression <expression>] -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT] -invoke reqvserver|resvserver|policylabel <label_name>
  • bind rewrite global<policy> -priority <positive_integer> [-gotoPriorityExpression <expression>] -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT] -invoke reqvserver|resvserver|policylabel <label_name>
  • show cache global|show rewrite global

    Example

    > bind cache global _nonPostReq2 -priority 100 -type req_override -invoke  
    policylabel lbl-cache-pol 
     Done 
    > show cache global 
    1)      Global bindpoint: REQ_DEFAULT 
            Number of bound policies: 2 
     
    2)      Global bindpoint: RES_DEFAULT 
            Number of bound policies: 1 
     
    3)      Global bindpoint: REQ_OVERRIDE 
            Number of bound policies: 1 
     
     Done

To invoke a responder policy label by using the command line interface

At the command prompt, type the following commands to invoke a responder policy label and verify the configuration:
  • bind responder global <policy_Name> <priority_as_positive_integer> [<gotoPriorityExpression>] -type REQ_OVERRIDE|REQ_DEFAULT|OVERRIDE|DEFAULT -invoke vserver|policylabel <label_name>
  • show responder global

    Example

    > bind responder global pol404Error1 300 -invoke policylabel lbl-respndr-pol 
     Done 
    > show responder global 
    1)      Global bindpoint: REQ_DEFAULT 
            Number of bound policies: 2 
     
     Done 
    >

To invoke a Virtual Server Policy Bank by using the command line interface

At the command prompt, type the following commands to invoke a Virtual Server Policy Bank and verify the configuration:
  • bind lb vserver <vserver_name> -policyName <policy_Name> -priority <positive_integer> [-gotoPriorityExpression <expression>] -type REQUEST|RESPONSE -invoke reqvserver|resvserver|policylabel <policy_Label_Name>
  • bind lb vserver <vserver_name>

    Example

    > bind lb vserver lbvip -policyName ns_cmp_msapp -priority 100 
     Done 
     
    > show lb vserver lbvip 
            lbvip (8.7.6.6:80) - HTTP       Type: ADDRESS 
            State: DOWN 
            Last state change was at Wed Jul 15 05:54:24 2009 (+166 ms) 
            Time since last state change: 28 days, 06:37:49.250 
            Effective State: DOWN 
            Client Idle Timeout: 180 sec 
            Down state flush: ENABLED 
            Disable Primary Vserver On Down : DISABLED 
            Port Rewrite : DISABLED 
            No. of Bound Services :  0 (Total)       0 (Active) 
            Configured Method: LEASTCONNECTION 
            Mode: IP 
            Persistence: NONE 
            Vserver IP and Port insertion: OFF 
            Push: DISABLED  Push VServer: 
            Push Multi Clients: NO 
            Push Label Rule: none 
     
    1)      CSPolicy: pol-cont-sw   CSVserver: vs-cont-sw   Priority: 100   Hits: 0 
     
    1)      Policy : pol-ssl Priority:0 
    2)      Policy : ns_cmp_msapp Priority:100 
    3)      Policy : cf-pol Priority:1      Inherited 
     Done 
    >

To remove a rewrite or integrated caching policy label by using the command line interface

At the command prompt, type one of the following commands to remove a rewrite or integrated caching policy label and verify the configuration:
  • unbind rewrite global <policyName> -priority <positiveInteger> -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT
  • unbind cache global <policyName> -priority <positiveInteger> -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT
  • show rewrite global|show cache global

    Example

    > unbind rewrite global NOPOLICY -priority 100 -type REQ_OVERRIDE 
     Done 
    > show rewrite global 
    1)      Global bindpoint: REQ_DEFAULT 
            Number of bound policies: 1 
     
     Done

To remove a responder policy label by using the command line interface

At the command prompt, type the following commands to remove a responder policy label and verify the configuration:
  • unbind responder global <policyName> -priority <positiveInteger> -type OVERRIDE|DEFAULT
  • show responder global

    Example

    > unbind responder global NOPOLICY -priority 100 -type REQ_DEFAULT 
     Done 
    > show responder global 
    1)      Global bindpoint: REQ_DEFAULT 
            Number of bound policies: 1 
     
     Done

To remove a Virtual Server policy label by using the command line interface

At the command prompt, type one of the following commands to remove a Virtual Server policy label and verify the configuration:
  • unbind lb vserver <virtualServerName> -policyName NOPOLICY-REWRITE|NOPOLICY-RESPONDER|NOPOLICY-CACHE -type REQUEST|RESPONSE -priority <positiveInteger>
  • unbind cs vserver <virtualServerName> -policyName NOPOLICY-REWRITE|NOPOLICY-RESPONDER|NOPOLICY-CACHE -type REQUEST|RESPONSE -priority <positiveInteger>
  • show lb vserver|show cs vserver

    Example

    > unbind lb vserver lbvip -policyName ns_cmp_msapp -priority 200 
     Done 
    > show lb vserver lbvip 
            lbvip (8.7.6.6:80) - HTTP       Type: ADDRESS 
            State: DOWN 
            Last state change was at Wed Jul 15 05:54:24 2009 (+161 ms) 
            Time since last state change: 28 days, 06:47:54.600 
            Effective State: DOWN 
            Client Idle Timeout: 180 sec 
            Down state flush: ENABLED 
            Disable Primary Vserver On Down : DISABLED 
            Port Rewrite : DISABLED 
            No. of Bound Services :  0 (Total)       0 (Active) 
            Configured Method: LEASTCONNECTION 
            Mode: IP 
            Persistence: NONE 
            Vserver IP and Port insertion: OFF 
            Push: DISABLED  Push VServer: 
            Push Multi Clients: NO 
            Push Label Rule: none 
     
    1)      CSPolicy: pol-cont-sw   CSVserver: vs-cont-sw   Priority: 100   Hits: 0 
     
    1)      Policy : pol-ssl Priority:0 
    2)      Policy : cf-pol Priority:1      Inherited 
     Done

To invoke a policy label or virtual server policy bank by using the configuration utility

  1. Bind a policy, as described in "Binding a Policy Globally", "Binding a Policy to a Virtual Server", or "Binding a Policy to a Policy Label." Alternatively, you can enter a NOPOLICY “dummy” entry instead of a policy name. You do this if you do not want to evaluate a policy before evaluating the policy bank.
  2. In the Invoke field, select the name of the policy label or virtual server policy bank that you want to evaluate if traffic matches the bound policy. A message in the status bar indicates that the policy label or virtual server policy bank is invoked successfully.

To remove a policy label invocation by using the configuration utility

  1. Open the policy and clear the Invoke field. Unbinding the policy also removes the invocation of the label. A message in the status bar indicates that the policy label is removed successfully.