![北電Alteon應(yīng)用層交換機(jī)技術(shù)手冊_Passive mode cookie-based persistence_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/17/c2b0dfec-cb87-496c-8eff-14b66c78a5f6/c2b0dfec-cb87-496c-8eff-14b66c78a5f61.gif)
![北電Alteon應(yīng)用層交換機(jī)技術(shù)手冊_Passive mode cookie-based persistence_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/17/c2b0dfec-cb87-496c-8eff-14b66c78a5f6/c2b0dfec-cb87-496c-8eff-14b66c78a5f62.gif)
![北電Alteon應(yīng)用層交換機(jī)技術(shù)手冊_Passive mode cookie-based persistence_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/17/c2b0dfec-cb87-496c-8eff-14b66c78a5f6/c2b0dfec-cb87-496c-8eff-14b66c78a5f63.gif)
![北電Alteon應(yīng)用層交換機(jī)技術(shù)手冊_Passive mode cookie-based persistence_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/17/c2b0dfec-cb87-496c-8eff-14b66c78a5f6/c2b0dfec-cb87-496c-8eff-14b66c78a5f64.gif)
![北電Alteon應(yīng)用層交換機(jī)技術(shù)手冊_Passive mode cookie-based persistence_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/17/c2b0dfec-cb87-496c-8eff-14b66c78a5f6/c2b0dfec-cb87-496c-8eff-14b66c78a5f65.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、TT-0501401a - Information - 06-Jan-2005 Technical TipPassive mode cookie-based persistenceContentsContents.1Introduction.1Associated Products.1Overview.1Nortel Web and Application switch cookie persistency.3Passive cookie mode.3Sample Configuration.4Setup.4Configuring the PC.4Configuring WebServer1.
2、6Configuring WebServer2.7Configuring Alteon.8Configuring interfaces.9Configuring real servers.9Assigning real servers to a group.10Configuring the virtual server.10Enabling client/server processing on ports.11Enabling direct access mode.11Enabling SLB globally.11Testing the configuration.12Appendix
3、A. Alteon configuration file.21IntroductionThis document illustrates the operation and sample configuration of passive mode cookie-based persistence in Nortel Web and Application switches (formerly known as Alteon Web and Application switches).Associated ProductsThe information in this document is i
4、ntended to be used with the following product(s) with the indicated software or hardware revisions:Product Name or Order NumberNortel Web and Application switches (formerly known as Alteon Weband Application switches): 180e, 180 Plus, 184, AD2, AD3, AD4,2224, 2424, 2208, 2216, 3408 Revision Informat
5、ion Potentially Affected Corrected OverviewCookies are a mechanism used to create a stateful session with HTTP requests and responses. Prior to theintroduction of the cookie concept, HTTP servers would respond to each client request without relating that request to subsequent requests. The concept o
6、f cookies allows clients and servers that wish to exchange state information to place HTTP requests and responses within a larger context, or a so-called session. This context could be used to maintain a state of the session that could be necessary for some web applications. For example, a stateful
7、session could be used for e-commerce, when the state would reflect the clients product selections or shopping cart. Or it could be used by web server administrators to count how many returning clients have visited the web site.©2005 Nortel Networks Limited. All Rights ReservedTT-0501401aPassive
8、 mode cookie-based persistenceCookies are strings that are placed into the HTTP header and passed from the server to the clients web browser. When the client initiates a connection to the server, it establishes a TCP session with a server and passes the HTTP request. A cookie-enabled server processe
9、s the HTTP request and sends the client an HTTP response containing an extra header: the Set-Cookie header. The Set-Cookie header contains: a cookie name and its value an optional comment an optional domain name (always starts with a leading dot) an optional max age of the cookie (if the max age is
10、not specified in the Set-Cookie header, the user agentdeletes the cookie as soon as the client closes the web browser) an optional path that specifies the subset of URLs which a particular cookie applies to an optional secure attribute that directs the user agent to use only a secure means to connec
11、t to the server a version attribute that identifies the version of the state management specification.For example, below is a Set-Cookie header sent by the HTTP server at :Set-Cookie: PREF=ID=4ae1d3ef46a57924:TM=1087567406:LM=1087567406:S=K62mTGGTRKDuigtw; expires=Sun, 17-Jan-2038 19:14:07 GMT; path
12、=/; domain=rnOnce the client receives the cookie in the HTTP response, it stores it locally (unless configured to ignore cookies), usually in a form of a text file. Note that the location and form of storage depend on the web browser and operating system on a clients PC. For example, the received co
13、okie from could be stored as follows:Once the cookie is received (assuming the clients web browser supports cookies), the client uses that cookie to send subsequent requests to the server. The cookie request header is used to send the cookie information back to the server. The cookie header contains
14、 the same attributes as the received Set-Cookie directive, with the exception of the comment, max age and secure attributes that are not sent back to the server.For example, below is a subsequent request to the :Hypertext Transfer ProtocolGET /images/logo.gif HTTP/1.1rnAccept: */*rnReferer: Accept-L
15、anguage: en-usrnAccept-Encoding: gzip, deflaternUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; PC SRP 2.0)rnHost: rnConnection: Keep-AlivernCookie:PREF=ID=4ae1d3ef46a57924:TM=1087567406:LM=1087567406:S=K62mTGGTRKDuigtwrn rnThe server might ignore the received cookie or use i
16、t to determine the state of a session.©2005 Nortel Networks Limited. All Rights Reserved Page: 2 of 22TT-0501401aPassive mode cookie-based persistenceNortel Web and Application switch cookie persistencyNortel Web and Application switches support cookie-based persistency that allows the switch t
17、o redirect clients to the real server that initially processed the request. With cookie-based persistent load balancing, once an initial real server is selected based on the configured group metric, the switch forwards the subsequent requests based on the cookie header in the clients HTTP request.Th
18、e switch can operate in three modes of operation insert cookie, passive cookie and rewrite cookie. Thisdocument illustrates the passive cookie mode. For information on insert or rewrite cookie modes, please consult the technical tips titled “Insert mode Cookie based persistence” or “Rewrite mode Coo
19、kie based persistence”.Passive cookie modeWhen operating in passive cookie mode, the switch records the cookie value inserted by the real server and forwards the subsequent request from the client based on that cookie. The switch does not add or change the cookie, it just uses the cookie, thus opera
20、ting in a passive mode.When the client sends an initial HTTP request without any cookies in it (Figure 1), the switch makes a forwarding decision based on the configured load balancing metric for the real servers group.The real server receives the request, processes it, inserts a cookie and sends an
21、 HTTP reply back to the client. The switch receives an HTTP reply, records the cookie value inserted by the real server and forwards the reply to the client PC. If the client needs to make a subsequent request to the server, it inserts the cookie request header into the HTTP request. When the switch
22、 receives an HTTP request containing the cookie value inserted previously by the real server, it looks up the real server associated with the cookie and forwards the request to the initially selectedClient sends HTTP request/no cookiesSwitch forwards therequest to real server/no cookiesReal server r
23、esponds with HTTP reply/cookies insertedSwitch records cookie value and forwards HTTP reply to Client PC/cookie insertedClient uses the received cookie forsubsequent HTTP requests/cookie insertedSwitch forwards the subsequent request to the real server based on the cookieinformation/cookie insertedF
24、igure 1©2005 Nortel Networks Limited. All Rights ReservedPage: 3 of 22TT-0501401aPassive mode cookie-based persistenceSample ConfigurationSetupGW: 00 PC Windows 2000 Professional with Microsoft Internet Explorer 5.5 installed, IP address 7/24 Alteon Nortel (Alteon) Web s
25、witch AD3, code version , interface 1 IP 00/24, interface 2 IP 00/24, Virtual IP 50, port 1 client port, port 8 server port WebServer1 Linux RedHat 7.3 with Apache 1.3.31 software installed, IP address 0/24 WebServer2 Linux RedHat 7.3 with Apa
26、che 1.3.31 software installed, IP address 0/24The goal of the configuration is to configure passive mode cookie persistency on Alteon where the PC would be redirected to the same servers it was originally redirected to.Configuring the PC1. Configure the IP address (7/24) on t
27、he PC: C:>ipconfig Windows 2000 IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 7 Subnet Mask . . . . . . . . . . . : Default Gateway . . . . . . . . . :©2005 Nortel Networks Limited. All
28、 Rights Reserved Page: 4 of 22TT-0501401aPassive mode cookie-based persistence2. It is assumed that cookies are enabled for the browser. If this is not the case, enable cookies:a) Navigate ToolsÆInternet Options from the browser menu:b) The Internet Options window appears. Click on the Security
29、 tab.c) Select Internet and click Custom Level:©2005 Nortel Networks Limited. All Rights ReservedPage: 5 of 22TT-0501401aPassive mode cookie-based persistenced) Scroll down to the Cookies section and select Enable for cookies.e) Click OK:f) In the Internet Options window, click OK.Configuring W
30、ebServer11. Configure the IP address (0/24) on WebServer1: rootlinux7 user# /sbin/ifconfig eth0 0 netmask 2. Configure the Alteon interface 2 IP (00) as a default gateway: rootlinux7 user# /sbin/route add default gw 00©2005 Nortel Net
31、works Limited. All Rights Reserved Page: 6 of 22TT-0501401aPassive mode cookie-based persistence3. This configuration assumes that Apache has been compiled with the user tracking module enabled.4. Enable user tracking. For that, add the user tracking directive to the httpd configuration file and tur
32、n thetracking on:CookieTracking on rootlinux7 user# tail /usr/sbin/conf/httpd.conf # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin webmasterdummy- # DocumentRoot /www/docs/dummy- # CustomLog logs/dummy-access_log common #&
33、lt;/VirtualHost> CookieTracking onNote: By default, when CookieTracking is enabled, Apache will add a cookie with the cookie name Apache and no expiration timer set.5. Replace the default index.html file in Apaches root directory with a sample html file that will allow us todistinguish between th
34、e two web sites. For example:<HTML> <HEAD> <TITLE>www.example-</TITLE> </HEAD> <BODY> <H1 ALIGN="CENTER">www.example-</H1> </BODY> </HTML>6. Start the HTTP server (assuming Apache has been installed with /usr/sbin/ prefix):rootlin
35、ux7 sbin# /usr/sbin/bin/apachectl startConfiguring WebServer21. Configure the IP address (0/24) on WebServer2:rootlinux7 user# /sbin/ifconfig eth0 0 netmask 2. Configure Alteon interface 2 IP (00) as a default gateway:rootlinux7 user# /sbin/route add
36、default gw 00©2005 Nortel Networks Limited. All Rights Reserved Page: 7 of 22TT-0501401aPassive mode cookie-based persistence3. This configuration assumes that Apache has been compiled with the user tracking module enabled.4. Enable user tracking. For that, add the user tracking dir
37、ective to the httpd configuration file and turn thetracking on:CookieTracking on rootlinux7 user# tail /usr/sbin/conf/httpd.conf # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin webmasterdummy- # DocumentRoot /www/docs/dumm
38、y- # CustomLog logs/dummy-access_log common #</VirtualHost> CookieTracking onNote: By default, when CookieTracking is enabled, Apache will add a cookie with the cookie name “Apache” and no expiration timer set. The default behavior is used in this example. If there is a need to set a different
39、name for the cookie, use the CookieName directive. If there is a need to set the expiration timer, use theCookieExpires directive. For more information on cookies with Apache, please consult the Apache web server documentation available at .5. Replace the default index.html file in t
40、he root directory with a sample html file that will allow us to distinguishbetween the two web sites. For example:<HTML> <HEAD> <TITLE>www.example-</TITLE> </HEAD> <BODY> <H1 ALIGN="CENTER">www.example-</H1> </BODY> </HTML>6. Star
41、t the HTTP server (assuming Apache has been installed with /usr/sbin prefix): rootlinux7 sbin# /usr/sbin/bin/apachectl startConfiguring AlteonNote: Configuration of Alteon has been started from factory default settings.1. Log in to the switch:Enter password: System Information at 11:05:11 Wed Apr 21
42、, 2004 Alteon AD3 sysName: sysLocation: . . .©2005 Nortel Networks Limited. All Rights Reserved Page: 8 of 22TT-0501401aPassive mode cookie-based persistence2. Select n to not run the setup script: The switch is booted with factory default configuration. To ease the configuration of the switch,
43、 a "Set Up" facility which will prompt you with those configuration items that are essential to the operation of the switch is provided. Would you like to run "Set Up" to configure the switch? y/n nConfiguring interfaces1. Configure the IP address (00/24) for interfac
44、e 1 and enable the interface: >> Main# /cfg/ip/if 1/mask /addr 00/ena Current subnet mask: New pending subnet mask: Current IP address: New pending IP address: 00 Pending new broadcast address: 55 Current status: di
45、sabled New status: enabled2. Configure the IP address (00/24) for interface 2 and enable the interface: >> IP Interface 1# /cfg/ip/if 2/mask /addr 00/ena Current subnet mask: New pending subnet mask: Current IP address: New pen
46、ding IP address: 00 Pending new broadcast address: 55 Current status: disabled New status: enabled3. Apply and save the changes: >> IP Interface 2# apply/save - Apply complete; don't forget to "save" updated configuration. Request will first copy the FLASH
47、 "active" config to "backup", then overlay FLASH "active" with new config. Confirm saving to FLASH y/n: y New config successfully saved to FLASH. Switch is currently set to use factory default config block on next boot. Do you want to change that to the active config bl
48、ock? y/n y Next boot will use active config block.Configuring real servers1. Configure real server 1. Enter the real server 1 configuration menu, set the real server 1 IP address(0) and enable the real server:>> IP Interface 2# /cfg/slb/real 1/rip 0/ena Current real ser
49、ver IP address: New pending real server IP address: 0 Current status: disabled New status: enabled2. Configure real server 2. Enter the real server 2 configuration menu, set the real server 2 IP address(0) and enable the real server:>> Real server 1 # /cfg/slb/real 2/rip 0/ena Current real server IP address: New pending real server IP address: 0 Current status: disabled New status: enabled©2005 Nortel Networks Limited. All Rights Reserved Page: 9 of 22TT-0501401aPassive mode cookie-based persistenceAssigning real serve
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2021-2026年中國電阻器件行業(yè)市場全景調(diào)研及投資規(guī)劃建議報告
- 2025-2030年中國掛鍍線項(xiàng)目投資可行性研究分析報告
- 汽車行業(yè)的稅收優(yōu)化策略分析
- 一年級入少先隊(duì)申請書
- 清掃車項(xiàng)目風(fēng)險分析和評估報告
- 知識產(chǎn)權(quán)在教育普及中的應(yīng)用和效果分析
- 黔西南特種陶瓷制品項(xiàng)目可行性研究報告
- 申請書免學(xué)費(fèi)
- 蘇州芯勢科技有限公司介紹企業(yè)發(fā)展分析報告模板
- 中國電動車電機(jī)項(xiàng)目投資可行性研究報告
- 深圳人才公園功能分析報告
- Interstellar-星際穿越課件
- 2023-2024學(xué)年貴州省黔西南州八年級上冊1月月考語文質(zhì)量檢測試卷(附答案)
- 閱讀理解:如何找文章線索 課件
- 產(chǎn)品設(shè)計(jì)思維 課件 第3-5章 產(chǎn)品設(shè)計(jì)的問題思維、產(chǎn)品設(shè)計(jì)的功能思維、產(chǎn)品設(shè)計(jì)的形式思維
- 餐券模板完整
- 2023年節(jié)能服務(wù)行業(yè)市場分析報告及未來發(fā)展趨勢
- 小區(qū)排水管網(wǎng)修復(fù)施工方案
- 智慧城市發(fā)展-人工智能技術(shù)在城市管理中的應(yīng)用
- 因產(chǎn)品質(zhì)量買賣合同糾紛起訴狀
- GB/T 6892-2023一般工業(yè)用鋁及鋁合金擠壓型材
評論
0/150
提交評論