




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、BIG-IP V9.0iRule,F5 Product training,20 / 4 / 06,Basic Review,3 / 25 / 04,Virtual Server to Pool Members,Internet,:8080,:80,:4002,:80,Virtual Server,7:80,Pool Members,Maps to,Profile Dependencies,Some cant be combined in VS,Some dependent on oth
2、ers,Think in terms of OSI Model,TCP,HTTP,Cookie,UDP,FTP,L3 Network,L2 Data Link,L1 Physical,Traffic Flow Big Picture,Virtual Server,NAT,SNAT,Client side,Node side,Address Translation,Address not Translated,Forwarding VS,Transparent VS,What is Layer 7 Switching,Application Data oriented Eg. HTTP URL,
3、 HTTP Header. Delay binding required Extra memory buffer session Extra processing power (ASIC/CPU),What is iRule,An iRule is a script that you write if you want to make use of some of the extended capabilities of the BIG-IP that are unavailable via the CLI or GUI. based on the Tool Command Language
4、(Tcl) programming standard Additional F5 extension,Architecture,TM/OS,How consolidation is achieved?,React to a Single Communication, One Direction,Packet Based,Legacy Approach,TMOS Architecture,SSL,Compression,Client Side,Server Side,TCP Express,Server,TCP Express,Caching,Microkernel,TMOS Traffic P
5、lugins High-performance Networking Microkernel Powerful Application Protocol Support iControl External monitoring and control iRules Network Programming Language,High Performance HW,iRules,Client,iControl API,TCP Proxy,OneConnect,XML,Rate Shaping,TrafficShield,Web Accel,3rd Party,iRule basic element
6、,Event declaration Operators iRules command,Basic iRule Format,Event declarations Operators iRule commands ,Event declarations,Event declarations = when event type An example: when CLIENT_ACCEPTED if IP:addr IP:remote_addr equals 0 pool my_pool1 ,Event types,Global events HTTP events SSL eve
7、nts Authentication events Referrence to LTM_config_guide.pdf page 302,303, table 13.2,Event types:Global Events,CLIENT_ACCEPTED CLIENT_DATA LB_SELECTED (before send to server) LB_FAILED (no node available for this vs) SERVER_CONNECTED SERVER_DATA RULE_INIT CLIENT_CLOSED SERVER_CLOSED,No matter what
8、L7 iRules, Global Event can take effective .,CLIENT_ACCPTED,CLIENT_DATA,LB_SELECTED,LB_FAILED,SERVER_ACCPTED,SERVER_DATA,CLIENT_CLOSED,SERVER_CLOSED,RULE_INIT,START,L7 Event types:HTTP Events,HTTP_REQUEST HTTP_REQUEST_DATA HTTP_RESPONSE HTTP_RESPONSE_DATA HTTP_RESPONSE_CONTINUE,HTTP_REQUEST,HTTP_REQ
9、UEST_DATA,HTTP_RESPOND,HTTP_RESPOND_DATA,START,HTTP_RESPOND_CONTINUE,TMOS Architecture,Server,iRules,Client,Client Side Event Client_accept Client_data Cache_request DNS_request HTTP_REQUEST HTTP_REQUEST_DATA RTSP_REQUEST . . . .,Server Side Event Server_connect Server_data Cache_response DNS_respon
10、se HTTP_RESPONSE HTTP_RESPONSE_DATA RTSP_RESPONSE . . . .,Operator,Compare two operands TCL standard Eg. = Relational Operators Eg. Contains, matches, equals, end_with Logical Operators Eg. and , or, not,iRules command,Statement command action taken, eg. Use pool, SNAT, log Query command query info/
11、data, eg. HTTP:header, IP:remote_addr Data manipulation command perform data manipulation, eg. HTTP:header remove, HTTP:header add Utility command Parsing and manipulating content, eg. Decode_uri ,iRule Events,Global Events (L3/4 Client Accepted Syn, SynAck, Ack Server Data html page to client HTTP
12、Events (L7) HTTP request or HTTP response SSL Events Client SSL handshake Authentication Events Auth Failure,Profile Dependencies,Some cant be combined in VS,Some dependent on others,Think in terms of OSI Model,TCP,HTTP,Cookie,UDP,FTP,iRule Concepts & Syntax,iRules Often Select Pool Basic Syntax If
13、then else ,when EVENT if conditional_statement action_when_condition_true ,Example 1: Layer 7 content switching,rule BrowserType when HTTP_REQUEST if HTTP:uri ends_with “jpg pool cache_pool else pool main_pool ,rule BrowserType when HTTP_REQUEST if HTTP:header User-Agent contains “MSIE” pool IE_pool
14、 elseif HTTP:header User-Agent contains “Mozilla” pool Mz_pool ,Example 2: Layer 3 IP decision,when CLIENT_ACCEPTED if IP:addr IP:client_addr equals 0 pool my_pool ,when HTTP_REQUEST if IP:hops = 10 COMPRESS:disable ,Example 3 : Layer 4 decision,when CLIENT_ACCEPTED if TCP:client_port 1000
15、 pool slow_pool else pool fast_pool ,when RULE_INIT array set :active_clients when CLIENT_ACCEPTED set client_ip IP:remote_addr if info exists :active_clients($client_ip) if $:active_clients($client_ip) 5 reject return else incr :active_clients($client_ip) else set :active_clients($client_ip) 1 when
16、 CLIENT_CLOSED if info exists :active_clients($client_ip) incr :active_clients($client_ip) -1 if $:active_clients($client_ip) = 0 unset :active_clients($client_ip) ,Configuring iRules,Create Rule,Configuring iRules,Create Pools first Create Rule next Then point VS to Rule,DevCentral,Officially suppo
17、rted by marketing Community is mostly made up of volunteers especially those from F5 Product Development. What about Support? What can DevCentral do better? Having trouble searching? Check this out: Rules Wiki,Lab setup,Connect WiFi SSID: MaskedRider WEP: ab12cd34ef Channel: 6 IP address
18、-253/24 BIGIP v9 54 Admin logon: admin/f5training Training web server -3,Lab 1 : Basic Setup,Internet,192.168.0.x/24,:80,:80,:80,Purpose: setup basic load balance configuration,Step 1: create a pool including 3 training server Step 2: create
19、 a virtual Server with your name as description and bind your own pool as resource Step 3: test the virtual server and check the statistic,Lab 2 : logging iRule,Internet,192.168.0.x/24,:80,:80,:80,Purpose: log custom information by iRules,Step 1: create a iRule to
20、 log client source IP address and source port Step 2: add your iRule into Virtual server Step 3: access the virtual server and check the BIGIP log by command: tail f /var/log/ltm | grep ,when CLIENT_ACCEPTED log local0. TCP session IP:client_addr:TCP:client_port ,Lab 3 : pool selection,Internet,192.
21、168.0.x/24,:80,:80,:80,Purpose: select a dedicated pool for a specific Client,Step 1: create a new pool create a iRule to select a yourname2 pool for your IP address Step 2: add your iRule into Virtual server Step 3: access the virtual server and check the BIGIP l
22、og by command: tail f /var/log/ltm | grep Step 4: ask your classmate to access your VS and check the log,when CLIENT_ACCEPTED if IP:addr IP:client_addr equals pool yourname2 log local0. TCP session IP:client_addr:TCP:client_port selected yourname2 pool else pool yourname log local0. TCP session IP:c
23、lient_addr:TCP:client_port selected default pool ,Lab 4 : Object type switching,Internet,192.168.0.x/24,:80,:80,:80,Purpose: select a dedicated pool for a specific Client,Step 1: create a new pool create a iRule to select a yourname2 pool for your IP address Step
24、2: add your iRule into Virtual server Step 3: access the virtual server and check the BIGIP log by command: tail f /var/log/ltm | grep Step 4: ask your classmate to access your VS and check the log,when HTTP_REQUEST set uri HTTP:uri log local0. “The URI is $uri” if $uri ends_with .gif pool yourpool
25、else HTTP:uri / pool yourpool2 ,Lab 5 : manipulate HTTP Header,Internet,192.168.0.x/24,:80,:80,:80,Purpose: rewrite WEB server Header for security thread,Step 1: install a HTTP watch Step 2: access your VS and check the http header “server” value Step 3: create a
26、iRule to rewrite Server response HTTP header “server” to your name. Step 4: add your iRule into Virtual server Step 5: access the virtual server and check the BIGIP log by command: tail f /var/log/ltm | grep ,when HTTP_RESPONSE log local0. Original Server type is : HTTP:header Server HTTP:header rep
27、lace Server F5_server log local0. HEADER modified is : HTTP:header Server ,Lab 6 : Selective SNAT address,Internet,192.168.0.x/24,:80,:80,:80,Purpose: specify a SNAT address for a selected source IP address when access VS,Hints: search “snat” irules command and ex
28、ample at Wiki,Thank You!,iRuleV4 vs V9,What can V9 really do that V4 cant?,Use less rule for more functionality. Rules can be written to utilize dynamic data (eg: a pool name can come from a header or cookie). Complete universal persistence Persistence records can be added based on data from the res
29、ponse. Ability to maintain state Session table can track arbitrary information for a period of time. Variables can reference data for the life of the connection. Global variables can reference data indefinitely.,What can V9 really do that V4 cant?,Manipulate the response. Insert or remove headers and cookies in the response. Sanitize headers and cookies from the respo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年树脂型胶粘剂合作协议书
- 2025年河北石家庄学院选聘事业单位考试试题【答案】
- 2025年喀什地区招聘中学教师考试试题【答案】
- 2025年吉林省直事业单位招聘考试试题【答案】
- 2025年克拉玛依市消防救援支队招聘政府专职消防员考试试题【答案】
- 2025年院前急救信息系统合作协议书
- 河北非营利组织免税资格认定申请表
- 毕业实习周记范文
- 2025年新型膜材料及其装置合作协议书
- 2025年电子握力计项目发展计划
- 港口装卸作业培训
- 2025年湖北省武汉市中考数学真题(无答案)
- 钳工考试试题及答案
- 2025至2030中国牙科氧化锆块行业发展趋势分析与未来投资战略咨询研究报告
- 拖欠维修费车辆以车抵债协议范本
- 2025至2030中国复印机行业发展趋势分析与未来投资战略咨询研究报告
- 暑假安全家长会4
- 2024年安徽省泗县卫生局公开招聘试题带答案
- 2025年北京市高考化学试卷真题(含答案)
- 2025年重庆市中考化学试卷真题(含标准答案)
- JG/T 202-2007工程管道用聚氨酯、蛭石绝热材料支吊架
评论
0/150
提交评论