Application Delivery (ADX)

Reply
Contributor
Posts: 22
Registered: ‎03-30-2011

CSW rewrite rule

[ Edited ]

Trying to come with a simpe rewrite rule to do the following:

 

http://adx.com > http://adx.com:9999/home/ttyl

 

Does this look correct?  

 

csw-rule "adx1-csw" header "host" equals "www.adx.com"

csw-rule "adx2-csw" header "host" equals "adx.com"

 

csw-policy "adx"

match "adx1-csw" redirect "adx.com" "/home/ttyl"

match "adx2-csw" redirect "adx.com" "/home/ttyl"

 

server real adx1 172.16.25.16

source-nat

port 9999

 

server real adx2 172.16.25.17

source-nat

port 9999

 

server virtual adx_vip 172.16.24.18

port 9999 sticky

port 9999 csw-policy "adx"

bind 9999 adx1 9999 adx2 9999

 

Would this redirect any traffic going to http://adx.com to http://adx.com:9999/home/ttyl ??

 

Highlighted
Contributor
Posts: 74
Registered: ‎08-18-2011

Re: CSW rewrite rule

Kindly look for section "D.b.2 Configuring Rewrite Request-Insert" in the Advanced Layer 7 Switching Features guide. Link below

 

http://www.brocade.com/support/Product_Manuals/ServerIron_SLBGuide/l7sw.5.2.html#126658

 

-Mohit Sahni
Contributor
Posts: 22
Registered: ‎03-30-2011

Re: CSW rewrite rule

So that configuration won't work? 

 

I took a look at that link and came up with this..can you confirm this will work or not?

 

csw-rule "adx1-csw" url prefix /adx

 

csw-policy "adx"

match "adx1-csw" forward 1025

match "adx1-csw" rewrite request-insert /home/ttyl

 

server real adx1 172.16.25.16

source-nat

port 9999

 

server real adx2 172.16.25.17

source-nat

port 9999

 

server virtual adx_vip 172.16.24.18

port 9999 sticky

port 9999 csw-policy "adx"

bind 9999 adx1 9999 adx2 9999

Contributor
Posts: 74
Registered: ‎08-18-2011

Re: CSW rewrite rule

Hi

Looks ok but you may want to have a look at prefix in the rule 

csw-rule "adx1-csw" url prefix /adx

 

Also you can bind it to a test vip and then using the following show command you can see how is it working

"show csw policy adx" 

-Mohit Sahni

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

Download FREE NVMe eBook