F5 iRules 基础.ppt


文档分类:IT计算机 | 页数:约109页 举报非法文档有奖
1/109
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/109
文档列表 文档介绍
F5 iRules Foundational 1 The power of iRules F5 iRules Foundational 1 The power of iRules Presented by: Presales Consultant @: @ M: ********** http://devcentral. CONFIDENTIAL 2 CONFIDENTIAL Agenda What is an iRule? TCL 基础 iRule 基础I – iRule 全局命令– iRule 功能函数– iRule 字符串操作 TMOS 命令 I TMOS 事件 I高级会话保持 UIE 3 CONFIDENTIAL What is an iRule? iRule 是一种脚本语言工具它的语法是基于 TCL 语言的–大部分 TCL 语言的功能都被支持–同时还有很多 iRule 的扩展功能它能帮你实现许多扩展功能–当你在 CLI/GUI 介面无法找到对应的命令/菜单–请相信 iRule ! 4 CONFIDENTIAL iRules 的组成元素 iRules 是基于事件驱动(Event-Driven) 的–由 LTM 系统触发你在 iRules 中指定/期望的事件 iRules 是由以下的基本元素构成: –事件声明–操作符– iRules 命令 5 CONFIDENTIAL iRules 的基本格式事件声明{表达式{ iRules 命令}} when EPTED { if { [IP::addr [IP::remote_addr] equals “ ”] } { discard }} 6 CONFIDENTIAL TCL Foundational 变量表达式流程控制– if-then-else – switch – for – foreach – while 7 CONFIDENTIAL 变量基本操作– set <varname> – unset <varname> – append <varname> <arg1> <arg2> …– concat arg1 arg2 arg3 …? Return a list valued by args, seperated by white space – incr <varname> <steps> 8 CONFIDENTIAL 变量列表– set lst {{item 1} {item 2} {item 3}} – lindex <list> <index> ? lindex [lindex [lindex $a 1] 2] 3 ? lindex $a {1 2 3} – lappend <list> <value1> <value2> …– linsert <list> <index> <val1> <val2> …?在 index 之前插入内容– lreplace <list> <first> <last> <val1> <val2> …?替换 first 至 last 之间的内容?如果变量不足, 则删除对应部分– llength <list> 9 CONFIDENTIAL 变量全局变量– RULE_INIT 内定义的均为全局变量–::varname 为全局变量–使用全局变量将导致 CMP 失效 10 CONFIDENTIAL LAB 1::List user: tcl , password tcl set b [list a b {c d e} {f {g h} }] puts "Treated as a list: $b\n" set b [split "a b {c d e} {f {g h} } " ] puts "Transformed by split: $b\n" set a [concat a b {c d e} {f {g h} }] puts "Concated: $a\n" lappend a {ij K lm} ;# Note: {ij K lm} is a single element puts "After lappending: $a\n" set b [linsert $a 3 "1 2 3"] ;# "1 2 3" is a single element puts "After linsert at position 3: $b\n

F5 iRules 基础 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数109
  • 收藏数0 收藏
  • 顶次数0
  • 上传人autohww
  • 文件大小0 KB
  • 时间2016-03-21