Command Line (CLI) Reference > CLI Commands > Policies

CLI: Policies

You can use the policy command to create a new Optimizer policy. Policies can then be used in Optimizer virtual circuits.

Configuring policy

policy <policy-name> {action|enable|filter|schedule}

To configure the policy's action to discard (block):

policy <policy-name> action discard {first-packet}

To configure the policy's action to ignore (monitor):

policy <policy-name> action ignore

To configure the policy's action to optimize by shaping the bandwidth:

policy <policy-name> action optimize qos {bandwidth|enable|priority}

E X A M P L E

Create an Optimizer Policy that matches all traffic belonging to the 'Web' Application Group and guarantees 20% of the bandwidth to that traffic, allowing it to burst to 100%.

policy Policy_1
policy Policy_1 schedule ALWAYS
policy Policy_1 action optimize
policy Policy_1 action optimize qos bandwidth burst 100 %
policy Policy_1 action optimize qos bandwidth guaranteed 20 %
policy Policy_1 action optimize qos priority 2
policy Policy_1 action optimize qos enable
policy Policy_1 filter 1
policy Policy_1 filter 1 app-group Web
policy Policy_1 filter 1 network-object destination ALL
policy Policy_1 filter 1 direction both
policy Policy_1 filter 1 network-object source ALL

To configure the policy's action to optimize by accelerating:

policy <policy-name> action optimize aa {enable|reduction-type|type}

To configure the policy's action to optimize by marking packets:

policy <policy-name> action optimize mark {dscp|tos|vlan}

To configure the policy's action to redirect to a webpage (HTTP Redirect):

policy <policy-name> action redirect type http_redirect

policy <policy-name> action redirect value <url>

E X A M P L E

Redirect traffic to http://mysystem.mycompany.com/login

policy myPolicy
policy myPolicy action redirect
policy myPolicy action redirect type http_redirect
policy myPolicy action redirect value "http://mysystem.mycompany.com/login"
policy myPolicy filter 3
policy myPolicy filter 3 app-name HTTP
policy myPolicy filter 3 app-name HTTP-ALT
policy myPolicy filter 3 app-name HTTPS

To configure the policy's action to return a HTML response:

policy <policy-name> action redirect type html_response

policy <policy-name> action redirect value <url>

E X A M P L E

Redirect traffic to http://mysystem.mycompany.com/login

policy myPolicy

policy myPolicy action redirect

policy myPolicy action redirect type html_response

policy myPolicy action redirect value "Two Hours Exceeded"

policy myPolicy filter 3

policy myPolicy filter 3 app-name HTTP

policy myPolicy filter 3 app-name HTTP-ALT

policy myPolicy filter 3 app-name HTTPS

Note that "Two Hours Exceeded" is the name of a pre-defined HTML Response object.

To configure the policy to only be active for a particular schedule:

policy <policy-name> schedule <schedule-name>

To configure the rules that will be used to filter the traffic to determine if this policy will apply to the traffic:

policy <policy-name> filter <filter-num>

policy <policy-name> filter <filter-num> {app-group|app-name|direction|dscp|network-object|tos|vlan}

To enable the policy:

policy <policy-name> enable