Application Delivery (ADX)

Reply
Occasional Contributor
Posts: 6
Registered: ‎03-17-2010

ADX using Code Router, Source-Nat-ip and CSW not working

Hello people interesting:

I have a big problem. I have a ADX configured in the following scenario:

1. - ADX with router firmware, is applying Nat-ip Source with code 12.400j

2. - Balancing is performed on an application ASP.Net

3. - Balancing is on two servers: A real server and a remote server.

4. - The ADX is on the Real Server network.

5.- - Balancing work if not applied CSW.

However, when I apply Content Switching on the response of Server (Set-Cookie), as well as the host header (request) and the cookie sticks to the client is not working. How I can apply a suitable persistence? What am I doing wrong?

server port 80

server source-nat-ip 172.162.0.1  255.255.255.0 172.162.0.254  port-range 2

!

context default

!

csw-rule "rule1" response-header "Set-Cookie" pattern "ASP.NET_SessionId="

csw-rule "rule2" header "Host" equals "www.abcbussines.com"

csw-rule "rule3" header "Cookie" pattern "ASP.NET_SessionId="

!

csw-policy "policy1"

match "rule1" passive-persist offset 0 length 7 

match "rule3" persist offset 0 length 7 passive-persist

match "rule2" persist offset 0 length 7 passive-persist

!

server real real1 172.162.0.2                   

source-nat

port 8081

port 8081 keepalive

port 8081 server-id 1024

port 8081 group-id  1 1

!

server remote-name remote1 10.10.10.1

source-nat

port 8082

port 8082 keepalive

port 8082 server-id 1025

port 8082 group-id  1 1

!

!

server virtual www.abcbussines.com 172.162.0.100          

sticky-age 5

predictor response-time

port http sticky concurrent

port http csw-policy "policy1"

port http csw

port http keep-alive

bind http real1 8081

bind http remote1 8082

!

ip default-network 172.162.0.254/24

ip dns domain-name abcbussines.com

ip dns server-address 172.162.0.25 10.10.10.20

ip route 10.10.10.0 255.255.255.0 172.162.0.254

                                   

!

interface ethernet 10

route-only

ip address 172.162.0.3 255.255.255.0

!

end

Brocadian
Posts: 95
Registered: ‎01-13-2009

Re: ADX using Code Router, Source-Nat-ip and CSW not working

Hi ajuarez,

I asked around and got a couple pieces of advice for you.

Either remove or modify “rule2” from the csw-policy. It doesn’t make sense to use host header for passive persistency. If you want, you can try modifying it to the following first and then removing it if it doesn't work out.

csw-rule "rule2" url pattern "ASP.NET_SessionId="

If it doesn’t resolve the problem, then perhaps try some debugging, using “url debug” as follows:

rconsole virtual

url debug 1 <client PC IP address>

--->then generate problematic traffic

-> to stop debugging, “url debug 0” and “rconsole-exit”.

And check the outputs.

Join the Community

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