Invoke or remove a policy label or virtual server policy bank
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.
Invoke a rewrite or integrated caching policy label by using the CLI
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 -priority [-gotoPriorityExpression ] -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT] -invoke reqvserver|resvserver|policylabel - bind rewrite global -priority [-gotoPriorityExpression ] -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT] -invoke reqvserver|resvserver|policylabel - 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
Invoke a responder policy label by using the CLI
At the command prompt, type the following commands to invoke a responder policy label and verify the configuration:
- bind responder global [] -type REQ_OVERRIDE|REQ_DEFAULT|OVERRIDE|DEFAULT -invoke vserver|policylabel - 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
Invoke a virtual server policy bank by using the CLI
At the command prompt, type the following commands to invoke a Virtual Server Policy Bank and verify the configuration:
- bind lb vserver -policyName -priority [-gotoPriorityExpression ] -type REQUEST|RESPONSE -invoke reqvserver|resvserver|policylabel - bind lb vserver
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 2) Policy : pol-ssl Priority:0 3) Policy : ns_cmp_msapp Priority:100 4) Policy : cf-pol Priority:1 Inherited Done
Remove a rewrite or integrated caching policy label by using the CLI
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 -priority -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT - unbind cache global -priority -type REQ_OVERRIDE|REQ_DEFAULT|RES_OVERRIDE|RES_DEFAULT - show rewrite global|show cache global
Example:
>解开改写全球NOPOLICY优先100泰pe REQ_OVERRIDE > show rewrite global Done 1) Global bindpoint: REQ_DEFAULT Number of bound policies: 1 Done
Remove a responder policy label by using the CLI
At the command prompt, type the following commands to remove a responder policy label and verify the configuration:
- unbind responder global -priority -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
Remove a virtual server policy label by using the CLI
At the command prompt, type one of the following commands to remove a Virtual Server policy label and verify the configuration:
- unbind lb vserver -policyName NOPOLICY-REWRITE|NOPOLICY-RESPONDER|NOPOLICY-CACHE -type REQUEST|RESPONSE -priority - unbind cs vserver -policyName NOPOLICY-REWRITE|NOPOLICY-RESPONDER|NOPOLICY-CACHE -type REQUEST|RESPONSE -priority - 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
调用一个订单licy label or virtual server policy bank by using the GUI
- Bind a policy, as described inBind a policy globally,Bind a policy to a virtual server, orBind 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.
- 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.
Remove a policy label invocation by using the GUI
- 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.
In this article
- Invoke a rewrite or integrated caching policy label by using the CLI
- Invoke a responder policy label by using the CLI
- Invoke a virtual server policy bank by using the CLI
- Remove a rewrite or integrated caching policy label by using the CLI
- Remove a responder policy label by using the CLI
- Remove a virtual server policy label by using the CLI
- 调用一个订单licy label or virtual server policy bank by using the GUI
- Remove a policy label invocation by using the GUI