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
添加tm trafficPolicy HTTP.REQ.HEADE Traffic-Pol-1”R(“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
Example
set tm trafficPolicy Traffic-Pol-1 "HTTP.REQ.HEADER("Cookie").CONTAINS("login=true")" Traffic-Prof-1
To globally bind a traffic policy by using the command line interface
At the command prompt, type:
```bind tm global -policyName
### Example ```bind tm global -policyName Traffic-Pol-1
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:
绑定磅vserver <名称>政策< policyName >[一家rity
] bind cs vserver
-policy [-priority ]
Example
bind authentication vserver auth-vserver-1 -policyName Traffic-Pol-1 -priority 1000
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 -policy
unbind cs vserver
-policy
Example
unbind authentication vserver auth-vserver-1 -policyName Traffic-Pol-1
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
- Navigate toSecurity > AAA - Application Traffic > Traffic.
- Navigate toSecurity > AAA - Application Traffic > Policies > Traffic.
- In the details pane, do one of the following:
- To create a new session policy, clickAdd.
- To modify an existing session policy, select the policy, and then clickEdit.
- In theCreate Traffic PolicyorConfigure Traffic Policydialog, 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.)
- ClickCreateorOK. The policy that you created appears in the details pane of theSession PoliciesandProfilespage.
In this article
- To create a traffic policy by using the command line interface
- To globally bind a traffic policy by using the command line interface
- To bind a traffic policy to a load balancing or content switching virtual server by using the command line interface
- To unbind a globally bound traffic policy by using the command line interface
- To remove a traffic policy by using the command line interface
- To configure and bind traffic policies by using the configuration utility