ADC

Traffic policies

After you create one or more form SSO and traffic profiles, you create traffic policies and then bind the policies, either globally or to a traffic management virtual server, to put them into effect.

To create a traffic policy by using the command line interface

At the command prompt, type:

```add tm trafficPolicy


### Example

add tm trafficPolicy Traffic-Pol-1 “HTTP.REQ.HEADER(“Cookie”).CONTAINS(“login=true”)” Traffic-Prof-1


## To modify a traffic policy by using the command line interface

At the command prompt, type:

```set tm trafficPolicy <name> <rule> <action><!--NeedCopy-->

Example

set tm trafficPolicy Traffic-Pol-1 "HTTP.REQ.HEADER("Cookie").CONTAINS("login=true")" Traffic-Prof-1
<!--NeedCopy-->

To globally bind a traffic policy by using the command line interface

At the command prompt, type:

```bind tm global -policyName [-priority ]


### Example

```bind tm global -policyName Traffic-Pol-1<!--NeedCopy-->

To bind a traffic policy to a load balancing or content switching virtual server by using the command line interface

At the command prompt, type one of the following commands:

  • bind lb vserver <name> -policy <policyName> [-priority <priority>]<!--NeedCopy-->

  • bind cs vserver <name> -policy <policyName> [-priority <priority>]<!--NeedCopy-->

Example

bind authentication vserver auth-vserver-1 -policyName Traffic-Pol-1 -priority 1000
<!--NeedCopy-->

To unbind a globally bound traffic policy by using the command line interface

At the command prompt, type:

```unbind tm global -policyName


### Example

unbind tm global -policyName Traffic-Pol-1


## To unbind a traffic policy from a load balancing or content switching virtual server by using the command line interface

At the command prompt, type one of the following commands:

-  ```unbind lb vserver <name> -policy <policyname><!--NeedCopy-->
  • unbind cs vserver <name> -policy <policyname><!--NeedCopy-->

Example


unbind authentication vserver auth-vserver-1 -policyName Traffic-Pol-1

<!--NeedCopy-->

To remove a traffic policy by using the command line interface

First unbind the session policy from global, and then, at the command prompt, type:

```rm tm trafficPolicy


### Example

rm tm trafficPolicy Traffic-Pol-1 ```

To configure and bind traffic policies by using the configuration utility

  1. Navigate to Security > AAA - Application Traffic > Traffic.
  2. Navigate to Security > AAA - Application Traffic > Policies > Traffic.
  3. In the details pane, do one of the following:
    • To create a new session policy, click Add.
    • To modify an existing session policy, select the policy, and then click Edit.
  4. In the Create Traffic Policy or Configure Traffic Policy dialog, specify values for the parameters.
    • Name*—policyName (Cannot be changed for a previously configured session policy.)
    • Profile*—actionName
    • Expression—rule (You enter expressions by first choosing the type of expression in the leftmost drop-down list beneath the Expression text area and then typing your expression directly into the expression text area, or by clicking Add to open the Add Expression dialog box and using the drop-down lists in it to construct your expression.)
  5. Click Create or OK. The policy that you created appears in the details pane of the Session Policies and Profiles page.