12.07.2015 Views

BROCADE IP PRIMER

BROCADE IP PRIMER

BROCADE IP PRIMER

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Session PersistenceNow, you must enable the rule on the V<strong>IP</strong>:SLB-ServerIron#conf tSLB-ServerIron(config)#server virtual-name www 1.2.3.4SLB-ServerIron(config-vs-www)#port httpSLB-ServerIron(config-vs-www)#port http csw-policy policy1SLB-ServerIron(config-vs-www)#port http cswSLB-ServerIron(config-vs-www)#bind http rs1 http rs2 httpYou can see that we've defined the name of the cookie to which the ServerIronshould pay attention. We've called it “ServerID,” but you're welcome to call itwhatever you'd like (just make sure you use the same name when you configureyour servers). Finally, we enable cookie-switching. Notice that we'veenabled it to the virtual server port. It is certainly possible to use cookieswitching on one port in a virtual server, but not on another port.Before enabling cookie switching, you need to configure the real servers. Howyou do this depends greatly on the platform and software you are using onyour web server. Consult your documentation. The idea is that you'll want yourreal server to send the client a cookie (named “ServerID,” in this example) witha value corresponding to the values we've defined in the ServerIron. For example,rs1 should be sending a cookie named ServerID that has a value of 2001.Likewise, rs2 should be sending a cookie named ServerID that has a value of2002.Now, sometimes you're dealing with a web application that is not easily tamperedwith. It may be a commercial package that your system is running. Thatstill doesn't take away from the fact that you need it to generate a cookie foryour clients. Or does it?Thanks to Brocade, there is a little variation on cookie switching called cookieinsertion. It works almost exactly the same way as cookie switching. The differenceis that it's the ServerIron that generates the cookie. You would still assignIDs to each real server. This time, after the client makes its initial connection,the ServerIron intercepts the server's reply and adds a cookie (containing thereal server's ID) to the reply packet's header. When the client continues itscommunication, it includes the cookie it received from the ServerIron. TheServerIron sees the cookie, and directs the traffic to the real server where itbelongs. The real server sees the cookie as well, but it ignores it. If you have anapplication that will not ignore it, you can also configure the ServerIron toremove the cookie before it delivers an incoming packet to the real server.This is accomplished by adding the following commands to the previousconfiguration:SLB-ServerIron#conf tSLB-ServerIron(config)#server virtual-name www 1.2.3.4SLB-ServerIron(config-vs-www)# port rewrite cookie-insert"ServerID"SLB-ServerIron(config)#csw-policy policy1default forward 1default rewrite insert-cookie "ServerID" "*" "*" age 60Brocade <strong>IP</strong> Primer 361

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!