• No results found

Creating a local traffic policy

You perform this task to create a local traffic policy that forwards traffic to one or more non-default pools, based on some condition. For example, for a condition such as an HTTP request whose host name equals

siterequest.comand URI starts with/sales/, the BIG-IP®system can forward that request to

pool_app1.

1. On the Main tab, click Local Traffic > Policies > Policy List. The Policy List screen opens.

2. Click Create.

The New Policy screen opens.

3. In the Name field, type a unique name for the policy. 4. From the Strategy list, select a matching strategy.

5. For the Requires setting, select http from the Available list, and move the entry to the Selected list using the Move button.

6. For the Controls setting, select forwarding from the Available list, and move the entry to the Selected list using the Move button.

7. Click Add.

The New Rule screen opens.

117 BIG-IP®Local Traffic Manager: Implementations

8. In the Rule field, type a unique name for the rule. 9. From the Operand list, select http-host.

10.Using the options for the Conditions setting, configure a rule where the condition equals the criteria specified:

a) From the Condition list, select equals.

b) (Optional) Select the case sensitive check box to apply case sensitivity to the condition. c) In the Values field, type the text for the applicable value and click Add.

An example of a value issiterequest.com. The specified condition appears in the Values list box. d) At the lower left, click Add.

The configured condition appears in the Conditions list. 11.From the Operand list, select http-uri.

12.Using the options for the Conditions setting, configure a rule where the condition starts with the criteria specified:

a) From the Condition list, select starts with.

b) (Optional) Select the case sensitive check box to apply case sensitivity to the condition. c) In the Values field, type the text for the applicable value and click Add.

An example of a value is/app1/.

The specified condition appears in the Values list box. d) At the lower left click Add.

The configured condition appears in the Condition list. 13.Using the Actions setting, configure the applicable options:

a) From the Target list, select forward. b) From the Event list, select an event. c) From the Action list, select pool.

d) From the Parameters list, select the pool name to which you want the BIG-IP system to forward the traffic.

e) To the right of the input field, click Add.

The configured parameter appears in the Parameters list box. f) At the lower left click Add.

The configured settings for the action appear in the Actions list.

14.Repeat steps 11 through 13, specifying a secondhttp-uricondition value, such as/marketing, and specifying a different non-default pool name.

15.Click Finished.

For each matching condition specified in the policy, the virtual server to which you assign the policy forwards the packet to the non-default pool that you specified in the policy. For example, you can create one policy that forwards traffic with a URI starting with/sales/ topool_salesand another policy that forwards traffic with a URI starting with/marketing/topool_marketing.

Creating a virtual server

You can create a virtual server that translates a URI in a request or response and modifies HTML content. When you create the virtual server, you can also configure it to forward certain HTTP traffic to one pool, while forwarding other HTTP traffic to a different pool..

1. On the Main tab, click Local Traffic > Virtual Servers. The Virtual Server List screen opens.

2. Click the Create button.

The New Virtual Server screen opens.

3. In the Name field, type a unique name for the virtual server.

4. For the Destination setting, in the Address field, type the IP address you want to use for the virtual server.

The IP address you type must be available and not in the loopback network. 5. In the Service Port field, type80, or select HTTP from the list.

6. For the HTTP Profile setting, verify that the default HTTP profile, http, is selected.

7. In the Content Rewrite area, from the Rewrite Profile list, select the relevant Rewrite profile that you created.

8. From the HTML Profile list, select the relevant HTML profile that you created.

9. For the Policies setting, from the Available list, select the local traffic policy you previously created, and move it to the Enabled list.

10.Click Finished.

The HTTP virtual server appears in the list of existing virtual servers on the Virtual Server List screen. This virtual server can translate URIs in requests and responses, modify HTML content, and forward the traffic to two different non-default load balancing pools.

Implementation results

After you perform the tasks in this implementation, the BIG-IP®system can: • Translate URIs according to the URI rules specified in the Rewrite profile.

• Modify specified HTML content according to the HTML rule specified in the HTML profile. • Forward HTTP traffic to two different non-default pools according to a local traffic policy.

119 BIG-IP®Local Traffic Manager: Implementations

Chapter

22

Related documents