beautypg.com

Csw policies, Creating a policy, Configuring the forward action – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual

Page 266

background image

250

Brocade Virtual ADX Server Load Balancing Guide

53-1003247-01

Layer 7 content switching

5

CSW policies

A policy specifies the action to take when a rule is matched. You can specify the following actions in
a policy:

Forward action – Causes the Brocade Virtual ADX to forward packets matching a specified rule
to a specified real server or server group. Refer to

“Configuring the forward action”

on

page 250.

Reply-error action – Causes the Brocade Virtual ADX to send a 403 error code page back to the
client when the specified rule is matched. Refer to

“Configuring the reply-error action”

on

page 253.

Log action – Causes the Brocade Virtual ADX to write a message to Syslog when the specified
rule is matched. You can optionally customize the format of the Syslog message. Refer to

“Configuring the log action”

on page 253.

Redirect action – Causes the Brocade Virtual ADX to redirect a request to an alternate domain,
URL, or port when the specified rule is matched. Refer to

“Configuring redirect”

on page 264.

Persist action – causes the Brocade Virtual ADX to send requests with similar content to the
same server when the specified rule is matched. Refer to

“Configuring the persist action”

on

page 251.

NOTE

If no rule is matched, traffic is directed to the internet.

NOTE

Alias ports should be treated like regular ports and should have the same server ID and group ID.

Creating a policy

To create a policy for Layer 7 content switching, enter a command such as the following.

Virtual ADX(config)#csw-policy policy1

Syntax: [no] csw-policy policy-name

The policy-name variable can be up to 80 characters in length.

Configuring the forward action

The forward action causes the Brocade Virtual ADX to forward packets matching a specified rule to
a specified real server or server group.

For example, the following command specifies that packets matching rule r1 be forwarded to real
server 1029.

Virtual ADX(config-csw-policy1)#match r1 forward 1029

Syntax: [no] match rule-name forward id [cookie-name name]

The rule-name variable is the name of a previously configured Layer 7 content switching rule.

The id variable refers to a real server or server group ID. An ID between 0 and 1023 indicates a
server group ID, and an is between 1024 and 2047 indicates a real server ID.