Application Delivery (ADX)

Reply
Occasional Contributor
Posts: 8
Registered: ‎06-15-2011

Can't get URL switching working

I'm trying to get URL switching working, and it's just not happening: our ADX is just sending everything to the default server.  Here's the setup:

csw-rule "r1" url pattern "/nagios"
!
csw-policy "policy1"
match "r1" forward 1025
default forward 1024
!
!
server real cyclops-int 172.16.xx.xx

port ssh
port http
port http url "HEAD /"
port http server-id 1024
!
server real ironman-int 172.16.xx.xx

port http
port http url "HEAD /"
port http server-id 1025                                        
!                                                                
!                                                                
server virtual cyclops-ext 64.xx.xxx.xx                         
port ssh                                                        
port http                                                       
port http csw-policy "policy1"                                  
port http csw                                                   
bind ssh cyclops-int ssh                                        
bind http cyclops-int http ironman-int http

But everything, whether it's for /nagios or not, goes to the default server.  I tried with "prefix" instead of "pattern", and it made no difference.  This is closely based off "URL Switching using ServerIron/ADX" (http://community.brocade.com/docs/DOC-1527).  I tried "show csw-policy" as the document suggests, and both rule r1 and default show no hits.  So what's going on?  I'm a bit puzzled.

Brocadian
Posts: 70
Registered: ‎03-14-2009

Re: Can't get URL switching working

Hi,

that sounds weird.

Did you try to delete and reconfigure the VIP?

Which software are you using?

Any output from the rconsole with the "url debug" command?

I tried your configuration lines in the lab and it works perfectly.

Occasional Contributor
Posts: 8
Registered: ‎06-15-2011

Re: Can't get URL switching working

I tried deleting and recreating the VIP.  It made no difference.

As for the version of the software - which number are you looking for?  'show ver' gives a lot of information, but I'm not sure which is the appropriate one.

'url debug' didn't give me any output at all.  I did

#  rconsole 1 1

#  url debug 3

then tried hitting the site, but got nothing on the rconsole session.  Is that the way url debug is supposed to work?

Brocadian
Posts: 70
Registered: ‎03-14-2009

Re: Can't get URL switching working

within the "sh ver" output there is a line with "System Version" showing the software Version.

you should see anything with the url debug command.

Does the "sh server real" and "sh server virt" counter increase if you try to connect?

Does the "sh csw-policy" hit counter increase if you try to connect?

Occasional Contributor
Posts: 8
Registered: ‎06-15-2011

Re: Can't get URL switching working

Here's the version:

#sh ver | include System Version
System Version 12.2.01T403 Sep  1 2010 11:58:31 PDT label: ASR12201

"Does the "sh server real" and "sh server virt" counter increase if you try to connect?

Does the "sh csw-policy" hit counter increase if you try to connect?"

No on both those two questions.

Brocadian
Posts: 70
Registered: ‎03-14-2009

Re: Can't get URL switching working

Sorry for the delay.

If the counters do not increase there seems no traffic destined fpr the VIP reach the ADX.

you can check this with the "debug filter" command if any packets arrive at the ADX destines for the VIp.

Occasional Contributor
Posts: 8
Registered: ‎06-15-2011

Re: Can't get URL switching working

Thanks for thinking about this!

I set up a filter and captured some requests. Here's the relevant-looking bit:

telnet@adc1(debug-filter-1-1)#ascii-dump 25

Packet 25 captured at Aug 22 15:10:41 ; Packet size is 118(0x0076) bytes
...
        IP address: 207.239.52.14 ---> 64.147.96.220
...
Data:                                                            
0000: 47 45 54 20 2f 6e 61 67 69 6f 73 20 48 54 54 50 | GET /nagios HTTP
0010: 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 62 65 74 61 | /1.1..Host: beta
0020: 2e 64 62 67 2e 74 76 0d 0a 55 73 65 72 2d 41 67 | .___.__..User-Ag
0030: 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 | ent: Mozilla/5.0


telnet@adc1(debug-filter-1-1)#ascii-dump 26

Packet 26 captured at Aug 22 15:10:41 ; Packet size is 118(0x0076) bytes
...
        IP address: 207.239.52.14 ---> 172.16.1.40
...
Data:
0000: 47 45 54 20 2f 6e 61 67 69 6f 73 20 48 54 54 50 | GET /nagios HTTP
0010: 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 62 65 74 61 | /1.1..Host: beta
0020: 2e 64 62 67 2e 74 76 0d 0a 55 73 65 72 2d 41 67 | .___.__..User-Ag
0030: 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 | ent: Mozilla/5.0

So a request for /nagios is coming in...looks OK to me...and yet it gets sent to the .40 host, despite the fact it matches rule r1 and the police says that that should go to the other server at .44.

Occasional Contributor
Posts: 8
Registered: ‎06-15-2011

Re: Can't get URL switching working

I finally figured out what was going on!  There was an old NAT rule from some early testing that was causing all the traffic to be rerouted at a lower level, so the layer 7 content switching rules were never even seen.

Join the Community

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